Log in

View Full Version : mpeg2 from m2ts tracks?


jwa999
19th March 2007, 22:14
I was playing with an .m2ts trying to get DGIndex to analize it.

I demuxed the mpeg2 track but DGindex still has trouble with it.
Only the top 3rd or so is decoded properly, the rest is garbage. Preview reports various errors, mostbly "block error".
The mpeg2 track is 1920x1080 and plays back fine with the mpv/mpeg2 decoder filter, so I can use DirectShowSource to process it, but i was just curious. Couldn't find any mention of m2ts in the dgindex forum.

Perhaps my demuxing is wrong? I used graphedit. A nero splitter reads the m2ts and then I saved the streams into a mkv container.

Then I used mkvextract to get the raw streams. Both the mkv and the raw mpeg streams play correct.

The other possibility is that the mpeg2 frames are too big?
The average framesize is over 94K. Althouhg I have regular TS streams of similar size...

Guest
19th March 2007, 22:54
I believe the transport packet size is different. Give me a sample of the m2ts and I'll fix it for you. Give it to me now and you might even get it tonight as I plan to release a new beta.

Guest
20th March 2007, 06:49
Supported in DGMPGDec 1.4.9 beta 15.

Thank you for making the test files available, jwa999.

Indeed, the transport packets have 4 extra bytes ahead of the sync byte. And the audio stream_id is 0xfd instead of 0xbd.

I tested the AC3 audio but couldn't test any other audio formats for want of test files. Anyway, I don't even know what audio is supported in this file format, so I will support other formats as and when they crop up.

jwa999
20th March 2007, 16:50
Excellent, thanks very much. The video part works like charm.

About the audio, i noticed the ac3 track that is extracted is a little longer in size and not all programs like it (zoomplayer, mpc, mkvmerge). The bitrate is 4kbps higher. (196.2kbps instead of 192.0kbps, 644.3kbps instead of 640.0kbps)

However, when i import it into virtualdubmod and then demux from there, it's converted back into the "regular" format.

Also, the reported DELAY is always -11650ms on the tracks that I tried.

Cheers, jwa.

Guest
20th March 2007, 17:53
I'll look into it tonight.

Guest
21st March 2007, 02:10
Fixed in beta 16:

http://neuron2.net/dgmpgdec/dgmpgdec149b16.zip

jwa999
21st March 2007, 16:52
Kool, you're fast.. Feels like I have a personal programmer here. Let's see what else I can think of :)
Just kidding. We all appreciate your hard work!

Cheers, jwa.