Does raw H264 data (stripped from an RTP stream) contain information about the framerate?

Or is the framerate derived either from RTP timestamps for stream reproduction or written the container files (avi, mkv...) when playing a video from a file?


1 Answer 1


RTP is just a protocol for data transfer, it doesn't contain any specific information about the internals of the data transmitted.

The information should be contained in the .h264 stream. The SPS (Sequence Parameter Set) is what you want to look at, it should contain all the meta information you need. Here is a very nice detailed look at how the SPS is set up: https://www.cardinalpeak.com/the-h-264-sequence-parameter-set/

Though in theory you should be able to just mux this into a mp4 and it should play fine.

  • The motivation for the question was reading somewhere on the web (can't locate the references) that the playback of raw h264 data requires a value for the frame rate to be specified. Example. mplayer H264-media-1.264 -fps 24 Jun 4, 2014 at 14:03
  • Like it says in the article, the framerate can somtimes not be present in the SPS. I do not know the reason for that but in that case you will have to specify the framerate.
    – timonsku
    Jun 4, 2014 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.