[FFmpeg-user] multple video filters in a single pass

gheine at mathnmaps.com gheine at mathnmaps.com
Mon Mar 4 23:56:33 CET 2013


Hello -

Using ffmpeg version git-2012-10-26-9f36ec6 .

I have a video (from a camera turned sideways), dimensions 1920x1080.  
Ultimate
goal is to combine it with some other videos and write to NTSC-DVD.
  Was able to rotate 90 degrees counterclockwise  and scale it to 
270x480
(the largest size that preserves the 1080x1920 aspect ratio and fits 
into
an NTSC standard 720x480 frame):

ffmpeg -i IMG_0036.MOV -vf "scale=480:270,transpose=2"  -acodec copy 
tmp.mkv

I then wanted to overlay this against the middle of a blank 720x480 
frame

convert -size 720x480 xc:brown4 bg.png
ffmpeg -loop 1 -i bg.png -vcodec png -t 2 bg.mkv
ffmpeg -i bg.mkv -vf "movie=tmp.mkv [bg]; [in][bg] 
overlay=(main_w-overlay_w)/2:0 [out]" out.mkv

This works, but is there a way to combine the rotate, scale, and 
overlay filters in a single command?
Have tried things like

ffmpeg -i IMG_0036.MOV -i bg.mkv -vf:0:v 
"scale=480:270,transpose=2[out]" -filter_complex '[1:v] scale=480:270, 
transpose=2[new]; [1:v][new]overlay=0:0'  -acodec copy output.mkv

but either get the overlay backwards (the blank file on top, obscuring 
the other video) or messages about the overlay area being the wrong 
dimension.

Seems like a simple problem, but can't seem to get it right.  Any help 
would be appreciated.







More information about the ffmpeg-user mailing list