Variable framerate/fps input video encoding questions

Nicolas Dufresne nicolas at ndufresne.ca
Fri Jul 19 12:51:11 UTC 2019


Le vendredi 19 juillet 2019 à 07:05 -0500, jles a écrit :
> Hi thanks again for you suggestions and info,
> 
> I did a test recording two files, one at 15fps (plays normal speed) and
> other at 30fps (plays faster) and I printed the generate file timestamps
> running:
> 
> ffprobe output.ts -hide_banner -show_entries
> frame=frame_no,best_effort_timestamp_time -of json
> 
> For an appsrc frame rate of ~15fps (the one which plays at "normal speed")
> shows:
> 
> .......
>             "best_effort_timestamp_time": "3617.935644"
>         },
>         {
>             "best_effort_timestamp_time": "3618.010522"
>         },
>         {
>             "best_effort_timestamp_time": "3618.076589"
> 
> ..............
> 
> If I count the number of frames for each time stamp second there're 15 which
> matches the appsrc 'forced' frame rate, for instance calculating time
> between "3618.010522" and "3618.076589" there's ~15fps, but weirdly there's
> approximately a second between the frame time groups "3617.935644" and
> "3618.010522" ... 
> any idea what is going on? is there any time of latency or delay I have to
> set?
> 
> Now for frame rates > than 15 for instance I tried 30fps (which the
> resulting file plays faster) I've got similar results as with 15fps but with
> a significant difference:
> 
> .........
> 
>             "best_effort_timestamp_time": "3607.971956"
>         },
>         {
>             "best_effort_timestamp_time": "3608.026967"
>         },
>         {
>             "best_effort_timestamp_time": "3608.054644"
> 
> ...........
> 
> Here the problem of the second between group of frames is ~ the same (as
> with the 15fps example) but if we calculate frame rate, it's now ~36fps
> instead 30fps, the number of frames for instance in the "3607.xxxx" time
> group are 30.
> 
> So we've got groups of 30 frames with a time stamp of ~36fps, which I think
> explains why the resulting video plays faster....
> 
> Any idea why this happening? is it related to the mentioned jittery issue?
> it looks quite important difference (30 <-> 36) to be jitter? what could be
> in a simple application like this be causing this?

This looks like buffering effect, just like cars on the high way. They
just bump into each other running slower and out of a sudden everyone
tries to catch up the lost time.

> 
> Just as additional info, in my application I'm only running appsrc callback
> for "feed/need data", should I also mange/add the "enough data"? could it be
> this the reason? 
> 
> Thanks.
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
> 
> 
> 
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190719/60acf2a3/attachment.sig>


More information about the gstreamer-devel mailing list