Receiving an RTP stream coded in H264

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
manubot
New Cone
New Cone
Posts: 6
Joined: 05 Jun 2008 18:31

Receiving an RTP stream coded in H264

Postby manubot » 05 Jun 2008 18:45

Hi,

I have a camera that streams continuoslly a h264 compressed flux using RTP. The RTP adresses directly to my machine IP at the port 14571. I am perfectly able to watch it with quicktime.

However, I would like to be able to watch it using videoLAN but I don't get to do it. I use open flux, then I set the URL (I have tried all the combinations: rtp:\\@:14571 , udp:\\@:14571, rtp:\\localhost:14571) but nothing happens, not even an error appears.

The camera implements an unknown profile of H264 (that quicktime gets to read, anyway) and sends it implementing the RFC 3550: RTP: A Transport Protocol for Real-Time Applications and the
RFC 3984: RTP Payload Format for H.264 Video

Does anybody guess where the problem could come from??

If the problem comes from the decoder (x264) not implementing the same profile than the camera, I have read that vlc can be set to use the FFMPEG codecs, how can this be done?


Thanks a lot!!!

Manu

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

Re: Receiving an RTP stream coded in H264

Postby Rémi Denis-Courmont » 05 Jun 2008 19:39

You need an SDP to receive a H264 stream, as it is not a static payload format.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

manubot
New Cone
New Cone
Posts: 6
Joined: 05 Jun 2008 18:31

Re: Receiving an RTP stream coded in H264

Postby manubot » 06 Jun 2008 10:26

Thanks!

Using quicktime I have generated the sdp file that opens the stream in quicktime. However I can't still open it with videoLAN. I post here the .sdp file so maybe you can see the reason it is not being opened:

Code: Select all

SDPText v=0 o=- 10000 1 IN IP4 192.168.100.100 s=stcam t=0 0 c=IN IP4 192.168.100.101 m=video 14571 RTP/AVP 36 a=rtpmap:36 H264/90000 a=control:trackID=1 a=cliprect:0,0,480,640 a=framesize:36 640-480 a=fmtp:36 packetization-mode=1;profile-level-id=420028;sprop-parameter-sets=Z0IAKJZkBQHtCAAAAwAIAAADAeQg,aM48gA== a=framerate:30 m=audio 14573 RTP/AVP 0 8 96 97 98 99 100 101 a=rtpmap:0 PCMU/8000 a=rtpmap:96 PCMU/8000/2 a=rtpmap:97 PCMA/8000/2 a=rtpmap:98 G726-16/8000/2 a=rtpmap:99 G726-24/8000/2 a=rtpmap:100 G726-32/8000/2 a=rtpmap:101 G726-40/8000/2
Thanks 4 your help!!

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

Re: Receiving an RTP stream coded in H264

Postby Rémi Denis-Courmont » 06 Jun 2008 15:53

This SDP is incorrect (a=control does not belong here, port numbers look wrong), so no big surprise.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

manubot
New Cone
New Cone
Posts: 6
Joined: 05 Jun 2008 18:31

Re: Receiving an RTP stream coded in H264

Postby manubot » 09 Jun 2008 10:03

Hi,

The sdp file has been generated by quicktime and it opens it perfectly (no gib surprise either...)

The port numbers (14571 for video) are the correct ones as I settled them in the camera side.

