Saturday, February 02, 2013

How to combine multiple .flv files into one

Sometimes you download .flv files in parts e.g. Presentation_Part1.flv Presentation_Part2.flv but you would like to see the whole presentation using one file. After searching I found this thread on Ubuntuforums.

The forum post suggests to convert the .flv files to .mp4 files by using the following command:
$ for f in *.flv; do ffmpeg -i "$f" -vcodec copy -acodec copy "${f%.flv}.mp4"; done

By using the above command the 1.flv, 2.flv, 3.flv get converted to 1.mp4, 2.mp4, 3.mp4 etc.

The *.mp4 files get combined into test.mp4 by using following command:
$ MP4Box -add 1.mp4 -cat 2.mp4 -cat 3.mp4 -cat test.mp4

No comments:

Air India direct flight to San Fransisco has flown through China today.

 My sister in law left for San Fransisco by AI 173 flight which flows over North Pole. I tracked that flight on flightstats.com till it land...