Log in

View Full Version : Demux AC3 From Transport Stream Command Line Tool


blazerqb11
29th August 2009, 18:57
I need a command line tool that will demux an AC3 stream from a .TS TV capture. I've tried xport, DGIndex, and bbDmux with the following results.

I've never gotten anything but a empty .mpa file with xport.

The GUI of DGIndex works like a charm, but as far as I know there isn't a way to demux an audio-only stream from the CLI. If someone could show me how this would be my preferred solution.

bbDmux seems to work, but it gives me an output file that is 4GB from a .TS file that is only 2GB. MediaInfo interprets its an AC3 file that is 50 hours long and I can't seek in the file, so I'm guess that something probably isn't right. Either way BeSplit can't work with it, which means it is useless to me.

b66pak
29th August 2009, 19:21
use eac3to:

http://forum.doom9.org/showthread.php?t=125966


first:

eac3to myvideo.ts


you will get something like this (this is an example from a .mkv!):

MKV, 1 video track, 1 audio track, 0:44:44, 25p
1: h264/AVC, English, 656x480 25p
2: MP2, 2.0 channels, 192kbps, 48khz, 244ms

your audio is track number 2!

then:

eac3to myvideo.ts 2: myaudio.mp2
_

blazerqb11
30th August 2009, 20:35
Hmm... It does output a playable and seekable ac3 file but it gives me this error "a02 x:xx:xx The source file seems to be damaged (incorrect table_id)." several times a second and the resulting ac3 is de-synced from my video. The resulting ac3 from the DGIndex GUI is not de-synced, however. An audio delay would probably fix the problem but if there is another way of fixing it I would most likely prefer the other option.

Edit: In the log file it says that "[a02] A remaining delay of +7ms could not be fixed.". A delay of this much does not re-sync it. However a delay of 0.7 seconds does as far as I can tell.

setarip_old
30th August 2009, 21:51
Hi!

You might try "tsMuxeR" (usable from both CLI and GUI)...

blazerqb11
30th August 2009, 23:39
Wow, I've got no luck with this at all. TsMuxer crashes when I try to open my TS file with either the GUI or the CLI.

setarip_old
31st August 2009, 00:51
1) What software and procedures did you use to capture the .TS file?

2) Does the captured file PLAY properly?

3)TsMuxer crashes when I try to open my TS fileWhat do you mean by "open" when you used the GUI?

blazerqb11
31st August 2009, 01:43
1) I used the Pinnacle software that came with the "Pinnacle PCTV HD Ultimate Stick TV Tuner", the card I am using. I wouldn't be shocked if it was causing some problems. I'm not sure what you mean by procedures.

2) The captured file plays properly in MPlayer and Windows Media Player. However, if I close Windows Media Player it continues to play until I open the task manager and kill the process.

3) I mean attempting to "Add" the file on the "Input" tab.

stax76
31st August 2009, 04:54
but as far as I know there isn't a way to demux an audio-only stream from the CLI.

It's possible and well documented.

netmask
31st August 2009, 05:47
I need a command line tool that will demux an AC3 stream from a .TS TV capture. I've tried xport, DGIndex, and bbDmux with the following results.

I've never gotten anything but a empty .mpa file with xport.

The GUI of DGIndex works like a charm, but as far as I know there isn't a way to demux an audio-only stream from the CLI. If someone could show me how this would be my preferred solution.

bbDmux seems to work, but it gives me an output file that is 4GB from a .TS file that is only 2GB. MediaInfo interprets its an AC3 file that is 50 hours long and I can't seek in the file, so I'm guess that something probably isn't right. Either way BeSplit can't work with it, which means it is useless to me.

Have you tried ProjectX? If you only want to demux the AC3 track just untick all the other file type options under Audio presettings. See my sig for a Wiki illustrated options for ProjectX

stax76
31st August 2009, 11:19
ProjectX is very robust, does it still lack HD/AVC support?

blazerqb11
31st August 2009, 14:34
It's possible and well documented.

Yeah, I've been talking to neuron2 about it and have successfully demuxed the ac3 stream using the command line in DGIndex. But actually, technically, it's not possible to do audio only demuxing through the CLI. According to neuron2, that option in the GUI is for demuxing of streams that don't have video, so in any case it shouldn't apply to my situation. The only problem is the audio resulting from the CLI is de-synced from my video.

