You are not logged in.

#1 2009-02-09 01:08:19

muflax
Member
From: Germany
Registered: 2008-07-21
Posts: 58

start mplayer without subtitles [solved]

Ok, this one has been bothering me for a long time. I have video files, mostly .mkv in this case, that come with a subtitle track. The problem is that mplayer always displays them first and I have to manually disable them by hotkey. This gets really annoying as you can't just let mplayer work through some big playlist in the background, but have to babysit it.

What I have tried so far, but didn't work:
* setting (or not) alang, slang or sid in ~/.mplayer/config, both to values that match the file and not
* creating a dummy file and calling it with -sub (gets chosen *after* the internal subtitles) or using an invalid sid
* using -noautosub or -forcedsubsonly
* setting -subdelay 100000 (works for external files, but gets ignored by internal subtitles)

What does work, but I don't want to use it:
* compiling mplayer without subtitle support (obviously, but occasionally I do want subtitles...)

(I'd even be willing to switch to a different application, but it has to have a fully functional CLI. VLC just crashes all the time and does not qualify.)

I'm open for any suggestion and if nothing comes up, I'm gonna write a patch for it.

Last edited by muflax (2009-02-09 06:28:22)

Offline

#2 2009-02-09 03:59:06

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: start mplayer without subtitles [solved]

How about noautosub=1 in your config file?

Offline

#3 2009-02-09 04:57:59

muflax
Member
From: Germany
Registered: 2008-07-21
Posts: 58

Re: start mplayer without subtitles [solved]

Tried it, doesn't work. It only seems to prevent mplayer from loading a subtitle file.

Edit: Ok, I checked the source and I was right. There is no way to do this. Subtitle visibility is always set to 1 and can only be changed by hotkey, but that alone would not be problematic. However, when loading a file, mplayer will (try to) select the subtitle that the user requested or else try to guess one, based on slang and if this all fails, just use the first one it finds - and this is exactly not what I want.
So, there's no way to solve this with the current branch. Trivially commenting this out, like so:

--- mplayer/mplayer.c   2009-01-16 10:41:26.000000000 +0100
+++ mplayer-patch/mplayer.c     2009-02-09 07:03:29.000000000 +0100
@@ -3492,8 +3492,8 @@
       dvdsub_id = demuxer_sub_track_by_lang(mpctx->demuxer, dvdsub_lang);
     if (dvdsub_id < 0)
       dvdsub_id = demuxer_default_sub_track(mpctx->demuxer);
-    if (dvdsub_id >= 0)
-      mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id;
+    //if (dvdsub_id >= 0)
+    //  mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id;
   }
   // rather than duplicate code, use the SUB_SELECT handler to init the right one.
   mpctx->global_sub_pos--;

fixes the problem. As this seems intentional and noone complained about this before (as far as I'm aware), I guess this is not the proper way to handle this. There should probably an option to prevent the guessing, possibly by extending -noautosubs or allowing -sid to be negative. Well, I'll put this on my todo list and submit a patch to the devs soon.

Last edited by muflax (2009-02-09 06:16:03)

Offline

#4 2009-02-09 05:33:11

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: start mplayer without subtitles [solved]

I searched around a bit and I found this from http://wonkabar.org/archives/category/c … ia/mplayer

Finally, I hit some snag with MPlayer and VobSubs (subtitles that originally come with DVDs).  I've got some movies in Matroska format, and with recent (SVN r27719) revisions, it will forcibly display the subtitles on playback, and I have no idea why.  I swear I remember reading something about this on the mailing list a while ago, but I haven't had much luck finding anything.  Best option so far, go back to an earlier revision (r25993).  Not ideal, but it works.  Every sub, force and vobsub option I've tried does nothing.  I'm not passing anything by default like -slang or -sid to mplayer.

That's a lot of revisions ago (mine's at r28488), but it sounds like your problem to me.

Offline

#5 2009-02-09 06:17:08

muflax
Member
From: Germany
Registered: 2008-07-21
Posts: 58

Re: start mplayer without subtitles [solved]

Exactly that's the issue - see my edit above. Nice to know someone else hates this, too. Thanks. smile

Edit: Ok, -noautosub now also prevents using the default subtitle track. I'll submit this and discuss it with the devs. Marking this as solved.

Last edited by muflax (2009-02-09 06:28:09)

Offline

#6 2009-02-10 00:24:31

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: start mplayer without subtitles [solved]

I was going to point you to another patch on the Mplayer-dev mailing list, then I realized that it's you!

Offline

Board footer

Powered by FluxBB