Viewing RTP/UDP stream with VLC

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
maleen
New Cone
New Cone
Posts: 3
Joined: 11 Nov 2012 08:05

Viewing RTP/UDP stream with VLC

Postby maleen » 11 Nov 2012 08:24

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Viewing RTP/UDP stream with VLC

Postby Rémi Denis-Courmont » 11 Nov 2012 09:51

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

maleen
New Cone
New Cone
Posts: 3
Joined: 11 Nov 2012 08:05

Re: Viewing RTP/UDP stream with VLC

Postby maleen » 11 Nov 2012 10:21

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Viewing RTP/UDP stream with VLC

Postby Rémi Denis-Courmont » 11 Nov 2012 10:41

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

maleen
New Cone
New Cone
Posts: 3
Joined: 11 Nov 2012 08:05

Re: Viewing RTP/UDP stream with VLC

Postby maleen » 11 Nov 2012 16:42

Thank you very much for the explanation.

zimon
Blank Cone
Blank Cone
Posts: 18
Joined: 28 Sep 2011 19:03
VLC version: 3.0.0-git-rpmfusion
Operating System: Linux

Re: Viewing RTP/UDP stream with VLC

Postby zimon » 07 Jun 2017 17:25

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)

DonMcL
Blank Cone
Blank Cone
Posts: 14
Joined: 21 Apr 2017 16:59

Re: Viewing RTP/UDP stream with VLC

Postby DonMcL » 13 Jul 2017 15:27

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

oceanmaster
New Cone
New Cone
Posts: 4
Joined: 03 Aug 2017 19:46

Re: Viewing RTP/UDP stream with VLC

Postby oceanmaster » 03 Aug 2017 20:26

Do any answers ever get answered successfully on this forum?


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 51 guests