Page 1 of 1

Viewing RTP/UDP stream with VLC

Posted: 11 Nov 2012 08:24
by maleen
Hello,

I'm trying to view a RTP over UDP stream with VLC.
I have an iptv connection with a provided set top box that can only be viewed on a tv. I'm trying to view on my computer instead.

I have checked with wireshark for the incoming packet types and it seems they are using multicast ip 226.11.3.6 on UDP port 6000. They are also using RTP within which the MPEG2- Transport stream packets are found.
To view this with VLC, i tried to connect to the network stream udp://226.11.3.6:6000, however nothing is displayed.
i tried rtp://226.11.3:6000, but then an error message popped syaing "SDP required: A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (96)."

Can you help me to diagnose the reason?

Note : I used a packet capture library to strip all IP/UDP/RTP headers and saved only the video elementary stream coming in to a file. I could view this on another video player though. So there is no question about scrambling as such. I am trying to see if I can view the stream simply with VLC instead.

Thanks

Re: Viewing RTP/UDP stream with VLC

Posted: 11 Nov 2012 09:51
by Rémi Denis-Courmont
As the error message says, you need an SDP. VLC cannot guess the codec parameters out of the blue.

That stream is NOT normal MPEG2-TS over RTP.

Re: Viewing RTP/UDP stream with VLC

Posted: 11 Nov 2012 10:21
by maleen
Remi,
Thanks for your reply.
How do you get an SDP? Is it something that comes from iptv server at the connection set up stage?
At the moment, I am setting up STB with the correct channel, then plug the ethernet cable from STB to the computer, and then open the stream.

Also, can you please clarify why do you say that it is not normal MPEG2-TS. I was under the impression that it is the standard.

Thank you very much

Re: Viewing RTP/UDP stream with VLC

Posted: 11 Nov 2012 10:41
by Rémi Denis-Courmont
Depending on the network, the SDP might come through the SAP service, or it might not.

MPEG2-TS over RTP normally uses payload format number 33, not 96.

Re: Viewing RTP/UDP stream with VLC

Posted: 11 Nov 2012 16:42
by maleen
Thank you very much for the explanation.

Re: Viewing RTP/UDP stream with VLC

Posted: 07 Jun 2017 17:25
by zimon
OK, solved this already:

For sending:

Code: Select all

vlc 'test.m4v' :sout=#transcode{vcodec=h264}:"rtp{dst=224.0.0.8,port=5004,mux=ts}"
and it worked. So was missing "mux=ts"

WAS:
I had the same problem. How to broadcast a valid SDP with RTP sout?

For sending, I am using:

Code: Select all

vlc -vv 'test.m4v' :sout=#transcode{vcodec=h264}:"rtp{dst=224.0.0.8,port=5004}"
VLC media player 3.0.0-git Vetinari (revision 2.2.0-git-10582-g9eb9eb0bd2)
[0000557d0e4151c8] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007f2960006498] x264 encoder: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[00007f2960006498] x264 encoder: profile High, level 3.0
[00007f2960006498] x264 encoder: using SAR=13107/9235
[00007f2960006498] x264 encoder: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[00007f2960006498] x264 encoder: profile High, level 3.0
...
00007fc078000fa8] stream_out_rtp stream out debug: sdp=
v=0
o=- 15916442759346664710 15916442759346664710 IN IP4 localhost
s=Unnamed
i=N/A
c=IN IP4 224.0.0.8/255
t=0 0
a=tool:vlc 3.0.0-git
a=recvonly
a=type:broadcast
a=charset:UTF-8
m=audio 5004 RTP/AVP 96
b=RR:0
a=rtpmap:96 mpeg4-generic/48000/2
a=fmtp:96 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=1190; SizeLength=13; IndexLength=3; IndexDeltaLength=3; Profile=1;
m=video 5006 RTP/AVP 96
b=RR:0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=64001e;sprop-parameter-sets=Z2QAHqzZQLQSb/zMzJBNqCgIKgAACEwAAZ2FHixbLA==,aOvjyyLA;

I can see with tcpdump there is UDP packets coming from that multicast address. Firewall lets them in. (5004/udp and 5006/udp)

But viewing that stream with vlc fails:

Code: Select all

$ vlc rtp://224.0.0.8:5004/
VLC media player 3.0.0-git Vetinari (revision 2.2.0-git-10582-g9eb9eb0bd2)
[000055abd823c1c8] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007fdd2c000e98] rtp demux error: unspecified payload format (type 96)
[00007fdd2c000e98] rtp demux: A valid SDP is needed to parse this RTP stream.
So how to broadcast "a valid SDP" with vlc when streaming through RTP?

Over HTTP it worked:
sender:

Code: Select all

vlc 'test.m4v' :sout=#transcode{vcodec=h264}:http{dst=:8080/go.mpg}
receiver:

Code: Select all

vlc http://sender-local-ip:8080/go.mpg
(I am using Linux Fedora 24)

Re: Viewing RTP/UDP stream with VLC

Posted: 13 Jul 2017 15:27
by DonMcL
Currently on our development network I am able to send/receive with no problems using the following setup:

Sending from Ubuntu vlc version 2.0.8 with the command: vlc -vvv long*.mp4 --sout '#rtp{mux=ts,dst=DEST_IP_ADDRESS,sdp=sap,name="TestStream"}'
Receiving on Windows7 vlc version 2.2.5.1 using: vlc -vvv rtp://

I have switched to using vlc on Windows 10 machines.

Sending from vlc 2.2.4 with the same command as above: vlc -vvv long*.mp4 --sout '#rtp{mux=ts,dst=DEST_IP_ADDRESS,sdp=sap,name="TestStream"}'
Receiving using vlc 2.2.6 with the same command as above: vlc -vvv rtp://

Using Wireshark I can see that the RTP/RTCP packets are arriving at the destination machine on udp ports 5004 and 5005.

I already have the mux=ts which other messages reported is needed.
What do I need to add to change to enable vlc to send/receive mp4 videos via RTP to a unicast destination IP?

Thanks,
Don

Re: Viewing RTP/UDP stream with VLC

Posted: 03 Aug 2017 20:26
by oceanmaster
Do any answers ever get answered successfully on this forum?