To setarip_old:
I allowed the Pinnacle software, called TVCenter Pro, to mux the capture into an mpeg instead of a TS and this allowed TsMuxer successfully open it, or add it, and accept it as parameter from the command line. I was also able to demux the ac3 stream but haven't tested as to whether it is synced or not.

Is it possible to demux from the CLI without using a meta file?

Guest
31st August 2009, 14:38
The only problem is the audio resulting from the CLI is de-synced from my video. As I explained in PM, the audio is demuxed with a reported delay value. It is intended that you adjust for that delay in your script.

Have you looked at drmpeg's xport.exe?

blazerqb11
31st August 2009, 14:48
As I explained in PM, the audio is demuxed with a reported delay value. It is intended that you adjust for that delay in your script.

Yes, I was just about to PM you back. The filename is "1 PID 881 2_0ch 192Kbps DELAY -569ms.ac3" so I used AviSynth to DelayAudio(-0.569) and the audio is still de-synced.

Interestingly passing the video as a parameter to eac3to gives the result:

1: MPEG2, 528x480 30p /1.001 (4:3)
2: AC3, English, 2.0 channels, 192kbps, 48khz, dialnorm: -26dB, -729ms

If I delay the audio the difference between the two delays, i.e. 160ms, the video syncs up with the audio I get from the command line.

Yes, I tired using xport, however, I don't really know what to pass as the <program number>, <video stream number>, and <audio stream number>, I've tried xport "path\video.ts" 1 1 1 and xport "path\video.ts" 1 1 0 and xport "path\video.ts" 1 1 2, and a few other's, but it always results in a 0 byte mpa and mpv file.

stax76
31st August 2009, 15:03
You say eac3to got the delay right and DGIndex not? neuron2 is probably interested in a sample clip. I realize now it's not AVC so ProjectX will work, my experience with ProjectX is it's extremely reliable and robust, in fact I can't remember it ever failed on any on my streams. I've hardly used DGIndex without using ProjectX before on DVB streams because at least in the past DGIndex did not work right on DVB streams, maybe it has improved but as you say there are still problems. Why do you need a command line tool btw? Wouldn't it be easier to use StaxRip as SD TS captures is one of StaxRip's strengths.

blazerqb11
31st August 2009, 15:10
You say eac3to got the delay right and DGIndex not? neuron2 is probably interested in a sample clip. I realize now it's not AVC so ProjectX will work, my experience with ProjectX is it's extremely reliable and robust, in fact I can't remember it ever failed on any on my streams. I've hardly used DGIndex without using ProjectX before on DVB streams because at least in the past DGIndex did not work right on DVB streams, maybe it has improved but as you say there are still problems. Why do you need a command line tool btw? Wouldn't it be easier to use StaxRip as SD TS captures is one of StaxRip's strengths.

I will try Project X. I need a command line tool for use in a batch file.

stax76
31st August 2009, 15:19
Maybe easier to use StaxRip's batch file mode.

drmpeg
31st August 2009, 15:37
xport should work for you. You just need to get that hang of it. If you could, just cut and paste the results and I'll guide you through it. Like this:


