[Libav-user] RTMP authentication not working

Kiran kiran at gadgeon.com
Fri Nov 27 14:06:00 CET 2015


Hi,

I am trying to implement RTSP to RTMP restreamer using libav. The 
"ffmpeg" command works OK:

ffmpeg -i "rtsp://localhost:8884/live" -vcodec copy -f rtsp 
"rtmp://user:password@localhost:1935/live/stream"

But I am getting RTMP authentication errors when I do it using libav. 
These are the ways I tried:

avformat_alloc_output_context2(&m_outformat, NULL, "rtsp", 
"rtmp://user:password@localhost:1935/live/stream");
avformat_alloc_output_context2(&m_outformat, NULL, "rtsp", 
"rtmp://localhost:1935/live/stream?user&password");
avformat_alloc_output_context2(&m_outformat, NULL, "rtsp", 
"rtmp://localhost:1935/live?user&password/stream");
avformat_alloc_output_context2(&m_outformat, NULL, "rtsp", 
"rtmp://localhost:1935/live/stream?username=user&password=password");
avformat_alloc_output_context2(&m_outformat, NULL, "rtsp", 
"rtmp://localhost:1935/live?username=user&password=password/stream");
avformat_alloc_output_context2(&m_outformat, NULL, "rtsp", 
"rtsp://user:password@localhost:1935/live/stream")

Can someone please let me know  how I can enable RTMP authentication.

If I remember correctly when I kept "format_name" field as "rtmp", I was 
getting some errorrs.

Regards,
Kiran G


More information about the Libav-user mailing list