Log in

View Full Version : xport error on multi-program m2ts


Chouonsoku
7th October 2007, 20:59
I'm trying to demux the audio from Incubus: Alive at Red Rocks and I'm having some issues. When I use the command "xport -h 00000.m2ts 0 17 0", I get an output of:

xport Transport Stream Demuxer 0.98
program = 0, video channel = 17, audio channel = 0
Program Number = 0 (0x0000), Program Map PID = 31 (0x001f)
Program Number = 1 (0x0001), Program Map PID = 256 (0x0100)
Discontinuity!, pid = 4113 <0x1011>, received = 8, expected = 11, at 4131628
Discontinuity!, pid = 4354 <0x1102>, received = 14, expected = 4, at 4131634
Discontinuity!, pid = 4352 <0x1100>, received = 9, expected = 1, at 4131706
Discontinuity!, pid = 256 <0x0100>, received = 3, expected = 7, at 4133822
Discontinuity!, pid = 31 <0x001f>, received = 2, expected = 9, at 4146977
Discontinuity!, pid = 4113 <0x1011>, received = 7, expected = 5, at 10217943
Discontinuity!, pid = 4352 <0x1100>, received = 13, expected = 8, at 10217944
Discontinuity!, pid = 4354 <0x1102>, received = 7, expected = 8, at 10217945
Discontinuity!, pid = 256 <0x0100>, received = 1, expected = 9, at 10219286
Discontinuity!, pid = 31 <0x001f>, received = 15, expected = 13, at 10239874
Discontinuity!, pid = 4608 <0x1200>, received = 12, expected = 15, at 10243186

packets for pid 0 <0x0000> = 8941, first = 1, last = 20710870
packets for pid 31 <0x001f> = 934, first = 3, last = 20703504
packets for pid 256 <0x0100> = 8941, first = 2, last = 20710871
packets for pid 4097 <0x1001> = 9337, first = 4, last = 20711317
packets for pid 4113 <0x1011> = 14908683, first = 5, last = 20712106
packets for pid 4352 <0x1100> = 4032436, first = 21, last = 20712062
packets for pid 4353 <0x1101> = 1344507, first = 24, last = 20710838
packets for pid 4354 <0x1102> = 393611, first = 36, last = 20711603
packets for pid 4608 <0x1200> = 4716, first = 2670705, last = 20612815
coded frames = 0, video fields = 0

I noticed that it shows that there are two programs, so I tried switching out the first with the second and got this:

xport Transport Stream Demuxer 0.98
program = 1, video channel = 17, audio channel = 0
Program Number = 0 (0x0000), Program Map PID = 31 (0x001f)
Program Number = 1 (0x0001), Program Map PID = 256 (0x0100)
program descriptor = 0x05, 0x04, 0x48, 0x44, 0x4d, 0x56
program descriptor = 0x88, 0x04, 0x0f, 0xff, 0xff, 0xfc
ES descriptor for stream type 0x1b = 0x05, 0x08, 0x48, 0x44, 0x4d, 0x56, 0xff, 0
x1b, 0x61, 0x3f
ES descriptor for stream type 0x80 = 0x05, 0x08, 0x48, 0x44, 0x4d, 0x56, 0xff, 0
x80, 0x61, 0xff
ES descriptor for stream type 0x80 = 0x05, 0x08, 0x48, 0x44, 0x4d, 0x56, 0xff, 0
x80, 0x31, 0xff
ES descriptor for stream type 0x81 = 0x05, 0x04, 0x41, 0x43, 0x2d, 0x33
ES descriptor for stream type 0x81 = 0x81, 0x04, 0x06, 0x48, 0x0e, 0x00
Discontinuity!, pid = 4113 <0x1011>, received = 8, expected = 11, at 4131628
Discontinuity!, pid = 4354 <0x1102>, received = 14, expected = 4, at 4131634
Discontinuity!, pid = 4352 <0x1100>, received = 9, expected = 1, at 4131706
Discontinuity!, pid = 256 <0x0100>, received = 3, expected = 7, at 4133822
Discontinuity!, pid = 31 <0x001f>, received = 2, expected = 9, at 4146977
Discontinuity!, pid = 4113 <0x1011>, received = 7, expected = 5, at 10217943
Discontinuity!, pid = 4352 <0x1100>, received = 13, expected = 8, at 10217944
Discontinuity!, pid = 4354 <0x1102>, received = 7, expected = 8, at 10217945
Discontinuity!, pid = 256 <0x0100>, received = 1, expected = 9, at 10219286
Discontinuity!, pid = 31 <0x001f>, received = 15, expected = 13, at 10239874
Discontinuity!, pid = 4608 <0x1200>, received = 12, expected = 15, at 10243186
ts rate = unspecified
packets for pid 0 <0x0000> = 8941, first = 1, last = 20710870
packets for pid 31 <0x001f> = 934, first = 3, last = 20703504
packets for pid 256 <0x0100> = 8941, first = 2, last = 20710871
packets for pid 4097 <0x1001> = 9337, first = 4, last = 20711317
packets for pid 4113 <0x1011> = 14908683, first = 5, last = 20712106
packets for pid 4352 <0x1100> = 4032436, first = 21, last = 20712062
packets for pid 4353 <0x1101> = 1344507, first = 24, last = 20710838
packets for pid 4354 <0x1102> = 393611, first = 36, last = 20711603
packets for pid 4608 <0x1200> = 4716, first = 2670705, last = 20612815
coded frames = 0, video fields = 0