C:\xfer>xport kaxt.ts 1 1 1
xport Transport Stream Demuxer 1.01
program = 1, video channel = 1, audio channel = 1
Program Number = 1 (0x0001), Program Map PID = 128 (0x0080)
Program Number = 2 (0x0002), Program Map PID = 144 (0x0090)
Program Number = 3 (0x0003), Program Map PID = 256 (0x0100)
Program Number = 4 (0x0004), Program Map PID = 272 (0x0110)
Program Number = 5 (0x0005), Program Map PID = 288 (0x0120)
Program Number = 6 (0x0006), Program Map PID = 304 (0x0130)
Program Number = 7 (0x0007), Program Map PID = 320 (0x0140)
Program Number = 8 (0x0008), Program Map PID = 336 (0x0150)
Program Number = 9 (0x0009), Program Map PID = 352 (0x0160)
Program Number = 10 (0x000a), Program Map PID = 368 (0x0170)
Program Number = 11 (0x000b), Program Map PID = 384 (0x0180)
Program Number = 12 (0x000c), Program Map PID = 400 (0x0190)
Video PID = 129 <0x0081>, type = 0x02
Audio PID = 130 <0x0082>, type = 0x81
Audio Bitrate = 112000, Audio Sampling Rate = 48000
Audio Mode = 2/0, bsid = 8, bsmod = 0
Sequence Header found
16 frames before first Sequence Header
Horizontal size = 544
Vertical size = 480
Aspect ratio = 4:3
Frame rate = 29.97
Sequence header bitrate = 15000000 bps
Progressive Sequence = 0
First Video PTS = 0x6f1d89a0
First Audio PTS = 0x6f1d876e, -562
ts rate = 19392792, video rate = 1613682
packets for pid 0 <0x0000> = 1204, first = 69, last = 2326821
packets for pid 128 <0x0080> = 570, first = 1154, last = 2324462
packets for pid 129 <0x0081> = 203950, first = 4, last = 2327940
packets for pid 130 <0x0082> = 14670, first = 14, last = 2327941
packets for pid 144 <0x0090> = 570, first = 1155, last = 2324463
packets for pid 145 <0x0091> = 100721, first = 13, last = 2327927
packets for pid 146 <0x0092> = 14669, first = 79, last = 2327856
packets for pid 256 <0x0100> = 570, first = 1158, last = 2324466
packets for pid 257 <0x0101> = 122928, first = 2, last = 2327924
packets for pid 258 <0x0102> = 12412, first = 64, last = 2327783
packets for pid 272 <0x0110> = 570, first = 1153, last = 2324461
packets for pid 273 <0x0111> = 147350, first = 7, last = 2327921
packets for pid 274 <0x0112> = 12412, first = 101, last = 2327803
packets for pid 288 <0x0120> = 570, first = 1150, last = 2324458
packets for pid 289 <0x0121> = 134246, first = 16, last = 2327932
packets for pid 290 <0x0122> = 12412, first = 131, last = 2327840
packets for pid 304 <0x0130> = 570, first = 1157, last = 2324465
packets for pid 305 <0x0131> = 47942, first = 24, last = 2327931
packets for pid 306 <0x0132> = 12412, first = 175, last = 2327863
packets for pid 320 <0x0140> = 570, first = 1151, last = 2324459
packets for pid 321 <0x0141> = 258472, first = 8, last = 2327938
packets for pid 322 <0x0142> = 15798, first = 39, last = 2327898
packets for pid 336 <0x0150> = 570, first = 1152, last = 2324460
packets for pid 337 <0x0151> = 153486, first = 3, last = 2327925
packets for pid 338 <0x0152> = 12412, first = 187, last = 2327874
packets for pid 352 <0x0160> = 570, first = 1147, last = 2324457
packets for pid 353 <0x0161> = 247160, first = 5, last = 2327939
packets for pid 354 <0x0162> = 12413, first = 1, last = 2327879
packets for pid 368 <0x0170> = 570, first = 1159, last = 2324468
packets for pid 369 <0x0171> = 254880, first = 6, last = 2327937
packets for pid 370 <0x0172> = 12412, first = 185, last = 2327852
packets for pid 384 <0x0180> = 570, first = 1160, last = 2324469
packets for pid 385 <0x0181> = 250264, first = 12, last = 2327929
packets for pid 386 <0x0182> = 12412, first = 82, last = 2327767
packets for pid 400 <0x0190> = 570, first = 1156, last = 2324464
packets for pid 401 <0x0191> = 179163, first = 15, last = 2327936
packets for pid 402 <0x0192> = 12412, first = 176, last = 2327861
packets for pid 7424 <0x1d00> = 8101, first = 17, last = 2326921
packets for pid 7425 <0x1d01> = 812, first = 17138, last = 2317400
packets for pid 7426 <0x1d02> = 736, first = 1135, last = 2319765
packets for pid 7427 <0x1d03> = 690, first = 3984, last = 2322622
packets for pid 7680 <0x1e00> = 24047, first = 110, last = 2327897
packets for pid 7681 <0x1e01> = 2795, first = 841, last = 2327602
packets for pid 7682 <0x1e02> = 2737, first = 792, last = 2327796
packets for pid 7683 <0x1e03> = 2723, first = 1337, last = 2327747
packets for pid 8187 <0x1ffb> = 4929, first = 63, last = 2326778
packets for pid 8191 <0x1fff> = 14919, first = 150, last = 2327838
coded pictures = 5083, video fields = 10796
Ending audio to video PTS difference = -36676 ticks, -407.511111 milliseconds

