7
votes

I'll be enormously grateful if you can help me with an H264 streaming problem that I've been trying to solve for weeks.

I need to stream H264 video from Live555 (on a Linux machine) to VLC Media Player (on a Windows machine). With RTSP it works very well, but I need to use RTP without RTSP, and with RTP I see no video. VLC doesn't even recognize that the stream is H264.

This is the SDP file transmitted via RTSP (the configuration that works):

v=0
o=- 1277647151953158 1 IN IP4 190.40.14.100
s=Session streamed by "testH264VideoAudioStreamer"
i=test-h264-mux.mpg
t=0 0
a=tool:LIVE555 Streaming Media v2007.05.24
a=type:broadcast
a=control:*
a=source-filter: incl IN IP4 * 190.40.14.100
a=rtcp-unicast: reflection
a=range:npt=0-
a=x-qt-text-nam:Session streamed by "testH264VideoAudioStreamer"
a=x-qt-test-inf:test-h264=mux.mpg
m=video 8554 RTP/AVP 96
c=IN IP4 190.40.15.63/7
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=000042;sprop-parameter-sets=H264
a=control:track1

But if I switch from RTSP to RTP, it doesn't work. I've tried loading the above SDP file in VLC player, but it doesn't help.

Here is some of the debug output of VLC Player 0.8.6d:

main input debug: thread 4016 (input) created at priority 1 (input/input.c:265)
main input debug: `rtp://@190.40.15.63:8554' gives access `rtp demux' `' path `@190.40.15.63:8554'
main input debug: creating demux: access='rtp' demux='' path='@190.40.15.63:8554'
main demuxer debug: looking for access_demux module: 0 candidates
main demuxer warning: no access_demux module matched "rtp"
main input debug: creating access 'rtp' path='@190.40.15.63:8554'
main access debug: looking for access2 module: 6 candidates
access_udp access debug: opening server=:0 local=190.40.15.63:8554
main access debug: net: connecting to '[]:0@[190.40.15.63]:8554
main access debug: looking for netrowk module: 1 candidate
ipv6 access debug: 190.40.15.63: Host or service not found
main access debug: using network module "ipv6"
main access debug: removing network module "ipv6"
main access debug: looking for netrowk module: 1 candidate
ipv4 access debug: resolving 190.40.15.63:8554...
ipv4 access debug: resolving :0...
main access debug: using network module "ipv4"
main access debug: removing network module "ipv4"
main access debug: using access2 module "access_udp"
main private debug: pre buffering
access_udp access debug: no RTP header detected
main input debug: creating demux: access='rtp' demux='' path='@190.40.15.63:8554'
main demuxer debug: looking for demux2 module: 45 candidates
ts demuxer warning: TS module discarded (lost sync)
ffmpeg demuxer debug: detected format: mp3

(There might be typos because I had to copy it manually - don't ask :) )

In VLC 1.0.5 I get an unknown payload type error, and the SDP cannot be loaded at all because of an Unknown network stack error. Other errors displayed are SDP connection infos not supported and Sap demuxer warning: invalid SDP.

Any help will be greatly appreciated!

Thank you,

Ilya

1
One quick comment: your SDP file is technically invalid. You should be base-64 encoding the SPS and PPS info, delimiting it with a comma, and appending it to your sprop-parameter-sets. You're setting it to the string "H264" which is definitely wrong (although very common, unfortunately).kidjan

1 Answers

8
votes

What I had to do is use an SDP file instead of opening the stream directly. Turns out that SDP data is only transmitted when using RTSP. When streaming RTP, I had to provide the SDP file myself.

So what I did was:

  1. Stream with RTSP (the method that works),
  2. Use Wireshark to record the SDP file transmitted over RTSP,
  3. Save the SDP as a text file with extension .sdp,
  4. In VLC, open the SDP file instead of opening the network stream directly.

And it did magic!