streaming h264 from dvb-s over rtp does not work
Hi
I have a problem with streaming H264 from dbv-s card to DSS over RTP.
This is my VLC start script:
/usr/local/bin/vlc -vvv --color --ts-es-id-pid --sout-all \
--security-policy=1 dvb-s:// \
--dvb-adapter=1 --dvb-frequency=10995000 --dvb-srate=20000000 \
--dvb-voltage=13 --sout-standard-access=udp \
--sout-standard-mux=ts --sout '#duplicate{
dst="rtp{dst=127.0.0.1,port=1230,sdp=file:///usr/local/movies/relay1.sdp}",select="program=16"}'
This is a result .sdp file from vlc:
v=0
o=- 1204770075637964 2 IN IP4 127.0.0.1
s=NONE
t=0 0
a=tool:vlc 0.8.6e
c=IN IP4 127.0.0.1
m=audio 1230 RTP/AVP 14
b=AS:128
a=rtpmap:14 MPA/90000
m=video 1232 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;
I tried to play result stream (rtsp://sat/relay1) with 4 different players: vlc, mplayer, mp4player (that is from MPEG4IP project) and QuickTime7. By most of them (vlc,mplayer,QT7) i can heard only audio but there is no video playing. I tried both 0.8.6e and vlc-trunk with no success.
From mp4player logs i found that video stream is not played since mp4player can't determine H264 stream parameters (width, height, bitrate, e t.c.). It try to get this parameters from 2 sources:
-
from sprop-parameter-sets of .sdp file
-
from nal SPS/PPS packets in stream.
But there is no sprop-parameter-sets in .sdp file of vlc. And i found in vlc sources that it simple discard all SPS/PPS packets in modules/stream_out/rtp.c:28489, rtp_packetize_h264_nal():
#!c
if( i_nal_type == 7 || i_nal_type == 8 )
{
/* XXX Why do you want to remove them ? It will break streaming with
* SPS/PPS change (broadcast) ? */
return VLC_SUCCESS;
}
When i comment out this part of code, i get video both in vlc and mp4player. But not in quicktime.
I'm attached a patch to odiles/packetizer/h264.c that make sprop-parameter-sets available in sdp file. I do not sure if it is correct, but i get sdp that work with QuickTime:
v=0
o=- 1204771999662128 2 IN IP4 127.0.0.1
s=NONE
t=0 0
a=tool:vlc 0.8.6e
c=IN IP4 127.0.0.1
m=audio 1230 RTP/AVP 14
b=AS:128
a=rtpmap:14 MPA/90000
m=video 1232 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d401e;sprop-parameter-sets=Z01AHqnYEQJNgggAAAMACAAAAwGUoA==,aP4BrJI=;