Log in

View Full Version : Muxing HDTV MPEG?


Airw0lf
23rd September 2006, 07:46
Hi,

A couple months ago I came across a short European football clip in high definition. The clip was of course PAL, and came packaged as a .mpg. Video resolution was 1080i, and presumably MPEG-2.

I opened the file in Media Player Classic, only to see it play really badly, with stops and stutters everywhere. I suspected that the mpg may have been packed badly and used bbdmux to extract a MPEG-2 video file and a MPEG-1 audio file.

I opened the extracted video file in Media Player Classic, and used the audio file as the dub. Everything played perfectly, so all I needed to do now was to remux everything together properly...

I opened up bbmpeg and muxed the two streams together using the MPEG-2 program stream setting. At the end of the mux I got a whole pile of warnings, which I was expecting because I only went with the default MPEG-2 packet sizes. Log file at the bottom of my post.

Anyway, I went ahead and played the resulting file and all seems well. What I want to know is, is this the best way to go about muxing this type of video?


video PTS (470540.00ms) underflow at pack 536787 by 22.45ms
video PTS (470580.00ms) underflow at pack 536815 by 3.40ms
video PTS (474380.00ms) underflow at pack 541231 by 18.65ms
video PTS (474500.00ms) underflow at pack 541371 by 3.37ms
video PTS (474540.00ms) underflow at pack 541424 by 3.01ms
video PTS (474620.00ms) underflow at pack 541532 by 3.78ms
video PTS (480140.00ms) underflow at pack 547833 by 23.80ms
video PTS (482060.00ms) underflow at pack 550026 by 6.57ms
video PTS (490220.00ms) underflow at pack 559401 by 17.85ms
video PTS (494060.00ms) underflow at pack 563643 by 35.74ms
video PTS (494100.00ms) underflow at pack 563667 by 13.69ms
video PTS (494540.00ms) underflow at pack 564228 by 77.05ms
video PTS (494580.00ms) underflow at pack 564254 by 56.50ms
video DTS (494620.00ms) underflow at pack 564277 by 33.70ms
video PTS (494660.00ms) underflow at pack 564317 by 23.62ms
video PTS (495020.00ms) underflow at pack 564778 by 77.23ms
video PTS (495060.00ms) underflow at pack 564797 by 51.44ms
video DTS (495100.00ms) underflow at pack 564817 by 26.40ms
video PTS (495140.00ms) underflow at pack 564848 by 9.59ms
video PTS (495500.00ms) underflow at pack 565312 by 75.17ms
video PTS (495540.00ms) underflow at pack 565335 by 52.37ms
video DTS (495580.00ms) underflow at pack 565356 by 28.08ms
video PTS (495620.00ms) underflow at pack 565390 by 13.51ms
video PTS (495980.00ms) underflow at pack 565852 by 73.85ms
video PTS (496020.00ms) underflow at pack 565875 by 51.05ms
video DTS (496060.00ms) underflow at pack 565896 by 26.76ms
video PTS (496100.00ms) underflow at pack 565930 by 12.19ms
video PTS (496460.00ms) underflow at pack 566392 by 74.03ms
video PTS (496500.00ms) underflow at pack 566414 by 50.49ms
video DTS (496540.00ms) underflow at pack 566436 by 26.94ms
video PTS (496580.00ms) underflow at pack 566470 by 12.37ms
video PTS (498380.00ms) underflow at pack 568510 by 30.62ms
video PTS (498420.00ms) underflow at pack 568534 by 8.57ms
video PTS (498500.00ms) underflow at pack 568675 by 34.03ms
video PTS (498540.00ms) underflow at pack 568716 by 24.70ms
video DTS (498580.00ms) underflow at pack 568751 by 10.88ms
video PTS (498620.00ms) underflow at pack 568817 by 20.24ms
video PTS (498660.00ms) underflow at pack 568849 by 4.17ms
video DTS (585260.00ms) underflow at pack 667901 by 17.49ms
video PTS (585300.00ms) underflow at pack 668002 by 53.03ms
video PTS (585340.00ms) underflow at pack 668025 by 30.23ms
video DTS (585380.00ms) underflow at pack 668048 by 7.43ms
video PTS (585420.00ms) underflow at pack 668151 by 44.47ms
video PTS (585460.00ms) underflow at pack 668174 by 21.68ms
video PTS (585540.00ms) underflow at pack 668294 by 31.43ms
video PTS (585580.00ms) underflow at pack 668321 by 11.62ms
video PTS (585900.00ms) underflow at pack 668745 by 105.24ms
video PTS (585940.00ms) underflow at pack 668762 by 77.95ms
video DTS (585980.00ms) underflow at pack 668779 by 50.67ms
video PTS (586020.00ms) underflow at pack 668796 by 23.38ms
video PTS (586620.00ms) underflow at pack 669084 by 21.74ms
51 video underflows (SCR >= PTS or DTS)

NOTE: The resulting file may not play back correctly.
Try increasing the mux rate.

