There is a method for automated ripping. Look at the part about MakeMKV.
The manual version:
What you need for BluRay on gentoo (or any other linux):
[*] A BluRay drive for which the patch here is usable (my LG GGW-H20L works great).
[*] The newest version of the software AACSkeys from the doom9 forums.
[*] The newest version of the software dumpHD from the doom9 forums.
[*] Or instead of the first two points: The VolumeUniqueKey (VUK) of the disc you want to play
[*] Your kernel should be version 2.6.25 and higher for UDF 2.5 support, else you won't be able to read the disc's filesystem.
UPDATE:
BD+ can now be automatically decoded using dumpHD.
Please notice that it won't work for all discs. More info about the newest dumpHD release here.
This also works quite fine in streaming mode.
What doesn't work right now:
For the newest discs check the doom9 forums. It takes some time until the latest MKB version keys are out.
Here is what to do:
Note: You can skip point one and two if you already have the VolumeUniqueKey (VUK) of the disc you want to dump/watch. Also you'll need the VUK if your drive is not patched.
First of all you should mount your BD drive
On the mounted disc look for a BDSVM directory to verify if is a BD+ disc. Chances are great that it won't work then.
1) Patch your drive with the AACS patch linked above. It should work with wine, so no Win is necessary.
2) Download AACSkeys and extract into a folder of your choice. It contains the program for both 32 and 64 bit and a library file that can be used with dumpHD directly - no need to run AACS manually any more, just put the .so file into your dumpHD directory. There also is a file named ProcessingDeviceKeysSimple.txt. It contains the processing keys needed to decrypt the media. There are different MKB Version and each has its own key. Newer keys can be found on the internet (the doom9 forums are the place to go, or look here). Put additional/newer keys into this file, if needed.
3) Download and extract dumpHD into a folder of your choice. Since its in java you dont need to install it.
There are now two possibilities:
If you followed step one and two make sure that the AACSkeys library files and the ProcessingDeviceKeysSimple.txt is in the dumpHD folder.
If you skipped step one and two edit the file keydb.cfg where all known keys are stored. You can find keys for HD and BluRay media in the doom9 forums (won't link there for legal reasons, but it should be fairly easy to find anyway).
So then you can start dumpHD (use the shell-script for gui mode).
You can either dump your disc to a folder of your choice to edit it further or you can use dumphd in commandline mode to stream the movie directly to your media player (might give performance issues - since there are no drivers yet to support GPU based decoding).
example for streaming to mplayer:
Code: Select all
./dumphd.sh /media/cdrom1 | mplayer -cache 8192 -demuxer lavf -aid 1 -channels 6 -You'll need the newest SVN version of mplayer and ffmpeg (they can be emerged easily using the berkano-overlay).
The mplayer options should work for both Blu-Ray and HD-DVD.
The following mplayer-options are originally from a guide for mythtv:
Code: Select all
mplayer -fs -vo xv -demuxer lavf -ac <audiocodec> -aid <audiotrackid> -fps 24000/1001 <moviefile>-vo xv to use Xv as for video-output
-demuxer must always be lavf
-fps 24000/1001 this is for the 24p movie format of all blurays
to find out audiocodec and track run
Code: Select all
ffmpeg -i <moviefile>for mlp use -ac mlp (this is MLP/trueHD format)
If mlp is not recognised copy /etc/mplayer/codecs.conf to ~/.mplayer/codecs.conf and add the following:
Code: Select all
audiocodec mlp
info "FFMpeg mlp"
status buggy
format 0x20504C4D
driver ffmpeg
dll "mlp"Code: Select all
-lavdopts threads=2:fast:skiploopfilter=all -sws 0 -framedrop -cache 8192 -autosync 30-autosync probably won't help here because there is no sync information in the most movies, ymmv
Also you can try and nice your mplayer to -20.
If you encounter audio/video sync issues:
When mplayer is struggling, do you get "Too many video packets in the buffer" console output? If so, in libmpdemux/demuxer.h change:
Code: Select all
#define MAX_PACK_BYTES 0x800000Code: Select all
#define MAX_PACK_BYTES 0x8000000Thanks for this tip goes to grant123 who found this info on the doom9 forums.
Recoding your dumped movie:
This part of the guide is using information provided by Fangorn.
mencoder does AFAIK still NOT recognise .m2ts containers. So a direct handling will not happen!
For use with mencoder you have to do (after ripping the to .m2ts files)
1. identify video (easy, usually its the only one) and audio streams (not so easy, I had best results with plain AC3, if there is only eac3 strip it down to ac3 with tsMuxer, the same is possible for DTS HD)
2. copy the necessary streams into a MPEG transport stream (.ts) using tsMuxer or any other capable app.
3. run the script
4. mux the .avi (contains video and first audio stream) with additional audio into .mkv container using mmg
ad 4. If you don't need a second audio stream you could use the .avi file directly. But I found it less difficult to handle (fastforward, pause, ...) and more stable (audio sync) when in a .mkv container.
Here is a link to fangorn's transcoding scripts. It is now a seperate thread.
alternate method (more automated) ripping - MakeMKV:
MakeMKV is a program that creates MKV files from bluray movie discs. The ebuild can be found in the multimedia overlay.
It doesn't need a patched drive and works with the latest BD+ versions.
A note on subtitles:
There is a java program that can turn .sup subtitle format into .sub subtitles (which you can easily use with your player): BDSup2Sub. It is able to run on Linux.
Thanks to all who helped out with research and providing solutions (especially Fangorn for transcoding and beandog for the MakeMKV ebuild).
Moderator note: Stickied! -- 27 Feb 2009, beandog





