Postby AvcRtp » 17 Nov 2006 20:30
Actually I managed to make H264 over RTP working. Used ethereal to catch the traffic and also put some debuging message on the code rtp_packetize_h264 ( which claimed as the support of rfc3894. ). The trick is that you have to use vlc as a VOD server (open telnet interface and rtsp server, which you can find how to do it from document.) and then use rtsp from another vlc to trigger the rtp packetize. ( all because H264 over rtp sends out two streams to client .... ).
The current problem I have is on the vlc VOD side. I have a live H264 TS stream sends to the listened udp port of vlc, the 0.8.6 code tries to demux the input stream. But the problem is that if the ts demuxer finds the PID in PMT as h264 first, everything works.. but if the ts demuxer finds the PID in PMT a mpeg stream, it then terminates the demux too fast ( set EOF and control type = 0 ) which on the rtsp request, it treats the stream as a mpeg and only sends out audio to the desired port !!!.
I am now trying to figure out how to solve the problem ( if no one helps )....
Attached is the log, the first one is the good analysis and the second one is the bug!
[00000277] [Media: Test] access_udp access debug: detected TS over raw UDP
[00000272] [Media: Test] main input debug: creating demux: access='udp' demux='' path='@:1234'
[00000281] [Media: Test] main demuxer debug: looking for demux2 module: 42 candidates
[00000281] [Media: Test] main demuxer debug: using demux2 module "ts"
[00000281] [Media: Test] ts demuxer debug: DEMUX_SET_GROUP 0 (nil)
[00000272] [Media: Test] main input debug: starting in async mode
[00000277] [Media: Test] access_udp access warning: unimplemented query in control
[00000272] [Media: Test] main input debug: `udp://@:1234' successfully opened
[00000281] [Media: Test] ts demuxer debug: PATCallBack called
[00000281] [Media: Test] ts demuxer debug: new PAT ts_id=42972 version=11 current_next=1
[00000281] [Media: Test] ts demuxer debug: * number=1 pid=66
[00000281] [Media: Test] ts demuxer debug: PMTCallBack called
[00000281] [Media: Test] ts demuxer debug: new PMT program number=1 version=27 pid_pcr=68
[[b]00000281] [Media: Test] ts demuxer debug: * es pid=68 type=27 fcc=h264[/b]
[00000272] [Media: Test] main input debug: selecting program id=1
[00000311] [Media: Test] main packetizer debug: looking for packetizer module: 15 candidates
[00000311] [Media: Test] main packetizer debug: using packetizer module "packetizer_h264"
[00000311] [Media: Test] main packetizer debug: thread 121297840 (decoder) created at priority 0 (input/decoder.c:159)
[00000311] [Media: Test] packetizer_h264 packetizer debug: found NAL_SPS
[00000311] [Media: Test] packetizer_h264 packetizer debug: found NAL_PPS
[00000273] [Media: Test] main stream output debug: adding a new input
[00000281] [Media: Test] ts demuxer debug: PMTCallBack called
[00000281] [Media: Test] ts demuxer debug: new PMT program number=1 version=28 pid_pcr=68
[[b]00000281] [Media: Test] ts demuxer debug: * es pid=68 type=27 fcc=h264
[00000281] [Media: Test] ts demuxer debug: * es pid=69 type=3 fcc=mpga[/b]
[00000328] [Media: Test] main packetizer debug: looking for packetizer module: 15 candidates
[00000328] [Media: Test] main packetizer debug: using packetizer module "mpeg_audio"
[00000328] [Media: Test] main packetizer debug: thread 150117296 (decoder) created at priority 0 (input/decoder.c:159)
[00000328] [Media: Test] mpeg_audio packetizer debug: MPGA channels:2 samplerate:48000 bitrate:192
[00000273] [Media: Test] main stream output debug: adding a new input
[00000281] [Media: Test] ts demuxer warning: first packet for pid=68 cc=0xe
[00000281] [Media: Test] ts demuxer debug: eof ?
[00000272] [Media: Test] main input debug: EOF reached
[00000272] [Media: Test] main input debug: control type=0
[00000272] [Media: Test] main input debug: control: stopping input
[00000272] [Media: Test] main input debug: closing input
[00000281] [Media: Test] ts demuxer debug: pid list:
[00000281] [Media: Test] ts demuxer debug: - pid[0] seen
[00000281] [Media: Test] ts demuxer debug: - pid[66] seen
[00000311] [Media: Test] main packetizer debug: removing module "packetizer_h264"
[00000311] [Media: Test] main packetizer debug: thread 121297840 joined (input/decoder.c:191)
[00000311] [Media: Test] main packetizer debug: killing decoder fourcc `h264', 0 PES in FIFO
[00000273] [Media: Test] main stream output debug: removing an input
[00000281] [Media: Test] ts demuxer debug: - pid[68] seen
[00000328] [Media: Test] main packetizer debug: removing module "mpeg_audio"
[00000328] [Media: Test] main packetizer debug: thread 150117296 joined (input/decoder.c:191)
[00000328] [Media: Test] main packetizer debug: killing decoder fourcc `mpga', 0 PES in FIFO
[00000273] [Media: Test] main stream output debug: removing an input
[00000272] [Media: Test] main input debug: Program doesn't contain anymore ES
[00000281] [Media: Test] ts demuxer debug: - pid[69] seen
[00000281] [Media: Test] ts demuxer debug: - pid[8191] seen
[00000281] [Media: Test] main demuxer debug: removing module "ts"
[00000277] [Media: Test] main access debug: removing module "access_udp"
[00000272] [Media: Test] main input debug: destroying sout
[00000274] main private debug: destroying chain... (name=description)
[00000274] main private debug: removing module "stream_out_description"
[00000274] main private debug: destroying chain done
[00000272] [Media: Test] main input debug: thread 108407728 joined (input/input.c:412)
[00000267] vod_rtsp private debug: created RTSP url: /Test
[00000267] vod_rtsp private debug: media has 2 declared ES
[00000267] vod_rtsp private debug: - ES h264 (/Test/trackID=0)
[00000267] vod_rtsp private debug: - ES mpga (/Test/trackID=1)
Buggy one
[00000277] [Media: Test] access_udp access debug: detected TS over raw UDP
[00000272] [Media: Test] main input debug: creating demux: access='udp' demux='' path='@:1234'
[00000281] [Media: Test] main demuxer debug: looking for demux2 module: 42 candidates
[00000281] [Media: Test] main demuxer debug: using demux2 module "ts"
[00000281] [Media: Test] ts demuxer debug: DEMUX_SET_GROUP 0 (nil)
[00000272] [Media: Test] main input debug: starting in async mode
[00000277] [Media: Test] access_udp access warning: unimplemented query in control
[00000272] [Media: Test] main input debug: `udp://@:1234' successfully opened
[00000281] [Media: Test] ts demuxer debug: PATCallBack called
[00000281] [Media: Test] ts demuxer debug: new PAT ts_id=20027 version=6 current_next=1
[00000281] [Media: Test] ts demuxer debug: * number=1 pid=66
[00000281] [Media: Test] ts demuxer debug: PMTCallBack called
[00000281] [Media: Test] ts demuxer debug: new PMT program number=1 version=2 pid_pcr=68
[b][00000281] [Media: Test] ts demuxer debug: * es pid=68 type=3 fcc=mpga[/b]
[00000272] [Media: Test] main input debug: selecting program id=1
[00000311] [Media: Test] main packetizer debug: looking for packetizer module: 15 candidates
[00000311] [Media: Test] main packetizer debug: using packetizer module "mpeg_audio"
[00000311] [Media: Test] main packetizer debug: thread 90631088 (decoder) created at priority 0 (input/decoder.c:159)
[00000311] [Media: Test] mpeg_audio packetizer debug: MPGA channels:2 samplerate:48000 bitrate:384
[00000273] [Media: Test] main stream output debug: adding a new input
[00000311] [Media: Test] main packetizer debug: thread 90631088: secret message triggered at misc/block.c:228 (Connection timed out)
[00000281] [Media: Test] ts demuxer debug: PMTCallBack called
[00000281] [Media: Test] ts demuxer debug: new PMT program number=1 version=3 pid_pcr=69
[[b]00000281] [Media: Test] ts demuxer debug: * es pid=68 type=3 fcc=mpga
[00000281] [Media: Test] ts demuxer debug: * es pid=69 type=27 fcc=h264[/b]
[00000336] [Media: Test] main packetizer debug: looking for packetizer module: 15 candidates
[00000336] [Media: Test] main packetizer debug: using packetizer module "packetizer_h264"
[00000336] [Media: Test] main packetizer debug: thread 121297840 (decoder) created at priority 0 (input/decoder.c:159)
[00000281] [Media: Test] ts demuxer warning: first packet for pid=68 cc=0xf
[00000281] [Media: Test] ts demuxer warning: discontinuity received 0x9 instead of 0x2 (pid=68)
[00000336] [Media: Test] packetizer_h264 packetizer debug: found NAL_SPS
[00000281] [Media: Test] ts demuxer debug: eof ?
[00000272] [Media: Test] main input debug: EOF reached
[00000272] [Media: Test] main input debug: control type=0
[00000272] [Media: Test] main input debug: control: stopping input
[00000272] [Media: Test] main input debug: closing input
[00000281] [Media: Test] ts demuxer debug: pid list:
[00000281] [Media: Test] ts demuxer debug: - pid[0] seen
[00000281] [Media: Test] ts demuxer debug: - pid[66] seen
[00000311] [Media: Test] main packetizer debug: removing module "mpeg_audio"
[00000311] [Media: Test] main packetizer debug: thread 90631088 joined (input/decoder.c:191)
[00000311] [Media: Test] main packetizer debug: killing decoder fourcc `mpga', 0 PES in FIFO
[00000273] [Media: Test] main stream output debug: removing an input
[00000281] [Media: Test] ts demuxer debug: - pid[68] seen
[00000336] [Media: Test] main packetizer debug: removing module "packetizer_h264"
[00000336] [Media: Test] main packetizer debug: thread 121297840 joined (input/decoder.c:191)
[00000336] [Media: Test] main packetizer debug: killing decoder fourcc `h264', 0 PES in FIFO
[00000272] [Media: Test] main input debug: Program doesn't contain anymore ES
[00000281] [Media: Test] ts demuxer debug: - pid[69] seen
[00000281] [Media: Test] ts demuxer debug: - pid[8191] seen
[00000281] [Media: Test] main demuxer debug: removing module "ts"
[00000277] [Media: Test] main access debug: removing module "access_udp"
[00000272] [Media: Test] main input debug: destroying sout
[00000274] main private debug: destroying chain... (name=description)
[00000274] main private debug: removing module "stream_out_description"
[00000274] main private debug: destroying chain done
[00000272] [Media: Test] main input debug: thread 80141232 joined (input/input.c:412)
[00000267] vod_rtsp private debug: created RTSP url: /Test
[00000267] vod_rtsp private debug: media has 1 declared ES
[00000267] vod_rtsp private debug: - ES mpga (/Test/trackID=0)