PDA

View Full Version : Combine videos with mencoder



daviddoria
6th April 2009, 09:53 PM
I'm trying to concatenate a bunch of videos in a directory. I've used this before:


mencoder -of mpeg -nosound -ovc lavc -lavcopts vcodec=mpeg2video -o combined.mpg *


but I'm getting 'New video file has different resolution or colorspace than the previous one". I'm assuming thats because they aren't all the same size, etc. Is there anyway to tell it "convert with padding" to make them all the same size by padding with black space? Or is there a better way to do this?

Thanks,
Dave

Lindy
7th April 2009, 09:44 AM
I generally do my vid's to dvd format==>format=dvd -vf scale=720:480 . Are the vid's you're trying to do all the same aspect ratio? If not that may cause some problems...

daviddoria
7th April 2009, 11:54 AM
No they're not. I'd like it to work for arbitrary input videos. Windows Movie Maker seems to deal with this without a problem, I can just "drag and drop" the videos into a timeline and it magically does exactly what I'm looking for... seems odd that I can't do it at all in linux.

kromberg
7th April 2009, 03:47 PM
Both mencoder and ffmpeg need to have the source files be in the same audio and video formats to concat them. You need to do that first, before you can concat them. Some of the GUI frontends for mencoder and ffmpeg will do that for you.