Log in

View Full Version : ffmpeg crop


Delta2
23rd February 2006, 11:52
Hi,

Anyone uses FFMPEG to convert MPEG-2 to AVI ?

I can't remove black bars from the source at top and bottom before encoding, croping and resizing to AVI

I give this command :

ffmpeg.exe -i "multiplex.mpg" -f avi -vcodec mpeg4 -b 544 -s 640x272 -padtop 0 -padbottom 0 -croptop 0 -cropbottom 0 -acodec mp3 -ab 128 my_movie.avi

-croptop and -cropbottom doens't cut that black bars

I'm looking for other alternatives (NOT GUIs) , some said this :

"I typically use DGIndex + DGDecode.dll + AviSynth + VirtualDub."

where can I get DGIndex and DGDecode ?

mod
23rd February 2006, 12:08
http://neuron2.net/dgmpgdec/dgmpgdec.html

foxyshadis
24th February 2006, 04:43
I give this command :

ffmpeg.exe -i "multiplex.mpg" -f avi -vcodec mpeg4 -b 544 -s 640x272 -padtop 0 -padbottom 0 -croptop 0 -cropbottom 0 -acodec mp3 -ab 128 my_movie.avi

-croptop and -cropbottom doens't cut that black bars
That's silly, why would you call it without specifying a crop amount? 0 means "don't crop", you have to use 66 or 81 or whatever your black space measures. An alternative if you don't know ahead of time is the avisynth filter autocrop; you can generate it and use many command-line tools to process it (or makeavis), or possibly even feed ffmpeg with an avisynth directly.