I'm sort of at a loss as to where to go from here since I haven't had this issue with any Blu-Ray titles before. And, I already tried extracting the audio with TsRemux. It came out as static, as do most PCM files I extract with it. Any help would be appreciated.

Guest
8th October 2007, 01:52
If it's MPEG2, have you tried the latest beta of DGIndex?

drmpeg
8th October 2007, 02:11
I'm sort of at a loss as to where to go from here since I haven't had this issue with any Blu-Ray titles before. And, I already tried extracting the audio with TsRemux. It came out as static, as do most PCM files I extract with it. Any help would be appreciated.

The correct command lines for each of the three audio streams are:

xport -h 00000.m2ts 1 0 1

xport -h 00000.m2ts 1 0 2

xport -h 00000.m2ts 1 0 3

Program number 0 is just a pointer to the network PID (or SIT PID in Blu-ray).

For audio only demuxing, the video stream number must be set to zero for AC-3 streams (with the latest 0.98 version of xport).

In general, stream and program numbering starts at 1 in xport.

Ron

Chouonsoku
8th October 2007, 02:48
The correct command lines for each of the three audio streams are:

xport -h 00000.m2ts 1 0 1

xport -h 00000.m2ts 1 0 2

xport -h 00000.m2ts 1 0 3

Program number 0 is just a pointer to the network PID (or SIT PID in Blu-ray).

For audio only demuxing, the video stream number must be set to zero for AC-3 streams (with the latest 0.98 version of xport).

In general, stream and program numbering starts at 1 in xport.

Ron

That helps a lot. Before, I was just going off of the numbers shown in TsRemux. Thanks.

And, it's an AVC Blu-Ray, not MPEG-2. I know to use DGIndex for those. :P Thanks again.

Edit: Still getting errors with the command you listed, xport.exe -h 00000.m2ts 1 0 1.


