Prioritise external subtitles over internal
#1
For people who's native language is not English pretty common situation where you download episode with English subs in container and then download translated subtitles in .ass or .srt format usually.
Most desktop video players prioritise external subtitles over internal which seems logical because usually user will manually place external subtitles near video with internal subs for a good reason, in my case: native subs over English.
However XBMC gives priority to internal subtitles, which is a bit frustrating to manually switch to external subs each time.
My suggestion is either change default XBMC's behaviour to give priority to external subtitles over internal, or make this an option, either in UI or advancedconfig.xml.
Reply
#2
Maybe this has changed but I'm pretty sure the behavior I'm experiencing with the pre-eden builds is that external sub files are prioritized over subs muxed into the video file.
Reply
#3
I've pulled and rebuilt lastest git revision and double-checked issue on several files. On current state internal subs are prioritised.
Reply
#4
Unfortunately this is true, I've posted a ticket to trac some time ago:
http://trac.xbmc.org/ticket/11724
Hopefully someone will notice and fix it. It's really inconvenient.
Reply
#5
Thumbs Up 
I noted that xbmc always put the external subtitles as "0" subtitle stream (but not always select it as default), so, here is a workaround for new scanned movies on your library always get external subtitles as default:

Warning: this is a little advanced and I only tested on mysql, backup first!

Open your xbmc_video database, go to the table files and create the following trigger that fires after insert:

Code:
Insert into settings values (new.idFile, 1, 0, 1, 1, 0, -1, 0, 0, 1, 50, 50, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);

The trick is create a new default setting with subtitle stream "0" for each new file/movie scanned. I used the default values of xbmc settings, you can set each field/value as you wish.
Reply
#6
interesting workaround, how does it work if you don't have external subtitle for the movie/video, does it still respect default and forced flags of embedded subtitles, so if there is no external subtitle found will there be subs displayed if they have default / forced flag?
Also besides adding this for each new file I'd need it also for every file already existing in db.
And how does this work If I set different values as default in xbmc gui, will these settings overrides the ones in DB?

I'd still prefer proper fix from xbmc team, it's really not comfortable clicking through the subtitles streams in gui to get external subtitle displayed... It has always worked before, so far nobody even confirmed whether this is just a bug, which will be fixed sometime or new default behavior and the reason behind it.
Reply
#7
Thanks for the tip, but unfortunately this method causes some problems. Given line has some values that darken my display when playing movies. Do not try to use directly these values.

I also tried just setting the 6th and 8th columns that is related with the subtitle, but this way also causes problems which makes XBMC confused.

Since every column has a meaning here, I think the best idea is to use the default values set on your system.

I created a simple .bat file for windows. You can modify below commands to use in your system. Just download and use sqlite, modify below commands then run them once:

"c:\batch\sqlite\sqlite3.exe" "C:\Users\YOUR_USERNAME\AppData\Roaming\XBMC\userdata\Database\MyVideos58.db" "delete from settings;"

"c:\batch\sqlite\sqlite3.exe" "C:\Users\YOUR_USERNAME\AppData\Roaming\XBMC\userdata\Database\MyVideos58.db" "insert into settings select new.idfile,...................... from files"

"c:\batch\sqlite\sqlite3.exe" "C:\Users\YOUR_USERNAME\AppData\Roaming\XBMC\userdata\Database\MyVideos58.db" "drop trigger external_subtitle;"

"c:\batch\sqlite\sqlite3.exe" "C:\Users\YOUR_USERNAME\AppData\Roaming\XBMC\userdata\Database\MyVideos58.db" "create trigger external_subtitle after insert on files for each row begin insert into settings values new.idfile,...................... ; end;"





andreofgyn Wrote:I noted that xbmc always put the external subtitles as "0" subtitle stream (but not always select it as default), so, here is a workaround for new scanned movies on your library always get external subtitles as default:

Warning: this is a little advanced and I only tested on mysql, backup first!

Open your xbmc_video database, go to the table files and create the following trigger that fires after insert:

Code:
Insert into settings values (new.idFile, 1, 0, 1, 1, 0, -1, 0, 0, 1, 50, 50, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);

The trick is create a new default setting with subtitle stream "0" for each new file/movie scanned. I used the default values of xbmc settings, you can set each field/value as you wish.
Reply
#8
terrible, annoying behaviour in eden builds indeed Sad hope this silly bug gets fixed soon!
Reply

Logout Mark Read Team Forum Stats Members Help
Prioritise external subtitles over internal0