Sunday 12 October 2008

Merge two avi parts into one.

I've lost count of how many times i've had to fish out this command from some script or other to give to someone over at ubuntu forums to help them out. It's not that its ingenious or anything, but more that the first thing someone tries when they want to merge a split movie is cat. cat's great for a lot of things, but video isnt one of them. it usually spits out a file that's the size of movie_cd1.avi + movie_cd2.avi, but with only the video from movie_cd1. especially annoying when you only find out halfway through watching it :p

This below has served me well and if i post it here i dont have to go fishing around my hard drive for it ever again. The -forceidx flag usually solves audio sync issues that can arise and works about 95% of what i throw at it.
mencoder -forceidx -oac copy -ovc copy -o out.avi cd1.avi cd2.avi

No comments:

Post a Comment