[MEncoder-users] Problems encoding from blu-ray m2ts
James Hastings-Trew
jimht at shaw.ca
Sat Nov 28 08:32:29 CET 2009
Wes Morgan wrote:
> I'm trying to transcode a blu-ray m2ts file and having a devil of a
> time getting mencoder to work reliably. If anyone can see anything I'm
> doing wrong from the information below or has some suggestions I'd be
> very grateful. mencoder, ffmpeg and x264 are all built from snapshots
> only a few days old.
>
> The output from mplayer -identify was not very helpful, but ffmpeg
> identifies the streams as:
>
> Input #0, mpegts, from 'National Parks D2.m2ts':
> Duration: 02:11:24.04, start: 11.617322, bitrate: 35837 kb/s
> Program 1
> Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR
> 16:9], 29.97 tbr, 90k tbn, 59.94 tbc
> Stream #0.1[0x1100]: Audio: truehd, 48000 Hz, 6 channels, s32
> Stream #0.2[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
> Stream #0.3[0x1101]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
> Stream #0.4[0x1102]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
> Stream #0.5[0x1200]: Subtitle: pgssub
> Stream #0.6[0x1201]: Subtitle: pgssub
>
> ffmpeg is able to correctly extract any of the streams and properly
> transcode the truehd to ac3. Mencoder runs for a bit and dies with the
> dreaded "too many audio packets in the buffer" line when trying to
> process the truehd stream into ac3. I can't seem to get it to copy the
> 5.1 channel (stream 0.2 in ffmpeg) with any manner of -ausid, but with
> some fiddling I was able to get it to use the stereo stream (0.3) and
> work past the audio packet error. However, it now sometimes stops
> inexplicably in the middle of the encode without any any errors.
> Restarting with the exact same options will sometimes let it finish
> the pass, sometimes not. Setting the message level to all=6, this is
> the output just before stopping (this time) at only 66%.
You didn't say what operating system you are using. If you are using
Windows, you might find some notes I made here helpful.
http://videogeek.shacknet.nu/index.php?entry=entry090204-064824
Essentially, you need a program called eac3to to demux the streams from
the .m2ts file, and then you need to process the audio and video
separately, and then mux the result back together at the end. Not sure
if eac3to is available on other platforms or not. I mostly did this
stuff on a windows machine, so YMMV.
More information about the MEncoder-users
mailing list