xport Transport Stream Demuxer 0.98
program = 1, video channel = 0, audio channel = 1
Program Number = 0 (0x0000), Program Map PID = 31 (0x001f)
Program Number = 1 (0x0001), Program Map PID = 256 (0x0100)
program descriptor = 0x05, 0x04, 0x48, 0x44, 0x4d, 0x56
program descriptor = 0x88, 0x04, 0x0f, 0xff, 0xff, 0xfc
ES descriptor for stream type 0x1b = 0x05, 0x08, 0x48, 0x44, 0x4d, 0x56, 0xff, 0
x1b, 0x61, 0x3f
Audio PID = 4352 <0x1100>, type = 0x80
ES descriptor for stream type 0x80 = 0x05, 0x08, 0x48, 0x44, 0x4d, 0x56, 0xff, 0
x80, 0x61, 0xff
ES descriptor for stream type 0x80 = 0x05, 0x08, 0x48, 0x44, 0x4d, 0x56, 0xff, 0
x80, 0x31, 0xff
ES descriptor for stream type 0x81 = 0x05, 0x04, 0x41, 0x43, 0x2d, 0x33
ES descriptor for stream type 0x81 = 0x81, 0x04, 0x06, 0x48, 0x0e, 0x00
LPCM Audio Mode = 3/2+lfe
LPCM Audio Bits/sample = 24
LPCM Audio Sample Rate = 48000
Discontinuity!, pid = 4113 <0x1011>, received = 8, expected = 11, at 4131628
Discontinuity!, pid = 4354 <0x1102>, received = 14, expected = 4, at 4131634
Discontinuity!, pid = 4352 <0x1100>, received = 9, expected = 1, at 4131706
Discontinuity!, pid = 256 <0x0100>, received = 3, expected = 7, at 4133822
Discontinuity!, pid = 31 <0x001f>, received = 2, expected = 9, at 4146977
Discontinuity!, pid = 4113 <0x1011>, received = 7, expected = 5, at 10217943
Discontinuity!, pid = 4352 <0x1100>, received = 13, expected = 8, at 10217944
Discontinuity!, pid = 4354 <0x1102>, received = 7, expected = 8, at 10217945
Discontinuity!, pid = 256 <0x0100>, received = 1, expected = 9, at 10219286
Discontinuity!, pid = 31 <0x001f>, received = 15, expected = 13, at 10239874
Discontinuity!, pid = 4608 <0x1200>, received = 12, expected = 15, at 10243186
ts rate = unspecified
packets for pid 0 <0x0000> = 8941, first = 1, last = 20710870
packets for pid 31 <0x001f> = 934, first = 3, last = 20703504
packets for pid 256 <0x0100> = 8941, first = 2, last = 20710871
packets for pid 4097 <0x1001> = 9337, first = 4, last = 20711317
packets for pid 4113 <0x1011> = 14908683, first = 5, last = 20712106
packets for pid 4352 <0x1100> = 4032436, first = 21, last = 20712062
packets for pid 4353 <0x1101> = 1344507, first = 24, last = 20710838
packets for pid 4354 <0x1102> = 393611, first = 36, last = 20711603
packets for pid 4608 <0x1200> = 4716, first = 2670705, last = 20612815
coded frames = 0, video fields = 0

I get the same discontinuity errors when trying to demux the 3rd track, which is AC3.

honai
8th October 2007, 04:25
I've been getting discontinuity "errors" all the time, but since the demuxed audio/video plays just fine I simply ignore them.

Chouonsoku
8th October 2007, 04:31
I've been getting discontinuity "errors" all the time, but since the demuxed audio/video plays just fine I simply ignore them.

Well, the audio doesn't play okay for me. It comes out as static and it doesn't extract completely.

drmpeg
8th October 2007, 05:55
Well, the audio doesn't play okay for me. It comes out as static and it doesn't extract completely.
The discontinuity errors are just at two points in the file. It looks like the overall file length is 3,976,724,353 bytes with the first set of errors starting at 793,272,576 bytes and the second set starting at 1,961,844,864 bytes.

The beginning of the file is good, so you should have good audio at least for a while. How are you playing the LPCM?

BTW, xport checks for discontinuities on all packets with a payload. It doesn't matter what streams are being demuxed.

Ron

Chouonsoku
8th October 2007, 06:05
The discontinuity errors are just at two points in the file. It looks like the overall file length is 3,976,724,353 bytes with the first set of errors starting at 793,272,576 bytes and the second set starting at 1,961,844,864 bytes.

The beginning of the file is good, so you should have good audio at least for a while. How are you playing the LPCM?

BTW, xport checks for discontinuities on all packets with a payload. It doesn't matter what streams are being demuxed.

Ron

I've tried playing the file in Media Player Classic through ffdshow and AC3 Filter as well as with VLC. Both a loud, static sort of sound and then stop. VLC complains about running out of memory. The source m2ts file plays fine and all audio streams sound perfect in CyberLink PowerDVD and Nero Showtime, so I know the source is okay.

drmpeg
8th October 2007, 06:19
I've tried playing the file in Media Player Classic through ffdshow and AC3 Filter as well as with VLC. Both a loud, static sort of sound and then stop. VLC complains about running out of memory. The source m2ts file plays fine and all audio streams sound perfect in CyberLink PowerDVD and Nero Showtime, so I know the source is okay.
It's unlikely that those programs will work for playing the raw LPCM file. How are they to know what format of LPCM is contained in the file?