C:\xfer>


Notice that it prints all the available programs in the stream. If you don't see a list of at least one program, then there's no PAT in the stream and xport will not work for that kind of capture.

Ron

blazerqb11
31st August 2009, 15:46
Maybe easier to use StaxRip's batch file mode.

I'll give it a shot when I get a chance.

If you could, just cut and paste the results

xport "video.TS" 1 1 1
xport Transport Stream Demuxer 1.01
program = 1, video channel = 1, audio channel = 1
Program Number = 8 (0x0008), Program Map PID = 48 (0x0030)
Program Number = 1 (0x0001), Program Map PID = 49 (0x0031)
Program Number = 3 (0x0003), Program Map PID = 50 (0x0032)
Program Number = 6 (0x0006), Program Map PID = 52 (0x0034)
Program Number = 7 (0x0007), Program Map PID = 53 (0x0035)
Program Number = 10 (0x000a), Program Map PID = 55 (0x0037)
Program Number = 2 (0x0002), Program Map PID = 56 (0x0038)
Program Number = 9 (0x0009), Program Map PID = 51 (0x0033)
Program Number = 5 (0x0005), Program Map PID = 54 (0x0036)
Discontinuity!, pid = 1 <0x0001>, received = 10, expected = 9, at 75669
Discontinuity!, pid = 1 <0x0001>, received = 13, expected = 12, at 1091088
Discontinuity!, pid = 2177 <0x0881>, received = 13, expected = 8, at 1196681
Discontinuity!, pid = 1 <0x0001>, received = 9, expected = 8, at 1238675
Discontinuity!, pid = 2176 <0x0880>, received = 2, expected = 1, at 1296996
Discontinuity!, pid = 2176 <0x0880>, received = 4, expected = 3, at 1296997
Discontinuity!, pid = 2176 <0x0880>, received = 7, expected = 6, at 1297000
Discontinuity!, pid = 2176 <0x0880>, received = 9, expected = 8, at 1297001
Discontinuity!, pid = 2176 <0x0880>, received = 11, expected = 9, at 1918057
Discontinuity!, pid = 1 <0x0001>, received = 12, expected = 11, at 2061485
Discontinuity!, pid = 1 <0x0001>, received = 8, expected = 7, at 2152775
Discontinuity!, pid = 2176 <0x0880>, received = 12, expected = 9, at 2312631
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 13, at 2312632
Discontinuity!, pid = 2176 <0x0880>, received = 3, expected = 15, at 2312633
Discontinuity!, pid = 2176 <0x0880>, received = 6, expected = 4, at 2312634
Discontinuity!, pid = 2176 <0x0880>, received = 11, expected = 7, at 2312635
Discontinuity!, pid = 1 <0x0001>, received = 15, expected = 14, at 2792896
Discontinuity!, pid = 1 <0x0001>, received = 11, expected = 10, at 2958018
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 13, at 3186711
Discontinuity!, pid = 2176 <0x0880>, received = 3, expected = 2, at 3186715
Discontinuity!, pid = 2176 <0x0880>, received = 5, expected = 4, at 3186716
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 13, at 4080718
Discontinuity!, pid = 2176 <0x0880>, received = 5, expected = 4, at 4080724
Discontinuity!, pid = 2176 <0x0880>, received = 11, expected = 10, at 4454633
Discontinuity!, pid = 2176 <0x0880>, received = 15, expected = 13, at 4454635
Discontinuity!, pid = 2177 <0x0881>, received = 15, expected = 11, at 4622930
Discontinuity!, pid = 2176 <0x0880>, received = 5, expected = 2, at 5481208
Discontinuity!, pid = 2176 <0x0880>, received = 10, expected = 6, at 5481209
Discontinuity!, pid = 2176 <0x0880>, received = 7, expected = 6, at 5481239
Discontinuity!, pid = 2176 <0x0880>, received = 9, expected = 8, at 5481240
Discontinuity!, pid = 2177 <0x0881>, received = 6, expected = 5, at 5488270
Discontinuity!, pid = 2176 <0x0880>, received = 2, expected = 1, at 6174957
Discontinuity!, pid = 2176 <0x0880>, received = 13, expected = 12, at 6267705
Discontinuity!, pid = 2176 <0x0880>, received = 12, expected = 11, at 6747499
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 11, at 6791164
Discontinuity!, pid = 2177 <0x0881>, received = 10, expected = 12, at 7814101
Discontinuity!, pid = 2176 <0x0880>, received = 12, expected = 10, at 9251191
Discontinuity!, pid = 2176 <0x0880>, received = 7, expected = 5, at 9968010
Discontinuity!, pid = 1 <0x0001>, received = 13, expected = 12, at 9985746
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 13, at 10122898
Discontinuity!, pid = 2176 <0x0880>, received = 6, expected = 5, at 10174009
Discontinuity!, pid = 2176 <0x0880>, received = 8, expected = 6, at 10586575
Discontinuity!, pid = 2176 <0x0880>, received = 0, expected = 15, at 10586582
Discontinuity!, pid = 2177 <0x0881>, received = 1, expected = 0, at 10586616
Discontinuity!, pid = 2176 <0x0880>, received = 8, expected = 4, at 10849154
Discontinuity!, pid = 2176 <0x0880>, received = 2, expected = 1, at 11059357
Discontinuity!, pid = 2176 <0x0880>, received = 5, expected = 3, at 11059358
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 12, at 11059365
Discontinuity!, pid = 2176 <0x0880>, received = 0, expected = 15, at 11059372
Discontinuity!, pid = 2177 <0x0881>, received = 5, expected = 4, at 11237599
Discontinuity!, pid = 2177 <0x0881>, received = 4, expected = 8, at 11323795
Discontinuity!, pid = 51 <0x0033>, received = 11, expected = 10, at 11656343
Discontinuity!, pid = 2176 <0x0880>, received = 7, expected = 6, at 11808234
Discontinuity!, pid = 2176 <0x0880>, received = 12, expected = 10, at 11808237
Discontinuity!, pid = 2176 <0x0880>, received = 2, expected = 1, at 11817411
Discontinuity!, pid = 2177 <0x0881>, received = 4, expected = 3, at 12056564

