[FFmpeg-user] how to use overlay + amix

mail list maillist35650 at gmail.com
Tue Nov 18 14:54:41 CET 2014


Is someone can help me?

I'm trying to make one short video from an other video by taking 2 extracts
with synchro audios and crossfading effect.
I tried several ways and finally the best result is as following:

./ffmpeg -loglevel info -y -f lavfi -r 30 -i color=black at 1 \ -ss 30 -i
/1024/video/rush.mp4 \ -ss 1220 -i /1024/video/rush.mp4 \ -filter_complex "
\ [0:v]scale=640x480[bg]; \
; \ [2:v]scale=640x480,fade=t=in:st=0:d=3:alpha=1,setpts=PTS-STARTPTS+27/TB
[vout2] ; \ [bg][vout1]overlay[clip2];[clip2][vout2]overlay,
trim=duration=60[vclip3] ;\ [1:a]atrim=start=0:end=30, asetpts=PTS-STARTPTS
[aout1]; \ [2:a]atrim=start=0:end=33, adelay=27000|27000,
asetpts=PTS-STARTPTS+27/TB [aout2]; \
asetpts=PTS-STARTPTS+30/TB[aclip] \ " -strict -2 -c:v h264 -b:a 96k -map
[vclip3] -map [aclip] result.mp4
"PTS-STARTPTS+30/TB" is the only way I found to avoid dopping frames.

Any idea to get the right command line?

More information about the ffmpeg-user mailing list