[MPlayer-dev-eng] subtitles directories

Clément Bœsch ubitux at gmail.com
Wed Nov 10 08:12:47 CET 2010


Hi,

At the moment, MPlayer loads subtitles located in ~/.mplayer/sub and in
the media directory. I'm working on supporting a new option in mplayer,
subdirs, but I'd like to have your opinion about a few things.

First, is this new behaviour fine with you?:

  1) if "sub" option specified: append sub

  2) if no "autosub", stop tracking subs now

  3) try finding subtitles in the media directory and append them

  4) now the new thing, if "subdirs" option specified:

     o Track subs in each directory specified by subdirs

     o default option could be "sub,subtitles"

     o path could be relative and absolute: "/tmp/subs/,sub,subtitles"
       will make the code tracks subtitles in the following directories:

         /tmp/subs/
         path/to/video/sub/
         path/to/video/subtitles/

     o Note that this options allows you to get that kind of tree in your
       movies:

       movies/movie001.avi
       movies/movie002.avi
       movies/ ...
       movies/movie999.avi
       movies/sub/movie001.srt
       movies/sub/movie002.srt
       movies/sub/ ...
       movies/sub/movie999.srt

       and same goes for every media directories.

  5) Finally append subtitles from ~/.mplayer/sub just like it is done
     currently.

What is new is just the step 4, but code is almost done. The problem is, I
have to change the behaviour of subreader.c:sub_filenames function which
try to load different path even if one is specified.

So if you agree with what I described to you, do you mind if I rewrite
almost everything from this function?

Also, should I move all this subtitles selection code to some another file
like sub/subloader.c?

Of course, I'll send the patch here before so no worries.

Regards,

-- 
Clément B.
Not sent from a jesusPhone.


More information about the MPlayer-dev-eng mailing list