[Libav-user] NVENC encoded frames -> RTSP Unicast (please help)

Schat K (Kristen) kristen.schat at movares.nl
Wed Aug 21 14:43:50 CEST 2013


Hi everyone,

I'm new to ffmpeg so please bare with me if the questions are on the basic side.
I've searched hi and low but all examples I've come across seem to be old and use av_open_input_stream (which no longer seems to exist) or do the exact opposite as to what I want like capturing rtsp stream to file.

I'm currently working with NVIDIA's NVENC h264 hardware encoder, currently I have h264 encoded frames coming from the NVENC encoder.
Each frame is already encoded and in memory I wish to send the frames coming from the encoder on to the network via RTSP Unicast only I have no clue where to start.
I'm currently stumbling blindly around in the ffmpeg codebase, as there appear to be multiple ways to do this?

I've got an output context (do I need an input context as I'm not using a file?)
avformat_alloc_output_context2(&fmt_ctx, NULL, "rtsp", NULL);

As I'm not using a file I realized there are a few special things like AVFMT_NOFILE and AVIOContext, do I really need these?

I think I need to mux the frame in memory to rtsp and send it over the network (if that's the correct terms?)

I also saw AVPacket.. can I just put each frame in an AVPacket and send that somewhere? Somehow I don't think that's the right way to go about it.

I'm also guessing I could do something with AVStream and push each frame into that straight after it's encoded?

Please point me in the right direction, the correct workflow would be handy, maybe even an example RTSP streamer with a file source.

Regards,
Kristen

Deze e-mail en de inhoud daarvan is vertrouwelijk. Indien dit bericht niet voor u bestemd is, verzoeken wij u deze e-mail direct aan ons te retourneren en daarna te vernietigen. In dit geval is het ook niet toegestaan deze e-mail en de inhoud daarvan te gebruiken, kopieren of openbaar te maken aan derden. Onze onderneming sluit elke aansprakelijkheid uit in verband met het niet juist, onvolledig of niet tijdig overkomen van de informatie in deze e-mail. Movares Nederland B.V. / Utrecht / Kamer van Koophandel 30124367.

This e-mail and its contents are confidential and may be legally privileged. If this e-mail is not intended for you, please contact us immediately by reply e-mail and destroy the e-mail. In this case, please do not use, copy or disclose the e-mail and its contents to anyone. Our company is liable neither for the proper and complete transmission of the information in this e-mail nor for any delay in its receipt. Movares Nederland B.V. / Utrecht / Chamber of Commerce 30124367.


More information about the Libav-user mailing list