packets for pid 0 <0x0000> = 25249, first = 293, last = 12174990
packets for pid 1 <0x0001> = 6292, first = 2544, last = 12173794
packets for pid 51 <0x0033> = 119605, first = 40, last = 12175170
packets for pid 2176 <0x0880> = 11195366, first = 1, last = 12175238
packets for pid 2177 <0x0881> = 828726, first = 32, last = 12175189
coded pictures = 0, video fields = 0
Ending audio to video PTS difference = 0 ticks, 0.000000 milliseconds

Guest
31st August 2009, 15:49
neuron2 is probably interested in a sample clip. Yes, indeed. Only the beginning of the stream is needed. 100MB will be good.

There are known pathologies that can cause this behavior, so if you want a definitive answer, please post a link to the stream.

blazerqb11
31st August 2009, 15:59
Yes, indeed. Only the beginning of the stream is needed. 100MB will be good.

There are known pathologies that can cause this behavior, so if you want a definitive answer, please post a link to the stream.

How do I split it? All the TS streams seem to have a similar problem, I could just record one that is about 100MB.

buzzqw
31st August 2009, 17:47
you can use the excellent DGSplit by Neuron2 :)

BHH

blazerqb11
31st August 2009, 18:15
Yes, indeed. Only the beginning of the stream is needed. 100MB will be good.

There are known pathologies that can cause this behavior, so if you want a definitive answer, please post a link to the stream.

Ok, I got a fresh one for you.

http://www.megaupload.com/?d=DOZMMI5X

Edit: Also, after extremely in depth comparison, I was able to find that DGIndex GUI's "Audio-Only" output is actually de-synced by about 1 frame at the beginning and about 2 frames about 2/3 of the way through the 1 hour and 40 minute video.

Guest
31st August 2009, 19:00
Ok, I got a fresh one for you.

http://www.megaupload.com/?d=DOZMMI5X Since it is a "fresh one", please describe the behavior that you think is incorrect.

blazerqb11
31st August 2009, 19:30
Since it is a "fresh one", please describe the behavior that you think is incorrect.

