From Indie IT Wiki
Jump to: navigation, search

HOWTO: Play Blu-ray Movie Using MakeMKV Streaming

  1. Put Blu-ray disc in drive
  2. Start MakeMKV
  3. Scan disc
  4. Press the Stream button in the toolbar
  5. Wait for it to complete and issue the url
  6. Go to http://localhost:51000 in your web browser
  7. Click on /web/titles
  8. Click further until you see a link for stream/title0.m2ts or similar
  9. Right-click and Copy Link Location
  10. Start VLC Media Player
  11. File > Open Network Stream > Paste your link (e.g. http://localhost:51000/stream/title0.m2ts)
  12. You can play this across the network by changing the IP address to your streaming machine (e.g.

HOWTO: MakeMKV: Command Line Automation

When compiling, please compile latest ffmpeg first.

Starting with version 1.8.6 MakeMKV no longer uses ffmpeg application, but links directly to libavcodec. Please note that most distributions ship a very outdated version of libavcodec (either from ffmpeg or libav projects). You will have to compile a recent ffmpeg (at least 2.0) if you need a FLAC encoder that handles 24-bit audio. Also you will have to enable libfdk-aac support in ffmpeg in order to use AAC encoder.Here are generic instructions for building makemkv-oss with latest ffmpeg:

- download ffmpeg tarball from

- configure and build ffmpeg:

./configure --prefix=/tmp/ffmpeg --enable-static --disable-shared --enable-pic --disable-yasm
make install

- configure and build makemkv-oss:

PKG_CONFIG_PATH=/tmp/ffmpeg/lib/pkgconfig ./configure
sudo make install

Basic information about the Drive...

makemkvcon -r info

Detailed information about the Disc...

makemkvcon -r info disc:0

This command rips all the movies on the disc which are longer than 3600 seconds (60 minutes). This means that it should skip any special features, etc. but don't forget to create the directory first (in this case ~/DVDs/MovieName/)...

mkdir ~/DVDs/MovieName/
makemkvcon --minlength=3600 mkv disc:0 all ~/DVDs/MovieName/

However, this does not stop the software from particular audio tracks, languages or subtitles, etc.

To do that, you need to use the new Profile and Selection Rules feature of MakeMKV.

Fire up the normal MakeMKV GUI, then go to Preferences, then tick Expert Mode. In the Advanced tab, put this in the Default Selection Rule box:


This will...

-sel:all               -> deselect all tracks
+sel:audio&(eng)       -> select all audio tracks in English
-sel:(havemulti)       -> Deselect all mono/stereo tracks which have a multi-channel track in same language
-sel:mvcvideo          -> Deselect 3D multi-view videos
+sel:subtitle&(eng)    -> Select all subtitle tracks in English
-sel:special           -> Deselect all special tracks (director's comments etc.)
=100:all               -> set output weight 100 to all tracks
-10:eng                -> decrement the weight of all tracks in English language by 10 (to make them the first ones in output)

Click Apply, then click OK, then close MakeMKV.

Now, we you run this again on the command line...

makemkvcon --minlength=3600 mkv disc:0 all ~/DVDs/MovieName/ should show something similar to this...

MakeMKV v1.8.5 linux(x64-release) started
Using direct disc access mode
Title #1 was added (20 cell(s), 2:02:46)
Title #2 has length of 12 seconds which is less than minimum title length of 3600 seconds and was therefore skipped
Title #3 has length of 12 seconds which is less than minimum title length of 3600 seconds and was therefore skipped
Title #4 has length of 1 seconds which is less than minimum title length of 3600 seconds and was therefore skipped
Operation successfully completed
Saving 1 titles into directory ~/DVDs/MovieName/ should end up with just 3 stream in your .mkv video file...

Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x576 [PAR 64:45 DAR 16:9], 7500 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s (default)
Stream #0.2(eng): Subtitle: dvdsub (default)

Thanks to

Ripping a Blu-Ray Movie in Linux

Method A

  1. Get Volume and Disk ID Keys : AACKeys
  2. Decrypt and Rip raw files from Blu-ray disc : DumpHD
  3. Examine .m2ts file for aspect ratio and fps : MediaInfo
  4. Extract video and audio tracks from .m2ts file : tsMuxeR
  5. Encode and make a single Matroska movie file : mkvMerge
  6. Play the .mkv movie file : MPlayer

Method B

  1. Decrypt and rip and encode : MakeMKV
  2. Play the .mkv movie file : MPlayer or VLC

Extracting and using the Subtitles in a Blu-Ray or DVD Rip

  • Decrypt and rip and encode, making sure you select the [x] Subtitles English track, in MakeMKV
  • Use mkvmerge and mkvextract from the MKVToolnix package to extract the subtitle track from the .mkv file...
$ sudo aptitude install mkvtoolnix


$ mkvmerge --identify movie.mkv
    Track ID 1: video (V_MS/VFW/FOURCC, DIV3)
    Track ID 2: audio (A_MPEG/L3)
    Track ID 3: audio (A_VORBIS)
    Track ID 4: subtitles (S_TEXT/UTF8)
    Track ID 5: subtitles (S_TEXT/UTF8)
$ mkvextract tracks movie.mkv

VLC can now play .srt files directly with the movie file of the same name...

$ ls
$ vlc movie.mkv   (press V to toggle subtitles)


Blu-rays take one more step...

$ mkvmerge --identify movie.mkv
    Track ID 1: video (V_MPEG4/ISO/AVC) 
    Track ID 2: audio (A_DTS) 
    Track ID 3: subtitles (S_HDMV/PGS)
$ mkvextract tracks movie.mkv 3:subtitles.sup

Use BDSup2Sub to convert the .sup file to 2 files .idx + .sub

$ java -jar BDSup2Sub.jar -o movie.sub movie.sup

Save the 2 new subtitle files with the same name as the movie and play the MKV in VLC...

$ ls

$ vlc movie.mkv   (press V to toggle subtitles)

Thanks to


Convert .sub to .srt

How To Play Blu-Ray Movies In Linux

Yes! At long last...

Here is the script...


# Cross-Platform Blu-ray Playback Script
# Release 1.0
# Depends on having curl, MakeMKV and VLC installed.
# Revision History:
# 05-OCT-2010:  Initial release.

# Is this a Mac?
if [ `uname` == "Darwin" ]; then

# Make sure we're not already decoding a disc.
killall makemkvcon

# Start streaming the first Blu-ray drive we find.
${MKVPATH}makemkvcon --upnp=1 --cache=128 stream disc:0 &

# Wait for the streaming server to be ready.
while [ $RESULT != 0 ]; do
       curl -f http://localhost:51000 -o /dev/null 2> /dev/null
       sleep 1
       # Handle timeouts so we don't leave orphan makemkvcon tasks running.
       (( COUNT=${COUNT} + 1 ))
       if [ ${COUNT} == 60 ]; then
               killall makemkvcon
               exit 1

# Tell VLC to play the first title of the disc.
${VLCPATH}vlc http://localhost:51000/stream/title0.ts

# Shut down MakeMKV after VLC closes.
killall makemkvcon

Stream Blu-Ray Movie

makemkvcon stream disc:0 --cache=128 --minlength=4800

Play Blu-Ray Movie In Mplayer

mplayer -fs -demuxer lavf -vo vdpau:hqscaling=1 -vc ffmpeg12vdpau,ffh264vdpau,ffvc1vdpau,ffwmv3vdpau, \
-vfm ffmpeg, -ao pulse -ac fftruehd,ffdca,ffeac3,ffac3,fflpcm, -afm ffmpeg, -alang en -slang en \
-forcedsubsonly -channels 6 -af volnorm -cache 8192 -dvd-device /dev/dvd1 \