3

I've downloaded a set of Youtube Videos that are part of the same episode. Currently I've tried converting them into mp4 using ffmpeg and then joining with MP4Box.

for f in *.flv; do ffmpeg -i "$f" -vcodec copy -acodec copy "${f%.flv}.mp4"; done
MP4Box -cat part0.mp4 -cat part1.mp4 -cat part2.mp4 -cat part3.mp4 -cat part4.mp4 -new  video.mp4

However, upon joining with MP4Box opening the video in VLC does strange things. It seems create a video that has 3 different videos playing at the same time. Upon inspection, the videos have different bitrates and framerates, is this causing the problem?

Therefore, I'd like to re-encode the videos so that they are all the same and then joining them. Or is there a better way of accomplishing what I want?

Edit: I should have mentioned, I'd like to do this on the command line, as I want to semi-automate this process. Thanks!

Edit2: Seems like people are having similar problems as me with MP4Box. Sources:1 and 2. Then I tried avidemux, and it will merge them correctly but the audio is accelerated which is also cited here.

Final Edit and Solution: I followed the advice in this thread and converted the videos to mkv first, and then joined using mkvmerge, which worked great! Thanks!

2
  • It's worth posting that final edition and solution, as an answer and accepting it.
    – barlop
    Jul 20, 2011 at 21:59
  • I didn't even realize you could answer your own question. Thanks and done! Jul 22, 2011 at 0:39

6 Answers 6

1

I followed the advice in this thread and converted the videos to mkv first, and then joined using mkvmerge, which worked great! Plus it's faster than the aforementioned software.

0

Did you give openshot a try? It's a free (as in speech) video editor for Linux.

OpenShot Video Editor is a free, open-source video editor for Linux licensed under the GPL version 3.0.

OpenShot can take your videos, photos, and music files and help you create the film you have always dreamed of. Easily add sub-titles, transitions, and effects, and then export your film to DVD, YouTube, Vimeo, Xbox 360, and many other common formats.

So if you're using ubuntu for example, it can join the videos for you easily.

2
  • I'm trying to script this up, is there a command line interface? Their documentation seems to be a little lacking. Jul 10, 2011 at 21:08
  • When I tried using with my 1080p 60fps recordings it seemed very imprecise, clunky and it crashed. :(
    – Kissaki
    Aug 29, 2016 at 23:27
0

I'd recommend the bare-bones video editors of most operating systems. In Ubuntu, Pitivi (the most basic of functionality); in Windows, Windows movie maker; in OSX, iMovie. You can open a project, import and join whichever clips you want, and export it to your desired format.

4
  • he said command line in his edit
    – barlop
    Jul 11, 2011 at 0:42
  • Which was made after I answered.
    – Yitzchak
    Jul 11, 2011 at 14:40
  • Yes i'm not blaming you. But it still makes your answer somewhat irrelevant, but I suppose you may as well leave it unless you can add anything in an edit that is better.
    – barlop
    Jul 11, 2011 at 16:40
  • You're right, it is somewhat irrelevant, but I might as well leave it -- don't have anything else to add, and it might help somebody else who doesn't need the command line.
    – Yitzchak
    Jul 20, 2011 at 14:40
0

I would try Avidemux - it also has CMD interface, but I never used it. However, Avidemux always had good results as I needed it. :-)

0

The ffmpeg faq describes how to join video files. I don't know if this will solve the problem for you, but you may find it useful: How to join video files

0

You can use the ffmpeg concat filter to concatenate multiple video files.

-filter_complex concat=n=%2:a=1

For example

ffmpeg -i vid1.flv -i vid2.flv -filter_complex concat=n=2:a=1 out.mp4

Note that the n parameter specifies the number of video files in this case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .