I am still not able to convert from an mp2t stream to an rtp stream using gstreamer. VLC does it OK.<br><br>I am using gstreamer 0.10.30, good plugins 0.10.25 and bad plugins 0.10.20. Regrettably I had to really work to get to that 'recent' version. :-(<br>
<br>First, I can capture video, H264 encode, mp2t and transmit over UPD to another system, mp2t demux, h264 decode and display. Works fine. Same for RTP.<br><br>I T'ed the mp2t mux output to a capture file and played that from a file source on the display system. It properly displayed video but was about 10x the correct speed.<br>
<br>I tried to capture video, H264 encode, mp2t and transmit over UPD, receive, mp2t demux, rtppay, transmit over udp, receive, rtpdepay, h264decode, display. I do get some video, but never a full screen (though the output window is sized properly) and it updates erratically. It may freeze for extended periods of time.<br>
<br>I repeated the former test but added an h264decode and h264encode between the mp2t demux and the rtppay. That didn't work any differently.<br><br>I have captured logs from these tests. When the mp2t demux to h264 decode works, I typically see the demux flush the buffer of 188 bytes about 23 times to trigger the decoder to decode what looks like a single frame.<br>
<br>In the failure case there are a couple of differences. First, it only flushes the buffer ~3 times to trigger the h264 decoder (or the rtppayloader). Second, all of those mp2t packets will have had adaption fields, which none of the mp2t packets in the version that worked had. Third, I have noticed that the ffmpeg h264 decoder (in the failure case) complains about a non-existant PPS that was referenced. Obviously the packet that the h264 decoder received was completely bogus. I ran this test with the captured mp2t file that I also had tested for simple display, so I have controlled for a single, standard and valid mp2t input stream.<br>
<br>It looks to me like something in the mp2t demuxer is being triggered by downstream components to fail, which doesn't make sense and I don't see any indication of anything like that in the logs.<br><br>Here is a version of my 'transmuxing' script reading from the file.<br>
<br>export GST_DEBUG=mpegtsdemux:5,ffmpeg:5<br>gst-launch filesrc location=TestMP2T.out ! mpegtsdemux ! video/x-h264 ! \<br> rtph264pay pt=96 ! udpsink host=$2 port=$3<br><br><br>Here are log messages from mp2t demux processing for a typical mpt2 packet in the success case.<br>
<br>0:00:00.464731978 [335m 5932[00m 0x8662800 [37mLOG [00m [00m mpegtsdemux gstmpegtsdemux.c:2252:gst_mpegts_demux_parse_stream:<mpegtsdemux0>[00m afc 0x1, pusi 0, PID 0x0040 datalen 184<br>0:00:00.464755143 [335m 5932[00m 0x8662800 [37mLOG [00m [00m mpegtsdemux gstmpegtsdemux.c:2278:gst_mpegts_demux_parse_stream:<mpegtsdemux0>[00m Packet payload 184 bytes, PID 0x0040<br>
0:00:00.464800865 [335m 5932[00m 0x8662800 [37mLOG [00m [00m mpegtsdemux gstmpegtsdemux.c:2404:gst_mpegts_demux_parse_stream:<mpegtsdemux0>[00m Elementary packet of size 184 for PID 0x0040<br>0:00:00.464841753 [335m 5932[00m 0x8662800 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:3049:gst_mpegts_demux_chain:<mpegtsdemux0>[00m flushing 188/564<br>
<br>Here are log messages from mp2t demux processing for a typical mp2t packet in the failure case.<br><br>0:00:07.023077666 [334m19005[00m 0x9ba2968 [37mLOG [00m [00m mpegtsdemux gstmpegtsdemux.c:2252:gst_mpegts_demux_parse_stream:<mpegtsdemux0>[00m afc 0x3, pusi 1, PID 0x0010 datalen 184<br>
0:00:07.023204989 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:1697:gst_mpegts_demux_parse_adaptation_field:<mpegtsdemux0>[00m parsing adaptation field, length 139<br>0:00:07.023288660 [334m19005[00m 0x9ba2968 [37mLOG [00m [00m mpegtsdemux gstmpegtsdemux.c:1702:gst_mpegts_demux_parse_adaptation_field:<mpegtsdemux0>[00m flags 0x00<br>
0:00:07.023369956 [334m19005[00m 0x9ba2968 [37mLOG [00m [00m mpegtsdemux gstmpegtsdemux.c:2273:gst_mpegts_demux_parse_stream:<mpegtsdemux0>[00m consumed: 140 datalen: 44<br>0:00:07.023482821 [334m19005[00m 0x9ba2968 [37mLOG [00m [00m mpegtsdemux gstmpegtsdemux.c:2278:gst_mpegts_demux_parse_stream:<mpegtsdemux0>[00m Packet payload 44 bytes, PID 0x0010<br>
0:00:07.023582206 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:2336:gst_mpegts_demux_parse_stream:<mpegtsdemux0>[00m section finished<br>0:00:07.023666296 [334m19005[00m 0x9ba2968 [37mLOG [00m [00m mpegtsdemux gstmpegtsdemux.c:1331:gst_mpegts_stream_parse_pmt:<mpegtsdemux0>[00m PMT section_length: 40<br>
0:00:07.023748849 [334m19005[00m 0x9ba2968 [37mLOG [00m [00m mpegtsdemux gstmpegtsdemux.c:1337:gst_mpegts_stream_parse_pmt:<mpegtsdemux0>[00m PMT version_number: 0<br>0:00:07.023830006 [334m19005[00m 0x9ba2968 [37mLOG [00m [00m mpegtsdemux gstmpegtsdemux.c:1341:gst_mpegts_stream_parse_pmt:<mpegtsdemux0>[00m PMT current_next_indicator 1<br>
0:00:07.023911442 [334m19005[00m 0x9ba2968 [32;01mINFO [00m [00m mpegtsdemux gstmpegtsdemux.c:1351:gst_mpegts_stream_parse_pmt:<mpegtsdemux0>[00m No program number set, so using first parsed PMT's program number: 1<br>
0:00:07.023993227 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:1363:gst_mpegts_stream_parse_pmt:<mpegtsdemux0>[00m PMT program_number: 1<br>0:00:07.024219167 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:1366:gst_mpegts_stream_parse_pmt:<mpegtsdemux0>[00m PMT section_number: 0<br>
0:00:07.024340762 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:1370:gst_mpegts_stream_parse_pmt:<mpegtsdemux0>[00m PMT last_section_number: 0<br>0:00:07.024457189 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:1375:gst_mpegts_stream_parse_pmt:<mpegtsdemux0>[00m PMT PCR_PID: 0x0040<br>
0:00:07.024557692 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:609:gst_mpegts_demux_get_stream_for_PID:<mpegtsdemux0>[00m creating stream 0xb5f02f10 for PID 0x0040, PID_type 0<br>
0:00:07.024648975 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:1400:gst_mpegts_stream_parse_pmt:<mpegtsdemux0>[00m PMT program_info_length: 12<br>0:00:07.024780278 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:1483:gst_mpegts_stream_parse_pmt:<mpegtsdemux0>[00m PMT stream_type: 1b, PID: 0x0040 (ES_info_len 10)<br>
0:00:07.024913397 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:1490:gst_mpegts_stream_parse_pmt:<mpegtsdemux0>[00m PMT CRC: 0xfba2e249<br>0:00:07.025007405 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:1260:gst_mpegts_activate_pmt:<mpegtsdemux0>[00m activating PMT 0x00000010<br>
0:00:07.025170836 [334m19005[00m 0x9ba2968 [36mDEBUG [00m [00m mpegtsdemux gstmpegtsdemux.c:3049:gst_mpegts_demux_chain:<mpegtsdemux0>[00m flushing 188/564<br><br>Does anyone have any ideas about why this is wrong and/or what to investigate to fix it?<br>
<br>Thank you for consideration and any/all help.<br><br>Chuck Crisler<br>