[Live-devel] rtsp proxy from ffmpeg

Специалист IT wolverin at factorial.ru
Wed Sep 7 07:07:49 PDT 2022


Hello!

I have done heavy transcoding from usb mjpeg camera to h264 in my code 
and now streaming to a third-party rtsp server (for example to 
rtsp-simple-server) using ffmpeg libraries
On the command line, it looks something like

./ffmpeg -f v4l2 -input_format mjpeg -i /dev/video0 -c:v libx264 -f rtsp 
-rtsp_transport udp rtsp://127.0.0.1:554/cam

But I need my own rtsp server.
I tried using the live555ProxyServer.cpp code, but I get errors

ffmpeg:
[rtsp @ 0x149c890] method ANNOUNCE failed: 405 Method Not Allowed
Could not write header for output file #0 (incorrect codec parameters 
?): Server returned 4XX Client Error, but not one of 40{0,1,3,4}

live555ProxyServer:
Error occurred when opening output stream: -1482175736 Server returned 
4XX Client Error, but not one of 40{0,1,3,4}

Created new TCP socket 6 for connection
Connecting to 127.0.0.1, port 554 on socket 6...
...remote connection opened
Sending request: DESCRIBE rtsp://127.0.0.1:554/cam RTSP/1.0
CSeq: 2
User-Agent: ProxyRTSPClient (LIVE555 Streaming Media v2022.07.14)
Accept: application/sdp

Received 79 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 404 Stream Not Found
CSeq: 2
Date: Tue, Sep 06 2022 07:55:43 GMT

ProxyRTSPClient[rtsp://127.0.0.1:554/cam]: RTSP "DESCRIBE" command 
failed; trying again in 1 seconds
……….

When using the compiled version, I realized that live555ProxyServer does 
not listen, but connects to another server itself
Please help me figure out how to make proxying from ffmpeg ???

Thank you in advance, even if you tell me which example to watch!


More information about the live-devel mailing list