[FFmpeg-user] Frame rates and video accelerated

Cristiano Chieppa cristiano.chieppa at gmail.com
Sat Feb 7 18:05:29 CET 2015


Dear Users,
I’m newbie with FFMpeg so, apologize if the question is trivial for you.
I’m getting a raw H264 bitstream  (in C++) via RTSP from IP camera (really I’m using many models). I haven’t the audio.

I save the raw frames (NALs) in a file (some frames grabbed from a camera) and I invoke the ffmpeg from the sw - like a batch program - to encode the raw H264 in MP4.

The conversion works well.

Sometimes, under circumstance that I’m not able to understand,  I see that the generated mp4 video is like “accelerated”: the speed is very fast compare with the real stream.

I’m struggling with this behavior and I’m trying to understand why. I tried to find on Google other questions like the mine without find a good answer.

If I well understand (please, kindly correct me), raw H264 doesn’t contain the timestamp of the frames: should be responsibility of the container.
Furthermore, the streaming from IP camera should  not at constant frames per rates, so their duration could be very different (again, please correct me).

During the grabbing of the NALs (I’m using Live555) I get the timestamps too from RTP: I save these in another file.

Is there a way to invoke ffmpeg and tell him, as a parameter, the timestamp of each grabbed frames to get the real synchronized video?

Or, better, does someone met this problem and solved?

I’m sure that I wrong something.

I’m very confused.

Thank you

Cristiano




More information about the ffmpeg-user mailing list