mpeg2-ts

How to receive the same udp-stream in several programs?

假如想象 提交于 2019-12-04 16:16:44
I have a closed third party system that sends a unicast UDP stream (MPEG-TS) that I'd like to access in two different programs on the same computer. I can not change anything on the source, not even IP or Port. Is there any other option than to write my own little program that captures the stream and then creates to new streams and resends both? It seems that only one of the two destination programs handles multicast, so I need two unicast streams. You should be able to use socat to forward unicast UDP to a multicast group, or just save data into a file and process later. Edit 0: Here is an

How to get Pipeline created by playbin in textual format in Gstreamer?

僤鯓⒐⒋嵵緔 提交于 2019-12-04 14:21:15
I'm playing a transport stream file (*.ts) using the following pipeline: gst-launch-0.10 playbin2 uri=file:///c:/bbb.ts But I need to convert that into a pipeline myself. I'm not sure how to achieve this. So far I have tried: (works fine) gst-launch-0.10 -v filesrc location=c:/bbb.ts ! tsdemux ! audio/x-ac3 ! fakesink But if i replace fakesink with autoaudiosink it fails with a not-linked error. And even the fakesink doesn't work for video: gst-launch-0.10 -v filesrc location=c:/bbb.ts ! tsdemux ! video/x-mpeg2 ! fakesink So I have two questions: How to find out pipeline created by playbin

Reading information from PAT section (MPEG-TS)

一个人想着一个人 提交于 2019-12-04 04:22:34
问题 I'm writing a MPEG-TS file parser and I'm stuck on getting program_numbers and PIDs from the PAT section. I'm using a packet analyser to compare my results. For example, here's a PAT packet 47 40 00 16 00 00 B0 31 00 14 D7 00 00 00 00 E0 10 00 01 E0 24 00 02 E0 25 00 03 E0 30 00 04 E0 31 00 1A E0 67 00 1C E0 6F 43 9D E3 F1 43 A3 E3 F7 43 AC E4 00 C3 69 A6 D8 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

Reading information from PAT section (MPEG-TS)

南笙酒味 提交于 2019-12-01 21:03:17
I'm writing a MPEG-TS file parser and I'm stuck on getting program_numbers and PIDs from the PAT section. I'm using a packet analyser to compare my results. For example, here's a PAT packet 47 40 00 16 00 00 B0 31 00 14 D7 00 00 00 00 E0 10 00 01 E0 24 00 02 E0 25 00 03 E0 30 00 04 E0 31 00 1A E0 67 00 1C E0 6F 43 9D E3 F1 43 A3 E3 F7 43 AC E4 00 C3 69 A6 D8 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

MPEG2 Presentation Time Stamps (PTS) calculation

巧了我就是萌 提交于 2019-11-30 02:28:04
I have an MPEG2 TS file and now I am interested in extracting PTS information from each picture frame. I know that PTS is described in 33 bits including 3 marker bits. But I don't know how this bitfield can be converted to more understandable form (seconds, milliseconds). Can anybody help me please The MPEG2 transport stream clocks (PCR, PTS, DTS) all have units of 1/90000 second. The PTS and DTS have three marker bits which you need to skip over. The pattern is always (from most to least significant bit) 3 bits, marker, 15 bits, marker, 15 bits, marker. The markers must be equal to 1. In C,

MPEG2 Presentation Time Stamps (PTS) calculation

纵然是瞬间 提交于 2019-11-29 00:09:05
问题 I have an MPEG2 TS file and now I am interested in extracting PTS information from each picture frame. I know that PTS is described in 33 bits including 3 marker bits. But I don't know how this bitfield can be converted to more understandable form (seconds, milliseconds). Can anybody help me please 回答1: The MPEG2 transport stream clocks (PCR, PTS, DTS) all have units of 1/90000 second. The PTS and DTS have three marker bits which you need to skip over. The pattern is always (from most to

Generate PCR from PTS

↘锁芯ラ 提交于 2019-11-28 20:55:17
I am trying to create PCR from PTS as follows. S64 nPcr = nPts * 9 / 100; pTsBuf[4] = 7 + nStuffyingBytes; pTsBuf[5] = 0x10; /* flags */ pTsBuf[6] = ( nPcr >> 25 )&0xff; pTsBuf[7] = ( nPcr >> 17 )&0xff; pTsBuf[8] = ( nPcr >> 9 )&0xff; pTsBuf[9] = ( nPcr >> 1 )&0xff; pTsBuf[10]= ( nPcr << 7 )&0x80; pTsBuf[11]= 0; But the problem is VLC is playing only first frame and not playing any other frames. and I am getting the warning "early picture skipped". Could any one help me in converting from PTS to PCR.. First, the PCR has 33+9 bits, the PTS 33 bits. The 33 bit-portion (called PCR_base) runs at

Generate PCR from PTS

烂漫一生 提交于 2019-11-27 13:18:58
问题 I am trying to create PCR from PTS as follows. S64 nPcr = nPts * 9 / 100; pTsBuf[4] = 7 + nStuffyingBytes; pTsBuf[5] = 0x10; /* flags */ pTsBuf[6] = ( nPcr >> 25 )&0xff; pTsBuf[7] = ( nPcr >> 17 )&0xff; pTsBuf[8] = ( nPcr >> 9 )&0xff; pTsBuf[9] = ( nPcr >> 1 )&0xff; pTsBuf[10]= ( nPcr << 7 )&0x80; pTsBuf[11]= 0; But the problem is VLC is playing only first frame and not playing any other frames. and I am getting the warning "early picture skipped". Could any one help me in converting from PTS