Use libavformat to write raw MPEG4 from raw RTP data

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Use libavformat to write raw MPEG4 from raw RTP data

Flipp
Hello,

from an IP camera, I get a MPEG4 Stream over RTP. This stream, as well as the preceding RTSP communication gets logged by an external hardware. This means I am actually not reading from a real RTP stream as far more I am reading the raw data out of it.

In my data I have the SDP Information ( e.g. the config field ) and also I have all the RTP messages. As far as I know I need to parse all RTP frames for their Marker Bit and put always one whole Frame ( until Marker Bit = 1 ) into a buffer and then pass it to the lib.
Now my problem is that I need some kind of example to get my mp4 file written - all examples I found are accessing a file. I just can't find out which functions I would need and how I would pass the data appropriately to them. Maybe you could supply me with some links or examples.

Regards