I am looking to create a batch file that will create individual nfo files that provide a listing for the file name, video resolution, video length & video bitrate for each mp4/mkv file I have in a specific folder. I am familiar with ffmpeg/ffplay/ffprobe and learning about python as well as the mediainfo cli. I also have some familiarity with c++. I found a batch command that uses xml and creates a new folder named after each video file in the directory. It then moves the video file into the folder that matches the name and creates an nfo file with the same label as the video file. I would like to do something similar that creates an .nfo file with some constant data I want in all the .nfo files as well as the 4 variables above (file name, video resolution, video length & video bitrate). A single batch file that can do all of the above would be preferred, but I'd be happy using multiple batch files as well, if necessary. After a lifetime of using the GUI interface, I'm still becoming accustomed to the command line interface, so any assistance would be greatly appreciated, no matter how minor it may seem to you. Thank you
+ Reply to Thread
Results 1 to 3 of 3
-
-
If you are looking for NFO file such as :
<movie>
<title></title>
<originaltitle></originaltitle>
<sorttitle></sorttitle>
<rating></rating> <!-- 0 - 10 rating, can be decimal -->
<ratings>
<rating moviedb="imdb"></rating>
<rating moviedb="allocine"></rating>t
"Count Up.txt"
one
two
three
four
Then call these lines assigning each to a variable:
"Test of variables"
< "Count Up.txt" (
set /p line1=
set /p line2=
)
echo line1 %line1%
echo line2 %line2%
set line
@echo off
for /r %%a in (*.mp4) do (
(
< "Count Up.txt" (
set /p line1=
set /p line2=
)
echo ^<?xml version="1.0" encoding="UTF-8" standalone="yes"?^>
echo ^<movie^>
echo ^<title^> %Line1% ^</title^>
echo ^<runtime^> %Line2%^</runtime^>
echo ^</movie^>
)>"%%~dpna.nfo"
)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<movie>
<title> one </title>
<runtime> two</runtime>
</movie>
I would test more but it is 03:30 AM here and I have rehab at 07:00 AM. Hope this helps.
Similar Threads
-
Batch trim end of multiple length videos
By Budman1 in forum Video ConversionReplies: 3Last Post: 10th Dec 2019, 06:22 -
Batch combining multiple audio files with same picture to create mp4 files
By MD_89 in forum AudioReplies: 25Last Post: 1st Dec 2018, 22:29 -
Batch file to add multiple attachments to multiple MKV file.
By Rev3rse in forum Video ConversionReplies: 0Last Post: 5th Aug 2016, 23:12 -
BATCH to create .avs files
By marcorocchini in forum Newbie / General discussionsReplies: 0Last Post: 9th Nov 2015, 10:00 -
Create multiple AVI files in batch from sets of JPEGs
By MRICE in forum Newbie / General discussionsReplies: 4Last Post: 23rd Oct 2014, 11:13