I have a library of decrypted DVDs, which all have their video in a series of VOB files within the usual VIDEO_TS folder. I wondered if I could use FFMPEG to combine them into a single MPEG files. So first I found this (example assumes 2 VOB files) from an old non-stack exchange post, and it works...
ffmpeg -i "concat:VTS_01_1.VOB|VTS_01_2.VOB" -f DVD -c copy output.mpg
ffmpeg complains sometimes about possible missing timestamps, but I've not seen any issues in the video, audio, or synchronization. This works too with slightly different complaints
ffmpeg -i "concat:VTS_01_1.VOB|VTS_01_2.VOB" -f mpeg -c copy output.mpeg
So I've written a batch file (windows 10) that gathers the number of VOB files I want to process. What I had hoped to do then is create the "concat" string for FFMPEG to process. But I made on by hand just to try like this...
set concat="concat: VTS_01_1.VOB|VTS_01_2.VOB|VTS_01_3.VOB|VTS_01_4.VOB|VTS_01_5.VOB"
Then I tried passing that string to FFMPEG like this in my batch file
ffmpeg -i %concat% -f DVD -c copy output.mpg
Well that doesn't work at all. I guess FFMPEG cant recognize the string variable as a substitute. So I looked up the ffmpeg docs on the "concat" subject, and they suggest using a list of files stored in a text file, like this...
file 'VTS_01_1.VOB'
file 'VTS_01_2.VOB' (etc...)
Then, saving the file as "mylist.txt", and using a call to FFMPEG like this...
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mpg
Well I tried that and it didn't work very well. After the first VOB file, I was getting continuous warnings about buffer underflow and time stamps, and the usually fast concatenation process slowed to a creep. Warnings typically looked like this...
[mpeg @ 00000185e32b4200] buffer underflow st=1 bufi=1466 size=1998
[mpeg @ 00000185e32b4200] Non-monotonous DTS in output stream 0:1; previous: 328415794, current: 9265348; changing to 328415795. This may result in incorrect timestamps in the output file.
So can anyone suggest a method that WORKS as well as my first example, but taking the list of files from an input text file?