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 <[email protected]> wrote: > On Thu, 20 Oct 2016 14:46:56 +0200 > Martin Ždila <[email protected]> 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:[email protected] http://www.zdila.sk/ _______________________________________________ ffmpeg-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
