[Libav-user] Streaming an AVPacket over RTP with Libav

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] Streaming an AVPacket over RTP with Libav

Philippe Noël
Hello,

I have a server-client model in C where I encode a frame as H.264 with libx264 on the server and stream it over a UDP socket to the client, where it gets received and decoded with libx264 (using libav for encode+decode).

I see libav has RTP features implemented. I would like to stream RTP instead of raw UDP to help reduce out-of-order packets. I could not find example code online on how to use these fonctions. Do I use them to "wrap" the AVPacket? Some guidance and example code for streaming an AVPacket as RTP over a UDP socket in C would be very appreciated. 

Cheers,

Philippe

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Streaming an AVPacket over RTP with Libav

Yurii Monakov
Hello,

> I could not find example code online on how
You can just create AVFormatContext with appropriate url (e.g. rtp://...) and ffmpeg will do the rest. Please look at muxing example (doc/examples) for the reference.

Yurii


_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".