Overlay Video com ffmpeg Tem muita queda

1

eu só uso esse código fundado em Sobreposição de vídeo e inserção de loop de fundo de vídeo com ffmpeg

ffmpeg -i main.mp4
   -vf "movie=bg.mp4:loop=200,hue=s=0[bg];
       [in]setpts=PTS/2,scale=iw/2:-1,pad=iw+20:ih+20:10:10:color=yellow[m];
       [bg][m]overlay=shortest=1:x=(W-w)/2:y=(H-h)/2"
   -af "atempo=2.0,volume=1.5" -c:v libx264 completed.mkv

mas recebo muitos quadros perdidos:

frame=  578 fps= 14 q=24.0 size=   30585kB time=00:00:19.24 bitrate=13019.6kbits/s dup=0 drop=499 speed=
frame=  578 fps= 13 q=24.0 size=   30585kB time=00:00:19.24 bitrate=13019.6kbits/s dup=0 drop=525 speed=0.448
frame=  578 fps= 13 q=24.0 size=   30585kB time=00:00:19.24 bitrate=13019.6kbits/s dup=0 drop=553 speed=0.443x
Past duration 0.999992 too large
frame=  579 fps= 13 q=24.0 size=   30585kB time=00:00:19.24 bitrate=13019.6kbits/s dup=0 drop=577 speed=0.438x
frame=  579 fps= 13 q=24.0 size=   30585kB time=00:00:19.24 bitrate=13019.6kbits/s dup=0 drop=609 speed=0.433x
frame=  579 fps= 13 q=24.0 size=   30585kB time=00:00:19.24 bitrate=13019.6kbits/s dup=0 drop=637 speed=0.428x
frame=  579 fps= 13 q=24.0 size=   30585kB time=00:00:19.24 bitrate=13019.6kbits/s dup=0 drop=670 speed=0.423x
frame=  579 fps= 13 q=24.0 size=   30585kB time=00:00:19.24 bitrate=13019.6kbits/s dup=0 drop=701 speed=0.418x
frame=  579 fps= 12 q=24.0 size=   30585kB time=00:00:19.24 bitrate=13019.6kbits/s dup=0 drop=728 speed=0.414x
frame=  579 fps= 12 q=24.0 size=   30585kB time=00:00:19.24 bitrate=13019.6kbits/s dup=0 drop=756 speed=0.409x
frame=  579 fps= 12 q=-1.0 Lsize=   35007kB time=00:00:19.29 bitrate=14863.5kbits/s dup=0 drop=783 speed=0.406x
    
por Marwane Boukbal 21.02.2017 / 22:05

1 resposta

0

Use

ffmpeg -i main.mp4
-filter_complex "movie=bg.mp4:loop=200,setpts=N/FRAME_RATE/TB[bg];
   [0]scale=iw/2:-1,pad=iw+20:ih+20:10:10:color=yellow[m];
   [bg][m]overlay=shortest=1:x=(W-w)/2:y=(H-h)/2"
-c:v libx264 completed.mkv

Você pode ter que ajustar os argumentos da escala com base nos tamanhos relativos de seus vídeos.

    
por 22.02.2017 / 11:45

Tags