You need to convert the raw file to .wav format with sox.

sox -B -r48000 -t .raw -c 6 -3 -s bits0001.mpa bits.wav

Ron

Chouonsoku
8th October 2007, 06:26
It's unlikely that those programs will work for playing the raw LPCM file. How are they to know what format of LPCM is contained in the file?

You need to convert the raw file to .wav format with sox.

sox -B -r48000 -t .raw -c 6 -3 -s bits0001.mpa bits.wav

Ron

I played the wav file that was converted during the PCM --> DTS process using eac3to. The decoded wav doesn't play correctly in those programs either. But I'll give it a shot with sox.

Chouonsoku
8th October 2007, 07:06
The output file for the first track (Linear PCM, 5.1 channels) ended up being 725,836,548 bytes, obviously well under the file size it should be. However, this is progress as the converted PCM file to WAV with sox is playable in VLC and sounds fine. Now I just need to get the whole thing demuxed.

drmpeg
8th October 2007, 07:14
The output file for the first track (Linear PCM, 5.1 channels) ended up being 725,836,548 bytes, obviously well under the file size it should be. However, this is progress as the converted PCM file to WAV with sox is playable in VLC and sounds fine. Now I just need to get the whole thing demuxed.
Seems about right for the number of packets reported by xport (4032436). 4032436 * 192 = 774,227,712. Why do you think it's too small?

Ron

Chouonsoku
8th October 2007, 07:26
Seems about right for the number of packets reported by xport (4032436). 4032436 * 192 = 774,227,712. Why do you think it's too small?

Ron

Mostly because it's a full concert and the audio only runs for 14 minutes of that. Also because the Dolby Digital track extracted from TsRemux is much longer, running in at an hour and 46 minutes.

drmpeg
8th October 2007, 07:39
Mostly because it's a full concert and the audio only runs for 14 minutes of that. Also because the Dolby Digital track extracted from TsRemux is much longer, running in at an hour and 46 minutes.
Okay, I think I know what's wrong. I'll see if I can come up with a fix.

Ron

Chouonsoku
8th October 2007, 07:43
Okay, I think I know what's wrong. I'll see if I can come up with a fix.

Ron

That'd be great, thanks. :)

drmpeg
8th October 2007, 11:58
Here's the fix (which I've called version 0.98a).

http://www.w6rz.net/xport.zip

I've improved the HDMV packet synchronization. HDMV demuxing was added to xport as a quick hack to get folks going with AVCHD captures, and the previous versions expect an error free HDMV file. Of course, that's overly optimistic, so I've made the packet parser more robust. Hopefully this will do the trick.

Ron

Chouonsoku
8th October 2007, 15:12
Here's the fix (which I've called version 0.98a).

http://www.w6rz.net/xport.zip

I've improved the HDMV packet synchronization. HDMV demuxing was added to xport as a quick hack to get folks going with AVCHD captures, and the previous versions expect an error free HDMV file. Of course, that's overly optimistic, so I've made the packet parser more robust. Hopefully this will do the trick.

Ron

Unfortunately, I just tried the new version and the output files are the same. The demuxed audio still cuts off at 14 minutes.

Edit: I just listened to the audio fully because, well, I like Incubus enough to only hear the first 14 minutes of it. :P But, in the process I noticed that the audio doesn't really stop demuxing, the output is just missing parts of the audio. For example, at 2:46, it cuts forward into the audio like it just skipped it demxuing that portion entirely. I'm listening to the audio now and I'll compile a list of where the skips occur.

Chouonsoku
8th October 2007, 15:33
Okay, cut off points are 2:46, 7:00 and 14:00. The first two the audio cuts from one point in the concert to another, I'm not sure how far in each cut is. 14:00 is where the actual audio stops completely, and it's before the concert is over.

drmpeg
9th October 2007, 06:24
Unfortunately, I just tried the new version and the output files are the same. The demuxed audio still cuts off at 14 minutes.
Bummer. That was my best shot. As it turns out, this issue was reported before.

http://forum.doom9.org/showthread.php?p=1029874#post1029874

So something is wrong, but it's too difficult to debug without having the problematic streams to play with.

Ron