[Libav-user] Overlay filter has incorrect frame rate

Philippe Gorley philippe.gorley at savoirfairelinux.com
Fri Jul 27 19:56:21 EEST 2018


On 2018-07-27 11:24 AM, Brian C. Wiles wrote:
> 
> 
> On 07/27/2018 10:10 AM, Philippe Gorley wrote:
>>
>> Overlay takes frames from each input in timestamp order. It likely
>> overlays two frames when they have matching timestamps. So the fps and
>> setpts filters are necessary if the 2 inputs have different
>> framerates/starting points.
>>
>> The ffmpeg tool likely takes care of this for you.
>>
>> Cheers,
>>
>    That's what I wondered.  So, if I specify the right fps and setpts
> combinations, it should work fine?  I thought the overlay filter was
> supposed to add and drop frames as needed.  Also, do I specify the frame
> rate of the overlaid video or the bottom one?  Thanks!

I usually use the higher fps of the two, so if in1 is 30 fps and in2 is 
15, I'd use something like:
[in1] setpts=PTS-STARTPTS [m]; [in2] setpts=PTS-STARTPTS, fps=30 [o]; 
[m] [o] overlay=... [out]

> 
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
> 

-- 
Philippe Gorley
Free Software Consultant | Montréal, Qc
Savoir-faire Linux


More information about the Libav-user mailing list