[FFmpeg-user] RTSP stream fps 29.97 instead of 30
Carl Eugen Hoyos
ceffmpeg at gmail.com
Thu Oct 5 09:48:34 EEST 2017
2017-10-04 23:20 GMT+02:00 Mark Thompson <sw at jkqxz.net>:
> On 03/10/17 21:22, Jonathan Viney wrote:
>> On Tue, Oct 3, 2017 at 1:56 PM, Mark Thompson <sw at jkqxz.net> wrote:
>>> On 03/10/17 00:56, Jonathan Viney wrote:
>>> This SPS in the SDP decodes with:
>>> @126 VUI: timing_info_present_flag 1 (
>>> @127 VUI: num_units_in_tick
>>> 00000000000000000000001111101001 (1001)
>>> @159 VUI: time_scale
>>> 00000000000000001110101001100000 (60000)
>>> @191 VUI: fixed_frame_rate_flag 1 (
>>> That is, the H.264 stream indeed has a fixed framerate of 60000/1001/2 ~
>>> 29.97fps, and that is what ffmpeg is reading - the RTSP layer is likely
>>> lying about it. (You may be able to count frames to check that.)
>>> If you want an exactly 30fps output then you should tell the camera to
>>> generate a 30fps stream rather than the 30000/1001fps it currently is.
>> Thanks Mark. That's interesting, I'll see if there is a way to adjust the
>> stream from the camera.
>> How did you decode the data from the sprop-parameter-sets value?
> It's just the SPS and PPS base64 coded: decode the base64,
> add start codes, feed it to any H.264 stream parser.
My question would have been:
Where can I find any H.264 stream parser?
Thank you, Carl Eugen
More information about the ffmpeg-user