[FFmpeg-user] Video processing stopped prematurely on resolution change
Martin Ždila
m.zdila at gmail.com
Fri Oct 21 15:23:06 EEST 2016
Thanks Lou! Looks like hstack filter doesn't have a problem with the video
changing dimensions :-)
Now I have a problem to add logo. I've tried following command but the
output is empty:
ffmpeg -y -i a.webm -i b.webm -i logo.png -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];
[v][2:v] overlay=10:10:shortest=0 [o]" \
-map "[o]" output.mp4
When I remove shortest=0 then ffmpeg never ends.
Regarding weird timestamps - I agree, they are weird but I can do nothing
with it. It is a raw output from WebRTC stream.
On Thu, Oct 20, 2016 at 9:27 PM, Lou <lou at lrcd.com> wrote:
> 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
>
--
Ing. Martin Ždila
tel:+421-908-363-848
mailto:martin at zdila.sk
http://www.zdila.sk/
More information about the ffmpeg-user
mailing list