I don't know if it's incorrect, but I'll explain what it is doing. If I demux the audio with the GUI's option "Demux Audio-Only Stream" it syncs almost perfectly, maybe one frame off. If I demux using the CLI I get a filename that reads "Unknown (891.9) 2009-08-31_080100.TS PID 881 2_0ch 192Kbps DELAY -212ms.ac3". This does not sync up. So then I use eac3to to check the delay and it prints out -532ms. Then I use DelayAudio(0.320) in AviSynth(0.320 being the difference in seconds of the two delays) and it once again syncs up near perfectly.

It is basically the same situation as the other file except the actual delays were different. In both cases the difference in delays re-synced the audio.

Guest
31st August 2009, 21:43
This does not sync up. Sync up with what? The video served via DGDecode for the corresponding D2V file, or video that you have demuxed? The reported delay value is valid only for the first one. So I created a project and then used this script:

loadplugin("c:\dgmpgdec\dgdecode.dll")
vid=mpeg2source("Unknown (891.9) 2009-08-31_080100.d2v")
aud=nicac3source("Unknown (891.9) 2009-08-31_080100 PID 881 2_0ch 192Kbps DELAY -212ms.ac3").delayaudio(-0.212)
audiodub(vid,aud)


The sync is fine as far as I can see.

If you are trying to sync to video that you have demuxed rather than to video served from the D2V file, then please say so and we will take it from there.

drmpeg
31st August 2009, 22:07
Give this a try:

xport video.TS 9 1 1

Your test stream is a "partial" TS. That is, it has a lot of programs in the PAT, but only one program has actually been captured. The summary of packets dumped at the end shows that there are packets on PID 0, 1, 0x33, 0x880 and 0x881. The list of programs shows that program 9 is using PID 0x33 for it's PMT, so this partial TS is for program 9.

Ron


