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?
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: http://www.cardinalpeak.com/blog/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.