Do you have any suggestion of how should I tackle this problem?? I really need videoLAN to be able to decode this stream!! (I don't care about the audio I just want the video)

Regards,

Manuel

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

Re: Receiving an RTP stream coded in H264

Postby Rémi Denis-Courmont » 09 Jun 2008 16:48

Did you check that RTP packets are actually sent on port 14572 as the SDP says? You should look at the VLC log for more informations.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

manubot
New Cone
New Cone
Posts: 6
Joined: 05 Jun 2008 18:31

Re: Receiving an RTP stream coded in H264

Postby manubot » 09 Jun 2008 17:57

The rtp packets ares sent to the port 14571 which is the one indicated in the sdp file. I have checked it with an ethernet capture tool.

Then, I have looked at the log VLC gives me for two cases:

A. When I try to open the sdp file:

Code: Select all

main debug: adding playlist item `D:\sdp0.sdp' ( D:\sdp0.sdp ) main debug: creating new input thread main debug: waiting for thread completion main debug: thread 4496 (input) created at priority 1 (input/input.c:265) main debug: drive letter D: found in source main debug: `D:\sdp0.sdp' gives access `' demux `' path `D:\sdp0.sdp' main debug: creating demux: access='' demux='' path='D:\sdp0.sdp' main debug: looking for access_demux module: 1 candidate main debug: creating access '' path='D:\sdp0.sdp' main debug: looking for access2 module: 5 candidates vcd debug: trying .cue file: D:\sdp0.cue vcd debug: could not find .cue file access_file debug: opening file `D:\sdp0.sdp' main debug: using access2 module "access_file" main debug: pre-buffering... main debug: received first data for our buffer main debug: creating demux: access='' demux='' path='D:\sdp0.sdp' main debug: looking for demux2 module: 45 candidates ffmpeg debug: couldn't guess format ps warning: this does not look like an MPEG PS stream, continuing anyway main debug: using demux2 module "ps" main debug: looking for a subtitle file in D:\ main debug: `D:\sdp0.sdp' successfully opened ps warning: garbage at input, trying to resync... main debug: EOF reached main debug: closing input main debug: removing module "ps" main debug: removing module "access_file" main debug: thread times: real 0m0.109377s, kernel 0m0.000000s, user 0m0.000000s main debug: thread 4496 joined (input/input.c:412) main warning: unable to find parent! main: nothing to play
B. When I try to open directly the stream from vlc:

Code: Select all

main debug: adding playlist item `udp://@:14571' ( udp://@:14571 ) main debug: creating new input thread main debug: waiting for thread completion main debug: thread 4568 (input) created at priority 1 (input/input.c:265) main debug: `udp://@:14571' gives access `udp' demux `' path `@:14571' main debug: creating demux: access='udp' demux='' path='@:14571' main debug: looking for access_demux module: 0 candidates main warning: no access_demux module matched "udp" main debug: creating access 'udp' path='@:14571' main debug: looking for access2 module: 6 candidates access_udp debug: opening server=:0 local=:14571 main debug: net: connecting to '[]:0@[]:14571' main debug: looking for network module: 1 candidate ipv6 warning: cannot create socket (Winsock error 10047) main debug: using network module "ipv6" main debug: removing module "ipv6" main debug: looking for network module: 1 candidate ipv4 debug: resolving :14571... ipv4 debug: resolving :0... main debug: using network module "ipv4" main debug: removing module "ipv4" main debug: using access2 module "access_udp" main debug: pre buffering access_udp debug: no RTP header detected main debug: creating demux: access='udp' demux='' path='@:14571' main debug: looking for demux2 module: 45 candidates ffmpeg debug: detected format: mp3
I doesn't tell me much as I have never worked with this kind of data, does it tell you something??

thanks 4 your patience!

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

Re: Receiving an RTP stream coded in H264

Postby Rémi Denis-Courmont » 09 Jun 2008 18:03

The rtp packets ares sent to the port 14571
According to the SDP, RTP packets should be sent to port 14572, and RTCP to port 14571. No wonder that VLC finds "garbage at input" if the camera sends RTP data on the RTCP port.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

manubot
New Cone
New Cone
Posts: 6
Joined: 05 Jun 2008 18:31

Re: Receiving an RTP stream coded in H264

Postby manubot » 11 Jun 2008 12:36

I think the camera does not do any RTCP... At least all I see in the network are UDP packets adressed to 14571. And in the camera code it doesn't seem it is doing any RTCP
It has as static destination ip address and port and it just send the RTP stream without caring about who is receiving it.

Does it make any sense to you? Do you have any suggestion about how making vlc read this kind of flux? If quicktime can read it I guess vlc should be able as well, doesn't it?

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

Re: Receiving an RTP stream coded in H264

Postby Rémi Denis-Courmont » 11 Jun 2008 17:14

Configure the camera to send to an even port.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

manubot
New Cone
New Cone
Posts: 6
Joined: 05 Jun 2008 18:31

Re: Receiving an RTP stream coded in H264

Postby manubot » 12 Jun 2008 10:27

I have already tried that.... it also says there is gargabe at input.

Well, thanks for your help Rémi. If I ever make it work i will post here how. In the meantime I'll keep using quicktime :(

silvara
Blank Cone
Blank Cone
Posts: 29
Joined: 03 Jul 2008 10:52

Re: Receiving an RTP stream coded in H264

Postby silvara » 19 Jul 2008 14:10

I have the same problem . How did you able to generate SDP file with QT ?


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 86 guests