xport "video.TS" 1 1 1
xport Transport Stream Demuxer 1.01
program = 1, video channel = 1, audio channel = 1
Program Number = 8 (0x0008), Program Map PID = 48 (0x0030)
Program Number = 1 (0x0001), Program Map PID = 49 (0x0031)
Program Number = 3 (0x0003), Program Map PID = 50 (0x0032)
Program Number = 6 (0x0006), Program Map PID = 52 (0x0034)
Program Number = 7 (0x0007), Program Map PID = 53 (0x0035)
Program Number = 10 (0x000a), Program Map PID = 55 (0x0037)
Program Number = 2 (0x0002), Program Map PID = 56 (0x0038)
Program Number = 9 (0x0009), Program Map PID = 51 (0x0033)
Program Number = 5 (0x0005), Program Map PID = 54 (0x0036)
Discontinuity!, pid = 1 <0x0001>, received = 10, expected = 9, at 75669
Discontinuity!, pid = 1 <0x0001>, received = 13, expected = 12, at 1091088
Discontinuity!, pid = 2177 <0x0881>, received = 13, expected = 8, at 1196681
Discontinuity!, pid = 1 <0x0001>, received = 9, expected = 8, at 1238675
Discontinuity!, pid = 2176 <0x0880>, received = 2, expected = 1, at 1296996
Discontinuity!, pid = 2176 <0x0880>, received = 4, expected = 3, at 1296997
Discontinuity!, pid = 2176 <0x0880>, received = 7, expected = 6, at 1297000
Discontinuity!, pid = 2176 <0x0880>, received = 9, expected = 8, at 1297001
Discontinuity!, pid = 2176 <0x0880>, received = 11, expected = 9, at 1918057
Discontinuity!, pid = 1 <0x0001>, received = 12, expected = 11, at 2061485
Discontinuity!, pid = 1 <0x0001>, received = 8, expected = 7, at 2152775
Discontinuity!, pid = 2176 <0x0880>, received = 12, expected = 9, at 2312631
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 13, at 2312632
Discontinuity!, pid = 2176 <0x0880>, received = 3, expected = 15, at 2312633
Discontinuity!, pid = 2176 <0x0880>, received = 6, expected = 4, at 2312634
Discontinuity!, pid = 2176 <0x0880>, received = 11, expected = 7, at 2312635
Discontinuity!, pid = 1 <0x0001>, received = 15, expected = 14, at 2792896
Discontinuity!, pid = 1 <0x0001>, received = 11, expected = 10, at 2958018
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 13, at 3186711
Discontinuity!, pid = 2176 <0x0880>, received = 3, expected = 2, at 3186715
Discontinuity!, pid = 2176 <0x0880>, received = 5, expected = 4, at 3186716
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 13, at 4080718
Discontinuity!, pid = 2176 <0x0880>, received = 5, expected = 4, at 4080724
Discontinuity!, pid = 2176 <0x0880>, received = 11, expected = 10, at 4454633
Discontinuity!, pid = 2176 <0x0880>, received = 15, expected = 13, at 4454635
Discontinuity!, pid = 2177 <0x0881>, received = 15, expected = 11, at 4622930
Discontinuity!, pid = 2176 <0x0880>, received = 5, expected = 2, at 5481208
Discontinuity!, pid = 2176 <0x0880>, received = 10, expected = 6, at 5481209
Discontinuity!, pid = 2176 <0x0880>, received = 7, expected = 6, at 5481239
Discontinuity!, pid = 2176 <0x0880>, received = 9, expected = 8, at 5481240
Discontinuity!, pid = 2177 <0x0881>, received = 6, expected = 5, at 5488270
Discontinuity!, pid = 2176 <0x0880>, received = 2, expected = 1, at 6174957
Discontinuity!, pid = 2176 <0x0880>, received = 13, expected = 12, at 6267705
Discontinuity!, pid = 2176 <0x0880>, received = 12, expected = 11, at 6747499
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 11, at 6791164
Discontinuity!, pid = 2177 <0x0881>, received = 10, expected = 12, at 7814101
Discontinuity!, pid = 2176 <0x0880>, received = 12, expected = 10, at 9251191
Discontinuity!, pid = 2176 <0x0880>, received = 7, expected = 5, at 9968010
Discontinuity!, pid = 1 <0x0001>, received = 13, expected = 12, at 9985746
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 13, at 10122898
Discontinuity!, pid = 2176 <0x0880>, received = 6, expected = 5, at 10174009
Discontinuity!, pid = 2176 <0x0880>, received = 8, expected = 6, at 10586575
Discontinuity!, pid = 2176 <0x0880>, received = 0, expected = 15, at 10586582
Discontinuity!, pid = 2177 <0x0881>, received = 1, expected = 0, at 10586616
Discontinuity!, pid = 2176 <0x0880>, received = 8, expected = 4, at 10849154
Discontinuity!, pid = 2176 <0x0880>, received = 2, expected = 1, at 11059357
Discontinuity!, pid = 2176 <0x0880>, received = 5, expected = 3, at 11059358
Discontinuity!, pid = 2176 <0x0880>, received = 14, expected = 12, at 11059365
Discontinuity!, pid = 2176 <0x0880>, received = 0, expected = 15, at 11059372
Discontinuity!, pid = 2177 <0x0881>, received = 5, expected = 4, at 11237599
Discontinuity!, pid = 2177 <0x0881>, received = 4, expected = 8, at 11323795
Discontinuity!, pid = 51 <0x0033>, received = 11, expected = 10, at 11656343
Discontinuity!, pid = 2176 <0x0880>, received = 7, expected = 6, at 11808234
Discontinuity!, pid = 2176 <0x0880>, received = 12, expected = 10, at 11808237
Discontinuity!, pid = 2176 <0x0880>, received = 2, expected = 1, at 11817411
Discontinuity!, pid = 2177 <0x0881>, received = 4, expected = 3, at 12056564

packets for pid 0 <0x0000> = 25249, first = 293, last = 12174990
packets for pid 1 <0x0001> = 6292, first = 2544, last = 12173794
packets for pid 51 <0x0033> = 119605, first = 40, last = 12175170
packets for pid 2176 <0x0880> = 11195366, first = 1, last = 12175238
packets for pid 2177 <0x0881> = 828726, first = 32, last = 12175189
coded pictures = 0, video fields = 0
Ending audio to video PTS difference = 0 ticks, 0.000000 milliseconds

blazerqb11
31st August 2009, 22:53
Sync up with what? The video served via DGDecode for the corresponding D2V file, or video that you have demuxed? The reported delay value is valid only for the first one. So I created a project and then used this script:

