Page 1 of 1

--sout-rtp-port-video and other port assignments not working

Posted: 11 May 2014 18:14
by NewtownGuy
I'm trying to control the ports used by rtsp and rtp, but cannot. I use this command:

Code: Select all

raspivid -o - -t 0 -w 640 -h 480 -p 0,0,640,480 -b 0 -fps 5 | cvlc -vvv stream:///dev/stdin --noaudio --sout '#rtp{sdp=rtsp://:8554}' --sout-rtp-port=8555 --sout-rtp-port-video=8556 --sout-rtp-port-audio=0 --sout-rtp-rtcp-mux --rtcp-port=8557 --h264-fps=5.0 :demux=h264
What I really want is port 8554 tcp for rtsp control, and port 8554 udp for rtp video, every time, for all connections. I tried setting different port variables to different ports in cvlc, and checking the port usage with 'netstat -nap', but clvc keeps assigning pairs of ports (audio + video) for each client connection, in the range of 30,000 to 60,000, rather than the ones I specified. clvc ignores all of the ports I specify except the first one.

I'm also having problems with video streams at 5 fps instead of 30 fps. I see 'ES_OUT_SET... is called too late', and 'ES_OUT_RESET_PCR_CALLED' messages. It's as if there are two slightly different time bases, one for video and one for clvc, that cause buffering problems. But why isn't clvc just wrapping the H264 video stream in RTP as the data is fed to cvlc from raspivid ?

What command string should I use to fix these problems ?

Thank you.

Re: --sout-rtp-port-video and other port assignments not wor

Posted: 12 May 2014 10:16
by RĂ©mi Denis-Courmont
RTP port options are for plain RTP, i.e. mostly multicast. The destination ports for RTSP Obviously in the case of RTSP, the destination RTP ports are specified by the RTSP client; the server cannot control them.

Re: --sout-rtp-port-video and other port assignments not wor

Posted: 12 May 2014 19:44
by NewtownGuy
I'm not married to rtsp and rtp. I just need to access the video stream through a single router port, which is why I've been trying to control RTP port assignments by the server. But I'm not having any luck with http and tcp, either. I have all the latest updates on my RPi. I'm using the latest version of VLC Media Player on my Vista Home Premium PC.

I'm using this command to create the stream on the RPi server:

raspivid -o - -t 0 -fps 5 -w 640 -h 480 -p 0,0,640,480 | cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8554}' --h264-fps=5.0

But, all I see in VLC Media Player is light gray images with a few small blocks of colors. And, starting a few seconds after I start the server, there's a steady stream of warnings on it: main mux warning: late buffer for mux input. There are also error messages every few seconds: main_input_error and ES_OUT_SET... and ES_OUT_RESET. Both times below the video are always at 00:00, but the progress bar advances from left to right.

What's wrong and how do I fix it ?

Thanks.