[MPlayer-users] How programmatically determine the correct one of two english soundtracks for an encode

Graham Lawrence gl00637 at gmail.com
Mon Jul 9 22:05:14 CEST 2012


> Message: 6
> Date: Sun, 8 Jul 2012 21:24:12 +0200
> From: houghi <houghi at houghi.org>
> To: "MPlayer usage questions, feature requests,	bug reports"
> 	<mplayer-users at mplayerhq.hu>
> Subject: Re: [MPlayer-users] How programmatically determine the
> 	correct one of two english soundtracks for an encode
> Message-ID: <20120708192412.GA29712 at penne.houghi>
> Content-Type: text/plain; charset=us-ascii
>
>
> I have several hundred DVD's, so using a GUI is not an option.
>

I too, of which perhaps 40% are foreign language.

> >From what I understand I would need to first seperate all the languages
> and the movie and then use mkvmerge to put it all in one file.
> What gave me the biggest headache was the subtitles. I still have no idea
> how to do that automatically.
>

I think I have that problem pretty well fixed.  It is not perfect, but
of the 417 movies I've checked so far, it did what I needed in 412 of
them.  But as it deletes nothing, you can manually correct those
situations easily enough.

Briefly, this is what it does
All bare movies in the main Encodes directory are put in their own
individual subdirectories
For each movie directory within the main directory
  If there are VOB or ISO files directory is moved to the designated
dvds directory
  All music files are moved to the designated Music directory
  All remaining files are moved to the top level of the movie directory
  All the now empty subdirectories are moved to another directory
created to hold surplus
  All zip and rar files are unpacked
  Trailer or sample movie files are moved to surplus
  All files that are neither movie nor subtitle file types are moved to surplus
  Subtitle type files are selected preferentially in this order;
idx+sub, srt, sub, ..., txt
    Once the type is identified, all other subtitle type files are
moved to surplus
  Non-english subtitles are moved to surplus
  If necessary, movie and subtitle names are made identical
  If subtitles are required, script waits while download is made, then
resumes automatically
  If each movie file has its same name subtitle file, an indicator
file is created to prevent processing this directory again.

If you would find this useful, I'd be happy to provide it.  At present
it is in "raw" form, meaning it has my specific file paths in it.  It
has been tested on slackware 13.37 with GNU bash, version
4.1.10(2)-release (i486-slackware-linux-gnu)


More information about the MPlayer-users mailing list