loadplugin("c:\dgmpgdec\dgdecode.dll")
vid=mpeg2source("Unknown (891.9) 2009-08-31_080100.d2v")
aud=nicac3source("Unknown (891.9) 2009-08-31_080100 PID 881 2_0ch 192Kbps DELAY -212ms.ac3").delayaudio(-0.212)
audiodub(vid,aud)


The sync is fine as far as I can see.

If you are trying to sync to video that you have demuxed rather than to video served from the D2V file, then please say so and we will take it from there.

Mmm, yes I did demux it, or rather remux it, using MEncoder and you are absolutely correct in everything you said. The sync is perfect when compared to the original file. My only question is whether DGIndex can apply the delay automatically.

blazerqb11
31st August 2009, 22:57
Give this a try:

xport video.TS 9 1 1

Your test stream is a "partial" TS. That is, it has a lot of programs in the PAT, but only one program has actually been captured. The summary of packets dumped at the end shows that there are packets on PID 0, 1, 0x33, 0x880 and 0x881. The list of programs shows that program 9 is using PID 0x33 for it's PMT, so this partial TS is for program 9.

Ron

Yep, that did demux the ac3 stream also.

I also got tsmuxer working correctly with an MPEG.

netmask
31st August 2009, 23:27
ProjectX is very robust, does it still lack HD/AVC support?

Only supports MPG video (HD or SD), MPG audio, AC3/DTS audio LPCM audio, Teletext Subtitels. No other support has been added. In otherwords it is a European, Australian PAL digital TV support program. It will demux VOBs as well.

Guest
31st August 2009, 23:27
Mmm, yes I did demux it, or rather remux it, using MEncoder and you are absolutely correct in everything you said. The sync is perfect when compared to the original file. My only question is whether DGIndex can apply the delay automatically. Your answer is still unclear to me.

You can create an Avisynth template that makes the script automatically with the correct delay value.

blazerqb11
31st August 2009, 23:50
Your answer is still unclear to me.

You can create an Avisynth template that makes the script automatically with the correct delay value.

Well, I actually want to process the audio separately from AviSynth.

Guest
1st September 2009, 02:02
That's what I figured. So "xport" is your ticket.

I just wanted to clear up your possible FUD about DGIndex not doing sync correctly. :)

blazerqb11
1st September 2009, 03:12
That's what I figured. So "xport" is your ticket.

I just wanted to clear up your possible FUD about DGIndex not doing sync correctly. :)

Yeah, thanks for your patience. I really appreciate your help.

stax76
1st September 2009, 15:04
If there are issues converting a capture it should however always be considered if there might be a better capture application. I've bought DVBViewer and MediaMonkey, two killer applications with extremely rich COM+ automation SDK resulting in a huge amount of available addins/extensions, affordable and highly recommendable. (I've nothing to do with their business, just much respect for their work)

blazerqb11
1st September 2009, 17:56
Give this a try:

xport video.TS 9 1 1

Your test stream is a "partial" TS. That is, it has a lot of programs in the PAT, but only one program has actually been captured. The summary of packets dumped at the end shows that there are packets on PID 0, 1, 0x33, 0x880 and 0x881. The list of programs shows that program 9 is using PID 0x33 for it's PMT, so this partial TS is for program 9.

Ron

So, for this video, would the proper way to demux the video stream also, be xport -d video.TS 9 1 1?

rica
1st September 2009, 20:10
How do I split it? All the TS streams seem to have a similar problem, I could just record one that is about 100MB.

OK then, just record a 100 MB clip.

(btw you can use DGSplit)

stax76
2nd September 2009, 04:44
If I understand correctly then xport is a demuxer that can handle AVC TS files, can't it automatically demux all streams? Dealing with stream ID appears rather cumbersome to me.

Guest
2nd September 2009, 14:15
So, for this video, would the proper way to demux the video stream also, be xport -d video.TS 9 1 1? You don't need the -d option. Ron already gave you the correct command line.

blazerqb11
2nd September 2009, 19:04
You don't need the -d option. Ron already gave you the correct command line.

xport video.TS 9 1 1 as far as I can tell results in a proper .mpa but a blank .mpv, whereas xport -d video.TS 9 1 1 gives me both the video and audio.

It is somewhat irrelevant at this point though. The video sync was so great in DGIndex, that I decided I'm going to use it and just effectively apply the delay when I split with BeSplit.