makemkvdev: makemkvcon wrapper that uses device names

The place to discuss linux version of MakeMKV
Post Reply
BitJam2
Posts: 53
Joined: Wed Sep 01, 2010 7:04 am

makemkvdev: makemkvcon wrapper that uses device names

Post by BitJam2 »

It works for me. I've included it in a standard Perl tarball which will install it and the man page for you. Or you can use the program directly. It is located at makemkvdev-$VERSION/bin/makemkvdev after unpacking the tarball.

Here is the usage:

Code: Select all

usage: makemkvdev [args] [makemkvcon args, command] [device]

Device specification:
  Either srN where N is any number of digits or /dev/ANYTHING.
  If no device is given we choose the fastest as reported in
  the info file.
   
Options:
  --program    PROG  Default: makemkvcon
  --infofile   FILE  Default: /proc/sys/dev/cdrom/info
  --label_drive LAB  Default: drive name:
  --label_speed LAB  Default: drive speed:

Flags:
  --help or -h Show this simple help.
  --pretend    Print makemkvcon command but don't run it.
  --show       Show the two lines we use from /proc/sys/dev/cdrom/info
  --verbose    Print makemkvcon command line before running it.


ALL OTHER ARGUMENTS ARE PASSED TO makemkvcon!

Examples:
  Stream from fastest drive:
    makemkvdev stream 
  
  Stream from drive sr1
    makemkvdev stream sr1
    makemkvdev stream /dev/sr1
I don't follow device symlinks yet. I'll add that for the next version.

I've got another, more complicated, wrapper that creates an HTML guide to the contents using the output of "makemkvcon -r info". It also creates a video playlist file and tries to use a different port for each blu-ray so XBMC can resume each disc individually. That's the program I use now for streaming blu-rays. I'm planning to add the device name functionality from makemkvdev to it.

I've also got a little script that does an IMDb search for whatever dvd and blu-ray discs are inserted in drives in your system. It relies on the disc having a label that matches the title. Most disc have the correct label but many don't. I get the labels from the symlinks in /dev/disks/by-label/.
BitJam2
Posts: 53
Joined: Wed Sep 01, 2010 7:04 am

Re: makemkvdev: makemkvcon wrapper that uses device names

Post by BitJam2 »

This functionality has now been included in MakeMKV-1.6.3. Thanks mike admin!

BTW: I'm working on a 2nd version of much bigger Perl wrapper that creates an HTML guide and video playlist. It streams different discs to different ports. This version has a simple GUI based on Zenity. The only reason a GUI is needed is because some blurays don't have a proper label or disc title so the user has vet the title and enter a new one if the default is lame (such as the ubiquitous "VOLUME_ID").

The third version will have an HTML interface with a built-in HTTP server. Among other things, it will allow the user to label each track on a bluray (I call them tracks instead of titles because the word "title" is already very overloaded).

I've uploaded a sample of an html guide. Here is the current usage:

Code: Select all

Usage: MakeMKV-Stream [options]

  Run makemkvcon info to get information about titles, audio channels, etc on
  on a bluray disc.  Generate an HTML guide and a video playlist for this
  disc.  Then (optionally) start makemkvcon in streaming mode.  Try to use a
  unique port for every disc so resume feature in XBMC works for each disc.

Common Options:
  --bluray_dir BLU  Directory for HTML guides, playlists, and index: (./Blu-Ray)
                    Relative paths are assumed to reside in the home directory:
                    /home/$USER
  --browser   BROW  Use BROW to open up HTML page: (firefox)
  --cache      INT  Cache size in MB.  Default: let program decide.
  --device     DEV  Name of bluray device: (sr1)
                    Also used to get the disc label for quick(ish) restart.
  --help            Show this help.
  --minlength  INT  Minimum track length in seconds.  Default: let program decide.
  --save            Save current settings in the rc file.

HTML/Playlist Customization:
  --css            FILE  CSS Style sheet for HTML Guide: (css/black.css)
  --br_padding       NN  Pad bottom of HTML page with <br> tags (30)
  --first_track_num  NN  Number tracks starting here (1)
  --first_chan_num   NN  Number audio/video channels starting here ((1)

  --playlist_format STR  Format for playlist entries.  Default:
                         %<title> %(track_num)/%<tcount> -- %(time) %(longest)

  --toc_format      STR  Format for the HTML table of contents entries.  Default:
                         track-%(track_fmt) -- %(time) %(longest)

  --html_format_1   STR  Format for linked track title block in HTML guide.  Default:
                         Track %(track_num) %(longest)<br />

  --html_format_2   STR  Format for unlinked track block in HTML guide.  Default:
                         time %(duration)%(chapters , %d chapter%s)

  --channel_tables  STR  Which channel tables to display in HTML guide.  Default:
                         Audio,Subtitles,Video

  --longest_str     STR  String to indicate longest title. Default: "(Longest)"
  --none_str        STR  String indicating no channels. Default: "-- None --"
  --video_rows      STR  What information to put in video channel table. Default:
                         aspect_ratio,video_size,frame_rate,codec

See the RC file for a complete list of options:
    /home/$USER/.config/MakeMKV-Stream/MakeMKV-Stream.conf
Post Reply