If you have MP4 files, these could be losslessly concatenated by first transcoding them to MPEG-2 transport streams. Note: had tried some solutions in this thread and none satisfied me If test -f "$outputfile" then echo "$outputfile created" fi i <(for f in $inputfiles do echo "file '$PWD/$f'" done) \ # -y: automatically overwrite output file if exists If -1} # Get the last - 1}) # Get all arguments besides last one as array #if no arguments we take all mp4 in current directory as array # mergemp4 video1.mp4 video2.mp4 output.mp4 # mergemp4 #merges all mp4 in current directory # Merge mp4 files into one output mp4 file One-liner solution using ls ls video1.mp4 video2.mp4 | while read line do echo file \'$line\' done | ffmpeg -protocol_whitelist file,pipe -f concat -i -c copy output.mp4įunction which takes 0 or 2+ arguments # Here 2 pure bash solutions using only ffmpeg and not using Don't try using it on the command line, because it only works in a batch file! This works on Windows 7, in a batch file. If what you were looking for is a method for specifying all the mp4 files in the current folder without a lot of retyping, try this in your Windows batch file instead ( MUST include the option -safe 0): :: Create File Listįor %%i in (*.mp4) do echo file '%%i'> mylist.txtįfmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4 It will typically take less than ten seconds to run. The batch file, and ffmpeg.exe, must both be put in the same folder as the. Then I created a simple batch file (concat.bat), with the following contents: :: Create File Listįfmpeg -f concat -i mylist.txt -c copy output.mp4 I renamed the files (as file1.mp4, file2.mp4, file3.mp4) such that the parts were in the correct order for viewing the complete tv episode. mp4 video files) the following was an effective solution for Windows 7, and does NOT involve re-encoding the files. mp4 files (which I obtained from : a 50 minute tv episode, downloadable only in three parts, as three.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |