Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question
    
It's worth posting that final edition and solution, as an answer and accepting it. –  barlop Jul 20 '11 at 21:59
    
I didn't even realize you could answer your own question. Thanks and done! –  James Smith Jul 22 '11 at 0:39
add comment

5 Answers

up vote 1 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
    
I'm trying to script this up, is there a command line interface? Their documentation seems to be a little lacking. –  James Smith Jul 10 '11 at 21:08
add comment

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.

share|improve this answer
    
he said command line in his edit –  barlop Jul 11 '11 at 0:42
    
Which was made after I answered. –  Yitzchak Jul 11 '11 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 '11 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 '11 at 14:40
add comment

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

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.