View Full Version : Blu-Rays with multiple important .m2ts files
ggking7
21st November 2008, 18:07
How do you guys deal with Blu-Rays that have the main feature broken up into multiple .m2ts files? Is there a good way of handling decryption and playback?
"Harold & Kumar Escape from Guantanamo Bay" is a perfect example.
kkloster21
21st November 2008, 18:39
this one i can answer:
assuming you are doing this in linux with dumpHD, you just specify multiple files for "dumping" to the pipe (the pipe to mplayer). for example: if you wanted to play a movie that was spread across 00043.m2ts and 00045.m2ts then your command line input would be something like:
/dumphd-0.5/dumphd.sh --infile:BDMV/STREAM/00043.m2ts --infile:BDMV/STREAM/00045.m2ts /media/cdrom1/ | mplayer -cache 8192 -lavdopts threads=4 -aid 4352 -channels 6 -
and you can do this for as many infiles is necessary.
NOTE that the .m2ts files must be called out individually and they must be called out in the correct order (you need to know what order they're supposed to go in). the correct order is often in numerically sequential order but sometimes it is not. Ratatouille, for instance, is a nightmare.
ALSO NOTE that you must input the infile including the directory RELATIVE TO THE SOURCE DIRECTORY (which in this case is /media/cdrom1/). this is in the dumpHD readme but i'm just reminding in case anyone misses it.
i hope this helps!
ggking7
23rd November 2008, 02:47
Is there a good way to figure out which .m2ts files are necessary and what order they go in?
kkloster21
23rd November 2008, 04:59
what i usually do is look at the files in the BDMV/STREAM/ folder, having them organized by size. then i try the largest ones, usually they are at least several gigabytes. in MOST cases they do go in sequential order but not always. its usually fairly obvious which files are the ones you want. but you can always ask here if you have trouble.
does that help? is there a specific movie that you're having trouble with?
ggking7
24th November 2008, 15:26
Harold & Kumar Escape From Guantanamo Bay starts out pretty easy. Most of the movie is spread across about 20 sequential files (which each must be ripped and remuxed because of TruHD audio) but later on trying to go sequentially jumps all around. I've given up. Do AnyDVD or DVDFab make the .m2ts selections for you?
JohnAStebbins
24th November 2008, 17:55
I wrote a little program that parses the playlist (BDMV/PLAYLIST/*.mpls) files that can give you the info you need.
http://handbrake.fr/pastebin/pastebin.php?show=292
I also wrote a parser for the clipinfo (BDMV/CLIPINF/*.clpi)
http://handbrake.fr/pastebin/pastebin.php?show=276
ggking7
25th November 2008, 16:02
Thanks John, I'll definitely be giving those a try the next time I have that problem. What is the difference between the info from your first and second script?
JohnAStebbins
25th November 2008, 23:39
Well, they are not scripts. They are short C programs. You'll have to compile them.
The first parses the mpls files. An mpls is a playlist. It contains a list of m2ts files that compose a title and entry/exit point for each m2ts. It also gives details about the streams that are in each m2ts. Video codec, frame rate, audio codecs, samplerate, language, subtitles, etc... And it has chapter marks.
The second parses clpi files. There are one of these for each m2ts file. They contain a lot of information about the streams that overlaps the information in the playlist file. The part I was interested in is the index of entry points. This is an index of timestamp-to-packet numbers that allow you to find a random access point close to a given timestamp. Playlist entries are not required to start at the beginning of an m2ts and end at the end. To properly splice together a video, you may need to seek to a certain timestamp (in_time) and play to a certain timestamp (out_time) for each m2ts.
ggking7
27th November 2008, 16:32
I can't wait until vlc supports Blu-Ray and I can use something like what I use with DVDs:
vlc dvd:///dev/hda@1 --sout "#standard{access=file,mux=ps,dst=/home/ggking7/videos/Title.mpg}"
Just specify a title number and you're done.
ggking7
4th December 2008, 15:56
JohnAStebbins, I've run into this problem again with "Saving Sarah Marshall". Can you tell me how to compile your C program?
JohnAStebbins
5th December 2008, 01:52
ggking7, I run linux. I don't know what your environment is, but if you have a C compiler and a standard set of system includes it should be similar to:
gcc -Wall mpls_parse.c -o mpls_parse
-Wall turns on verbose warning
-o specifies the output file name for the executable
ggking7
5th December 2008, 02:56
Very nice and thank you for your help. Do you just choose the largest mpls file to operate on?
JohnAStebbins
5th December 2008, 17:56
Usually, its obvious. One is regular movie length and the rest are short segments of crap. But there are plenty that have multiple variations of the movie that are all close to the same length (theatrical, extended, directors cut ... ). There's really no way of knowing which is which. But most of the time the theatrical release is the *shorter* of these. There's a "first play" field in the main index.bdmv file (which i haven't decoded yet) that may be helpful. But I haven't gotten to that yet.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.