unixfs
23rd September 2006, 10:57
packet size is irrelevant, but those underflows are a major problem.
You have to raise the muxrate until all underflows go away.
The usual default is 10 Mb/s, so you should start from something higher like 15 Mb/s or so,
but don't expect any compatibility with dvd

Airw0lf
23rd September 2006, 12:48
packet size is irrelevant, but those underflows are a major problem.
You have to raise the muxrate until all underflows go away.
The usual default is 10 Mb/s, so you should start from something higher like 15 Mb/s or so,
but don't expect any compatibility with dvd

The 51 underflow errors I got were with a mux rate of 0.
Setting a manual mux rate actually created far *more* underflow errors. I kept raising the mux rate, right up to the program's limit of around 13 Mb/s (32767 * 50 byte chunks). Even at the limit, I was running into hundreds of mux rate errors.

So at this stage, mux rate = 0 seems to be better than anything else!

SeeMoreDigital
23rd September 2006, 13:01
Sadly there are not many "free" MPEG-2 muxers knocking around. And even less that can cope with HD streams!

MPEG Multiplexer v1.0 (mplex) is pretty flexible and will allow "forced" AC3 audio stream muxing ;)


Cheers

Airw0lf
23rd September 2006, 13:09
MPEG Multiplexer v1.0 (mplex) is pretty flexible and will allow "forced" AC3 audio stream muxing ;)
Cheers

Is this it?
http://members.aon.at/johann.langhofer/mplex1.htm

SeeMoreDigital
23rd September 2006, 13:42
Try this (http://82.10.220.174/Uploaded_Files/Doom9_Forum_files/MPEG_Multiplexer_(v1.0).7z)!


Cheers

unixfs
23rd September 2006, 14:38
The 51 underflow errors I got were with a mux rate of 0.
Setting a manual mux rate actually created far *more* underflow errors. I kept raising the mux rate, right up to the program's limit of around 13 Mb/s (32767 * 50 byte chunks). Even at the limit, I was running into hundreds of mux rate errors.

So at this stage, mux rate = 0 seems to be better than anything else!

0 probably means default. mencoder, mplex and ffmpeg permit you
to specify the muxrate as high as you want

Airw0lf
24th September 2006, 03:03
I used mplex and all was well. Thanks.

mrkazador
24th September 2006, 08:06
Tmpgenc

cheer
25th September 2006, 15:28
Tmpgenc
Last I checked tmpgenc didn't mux .ac3 audio -- has that changed?

cheer
25th September 2006, 15:33
Try this (http://82.10.220.174/Uploaded_Files/Doom9_Forum_files/MPEG_Multiplexer_(v1.0).7z)!


Cheers
What's the trick to getting this guy to take .ac3 audio? Seems to only be looking for mpeg audio...

EDIT: figured it out -- you have to type the filename in manually. :)

Pookie
25th September 2006, 21:46
Yes, a small bug on finding ac3 files, but it muxes them just fine.

This little app will add a "copy Path to clipboard" choice to your right click menu, making it much easier to add the ac3 file name to the muxer http://www.mlin.net/files/PathCopyEx.msi

Bucky Wheat
26th September 2006, 02:15
Try this (http://82.10.220.174/Uploaded_Files/Doom9_Forum_files/MPEG_Multiplexer_(v1.0).7z)!
I just tried this on one of my problem files. It's a TS where audio and video are not showing the same length.

Unfortunately, it stops and never finishes scanning the video stream:
http://img168.imageshack.us/img168/8596/multiplexertv0.jpg (http://www.imageshack.us)

It just stops. No file is created. Now I am not sure about the settings, I am using the demuxed video of a TS and AC3 audio.

Any idea?

Thanks
Bucky

SeeMoreDigital
26th September 2006, 09:20
Hi Bucky,

What tool did you use to extract the video stream out of the TS container?


Cheers

Bucky Wheat
26th September 2006, 11:43
I used DGIndex with the option to save the project and demux the video.

SeeMoreDigital
26th September 2006, 13:53
I use DGIndex too!

That said, quite often I run my .TS sources thru' MPEG2 Repair (http://users.adelphia.net/~mwilczyn/mpeg2repair/). Which might help you out as well ;)

Airw0lf
30th September 2006, 02:53
I use DGIndex too!

That said, quite often I run my .TS sources thru' MPEG2 Repair (http://users.adelphia.net/~mwilczyn/mpeg2repair/). Which might help you out as well ;)

MPEG2 Repair has performed miracles for me in the past - it's awesome.

Bucky Wheat
30th September 2006, 03:09
Unfortunately, it doesn't. I tried that too :-(
It seems some channels are more affected than others (see also my separate posting please).
I will try some recommendations over the weekend. I am just very frustrated right now, since for the longest time everything went fine and suddenly half of my captures seem to cause problems and I don't know what or how that happened :-(

Pookie
30th September 2006, 03:48
Post a Clip of your unprocessed source

http://www.lifehack.org/articles/lifehack/introduction-to-90-online-file-storage-services.html