[FFmpeg-user] Video processing stopped prematurely on resolution change
Lou
lou at lrcd.com
Thu Oct 20 22:27:09 EEST 2016
On Thu, 20 Oct 2016 14:46:56 +0200
Martin Ždila <m.zdila at gmail.com> wrote:
> Even simpler example to reproduce the problem using just one file from the
> referenced tarball:
>
> ffmpeg -y -i b.webm -filter_complex "
> color=color=black:size=320x240 [bg];
> [0:v] setpts=PTS-STARTPTS,
> scale=320x240:force_original_aspect_ratio=decrease [main];
> [bg][main] overlay=x=160-overlay_w/2:shortest=1" \
> -c:v libx264 -preset slow output.mp4
I didn't look into the weirdness of your timestamps, frame rate, and
timebase, but you can eliminate the color source and the overlays by
using pad and hstack instead. Should be faster and simpler:
ffmpeg -i a.webm -i b.webm -filter_complex \
"[0:v]fps=25,scale=320x240:force_original_aspect_ratio=decrease,pad=320:240:(ow-iw)/2:(oh-ih)/2[l]; \
[1:v]fps=25,scale=320x240:force_original_aspect_ratio=decrease,pad=320:240:(ow-iw)/2:(oh-ih)/2[r]; \
[l][r]hstack=inputs=2:shortest=1[v]" \
-map "[v]" output
More information about the ffmpeg-user
mailing list