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.
On Wed, 10 Nov 2010 08:12:47 +0100, Clément Bœsch wrote:
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.
an option to specify additional subdir(s) sounds fine. most people just symlink movies/sub to ~/.mplayer/sub but i can see that being a problem for some users. its probably best not to remove ~/.mplayer/sub for backwards compatability. just an additional sub path search. i hope we wont be adding options for everyones' silly movie setups. -compn
On Wed, Nov 10, 2010 at 07:38:48AM -0500, compn wrote:
On Wed, 10 Nov 2010 08:12:47 +0100, Clément Bœsch wrote:
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.
an option to specify additional subdir(s) sounds fine. most people just symlink movies/sub to ~/.mplayer/sub but i can see that being a problem for some users. its probably best not to remove ~/.mplayer/sub for backwards compatability. just an additional sub path search.
I didn't planed to drop ~/.mplayer/sub directory; just look at step 5.
i hope we wont be adding options for everyones' silly movie setups.
-- Clément B. Not sent from a jesusPhone.
On Wed, Nov 10, 2010 at 08:12:47AM +0100, Clément Bœsch wrote:
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.
OK, here is a first patch. There is still to handle DOS paths but it seems to work. Before I continue this stuff, does anyone see a major problem in this feature? -- Clément B. Not sent from a jesusPhone.
participants (2)
-
Clément Bœsch -
compn