[FFmpeg-user] Syntax for merging + positioning two video streams in .mp4 container

Emre K letheea at gmail.com
Tue Sep 18 09:04:18 CEST 2012


yes it's possible . You can do it with the pad filter and the secondly
overlay .
ffmpeg -i  firstInput.mp4 -vf "[in]
pad=2*iw:ih:FromLeftPaddingInteger:FromTopPaddingInteger , scale=iw/2:ih/2
[firstOne]; movie=secondInput.mp4 , scale=iw/2:ih/2 [secondOne];
[firstOne][secondOne] 
overlay=theSecondVideoPositioningFromLeft:theSecondVideoPositioningFromTop "
out.avi
i.e

ffmpeg.exe -i double1.avi -vf "[in] scale=iw/2:ih/2, pad=2*iw:ih [left];
movie=double2.avi, scale=iw/2:ih/2 [right]; [left][right] overlay=main_w/2:0
[out]" -f flv rtm...
here is 
iw = input video width
ih = "" "" height
main_w = main screen width
main_h = main screen height
movie is the second source
left and right is the parameter that you describe , tag .
overlay is the filter
first video padding information can be written pad:THE GENERAL OVERLAY WIDTH
: HEIGHT  : FIRST VIDEO WIDTH : SECOND VIDEO HEIGHT.
If you want Top and Bottom View you can do this in this way



-----
what does not kill you make you stronger .
FFMPEG can do it 
--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Syntax-for-merging-positioning-two-video-streams-in-mp4-container-tp4653506p4653528.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list