2010-02-04, 21:52
Is it possible to install a bluray ripper via the terminal that can be used via the terminal? From what I've read it's not possible in the frontend.
$ sudo apt-get install mencoder mplayer gpac x264 mkvtoolnix
#! /bin/bash
# =====================================================================
# Blu-ray encoding script by HyRax February 2009 http://www.serenux.com
# =====================================================================
# Make sure the user has specified what to work on.
if [ -z "$1" ]; then
echo "\nBlu-ray movie encoding script\n-----------------------------"
echo "Written by HyRax February 2009\nhttp://www.serenux.com"
echo "\nUsage: $0 <m2ts file without extension>"
echo "\nExample: If your movie file is called TheDarkKnight.m2ts then\nyour usage will be: $0 TheDarkKnight\n"
exit
fi
# The crf=21 option controls encoding quality, and indirectly the final
# filesize. The higher the value, the more compression and thus smaller
# file size. Reduce the value and file size will go up. A value of 21
# should produce a file of approximately 4GB in size for a typical movie.
# Encode the video using x264, ignore the audio for now.
mencoder $1.m2ts \
-ovc x264 -x264encopts crf=21:frameref=3:bframes=3:b_pyramid:direct_pred=auto:weight_b:partitions=all:8x8dct:me=umh:mixed_refs:trellis=1:nopsnr:nossim:subq=6:level_idc=41:threads=2 \
-nosound \
-of rawvideo \
-o $1.x264
# Dump the first original audio track (should be the English track) but
# don't re-encode it. Ignore the video.
mplayer $1.m2ts -dumpaudio -dumpfile $1.ac3
# Copy the raw x264 encoded video into an MP4 container so we can set
# the correct framerate (generally 23.976 - adjust it if MPlayer or
# MEncoder report something different)
MP4Box -add $1.x264 $1.mp4 -fps 23.976
# Finally, merge everything into a single MKV file
mkvmerge -o $1.mkv $1.mp4 --track-name 0:Eng $1.ac3
# Remove the hash in front of the next command to have the script delete
# your working files when encoding is complete.
# rm $1.m2ts $1.x264 $1.ac3
# Tell the user we're done.
echo "All done! Your final movie file is called $1.mkv - enjoy!"
$ cd ~/Videos/BDRips/MyMovie
$ sh ~/encodevideo.sh TheIsland
pashdown Wrote:Have you tried MakeMKV yet?
Phantasm4489 Wrote:I second that. MakeMKV has a console application that can be used to transcode bluray to mkv. It doesnt re-encode so it is pretty quick it simply extracts and decrypts and transcodes into mkv. It can also generate an output to a stream that can be played in xbmc via a script (threads relating to how to achieve this can be searched for).
myrison Wrote:From your posts, it's unclear if you are trying to rip or stream the disk.
If you are trying to rip it, do you have a windows machine you can use to rip your BluRays? IMHO, it'd be a lot easier to run MakeMKV there as I've never had it crash. (and if you are trying to rip it, then you should not be running the script in XBMC but using the MakeMKV application separately from XBMC to rip the Bluray to a video file. once you've done that, you just put it in your video directory and play it normally from the XBMC library)
If you are trying to stream it, you might have more luck posting the crash problem in the thread specifically related to that script.
RhysGM Wrote:Ultimately I would like to rip all my blu rays to my hard disk. However it would be good to be able to watch them without ripping but this is secondary to ripping. My windows machine doesn't work anymore (cat spilt beer on it) I have a slow ubuntu laptop which I'm using now.
I'm still not having any luck finding out how use makeMKV via the terminal. I have to use the terminal as I'm using XBMC Live. Do you know of any guide to rip them in this way?
pashdown Wrote:You have a slow Ubuntu laptop with a Bluray drive? You know you do need a Bluray drive (ie: not DVD) for this to work, right?
RhysGM Wrote:I have a laptop that wont will rip a blu ray in probably about 20 hours based on what I've read. The blu ray is on my HTPC.Run MakeMKV on the HTPC. The only thing the laptop might come in handy is for an SSH session to your HTPC to run MakeMKV from the shell.