Subtitles menu - show Name, instead of Track 1, Track 2

Feature requests for VLC.
ednys
New Cone
New Cone
Posts: 4
Joined: 21 Feb 2012 08:54

Subtitles menu - show Name, instead of Track 1, Track 2

Postby ednys » 21 Feb 2012 09:10

When choosing a subtitle track, I would like the menu (Video / Subtitle Track) to show us the name of the subtitle file (its language) instead of displaying generic Track 1, Track 2, Track 3...

For exemple, if we have a movie called "Star Trek.avi" and several subtitles in the same folder called "Star Trek.english.srt" "Star Trek.french.srt" "Star Trek.german.srt" "Star Trek.spanish.srt" "Star Trek.director comment.srt" I wish the menu showed this :

Video /
---------Subtitle Track /
--------------------------- english
--------------------------- french
--------------------------- german
--------------------------- spanish
--------------------------- director comment.

and not this :

Video /
---------Subtitle Track /
--------------------------- Track 1
--------------------------- Track 2
--------------------------- Track 3
--------------------------- Track 4
--------------------------- Track 5


(based on what's written before the file extension and after the last dot, as in movie name.language.srt ).
It is confusing to see Track # because obviously we might not know which particular language it refers to!

Thank you!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby Jean-Baptiste Kempf » 21 Feb 2012 12:20

This is difficult, because there are too many patterns to decide. how to find the language.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

kdean
Big Cone-huna
Big Cone-huna
Posts: 629
Joined: 05 Dec 2007 17:47
VLC version: 2.2
Operating System: Mac OS
Location: Orlando, FL

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby kdean » 21 Feb 2012 14:15

Maybe if a meta-name for the track is not available, just show the filename like:

Track 1 (Star Trek.english.srt)
Track 2 (Star Trek.german.srt)

ednys
New Cone
New Cone
Posts: 4
Joined: 21 Feb 2012 08:54

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby ednys » 21 Feb 2012 15:03

I've seen it on some other media players. (BSPlayer, and others I can't remember the name).

If the file is renamed in a pattern like movie.language.srt , the menu will show "language", (ie : what is on the right of the last dot sign before the extension), but if the file is chaotically named, it will show the whole file name.

It's a matter of organizing our own file names so that VLC display the name right.

Even if VLC could display the name of any compatible subtitle files, located in the video folder, that would be great.
Because the track number is really not conveniant.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby Jean-Baptiste Kempf » 21 Feb 2012 16:01

Using filenames to guess a language is a bad idea compared to having the infos inside the language file.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ednys
New Cone
New Cone
Posts: 4
Joined: 21 Feb 2012 08:54

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby ednys » 21 Feb 2012 17:44

Yes, but we don't always have control of how the language file is coded (I suppose you mean some meta tags with info on the language). I don't even see how this info could be coded in a text file like a .srt file...
But what we certainly have is the filename.
It would still be better to see the file name than to see "track 1" or "track 2".... in my opinion. It doesn't matter if what is shown is not truly the name of the language, but what's important is to be able to identify which files refers to Track 1, which files is Track 2, and so on...
I guess it's alphabetical, but it's a pain to have to do some try & error, or to go to the folder and count the files.

I think if a user wants to read relevant information in the subtitle menu, he will be careful to rename the sub files accordingly, so that VLC would pick up what is supposed to be the language name. (in the pattern xxxxxx.yyyyyy.srt where yyyyyy is to identify the language). We just have to agree on this convention.
If the user doesn't care about recognizing subtitles, then it's not a problem, whatever the menu shows will be enough for him.

If the problem is able to notice any subtitle files in the current folder, and build up a list of "Track n", I don't know how hard it is to fetch the file name and add it. Unless it's something very different to do from one OS to the other. (Windows, Linux...)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby Jean-Baptiste Kempf » 21 Feb 2012 17:47

Patch is welcome :)
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ednys
New Cone
New Cone
Posts: 4
Joined: 21 Feb 2012 08:54

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby ednys » 21 Feb 2012 18:00

maybe that's the perfect opportunity for me to try to contribute to the development of the program!
(but i know mostly Java, I'm not sure in which language the program is written)... I have to investigate the DEV section of this...

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby Jean-Baptiste Kempf » 21 Feb 2012 18:25

it should probably be near src/input/input.c and src/input/subtitles.c
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Cymrodor
New Cone
New Cone
Posts: 5
Joined: 22 Aug 2010 15:51

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby Cymrodor » 01 Apr 2012 13:27

I think using standard two-letter international language codes at the end of the filenames might be best, so filenames would be ...PDTV.XviD.en.srt, ...PDTV.XviD.es.srt, and so on. In some cases, such as en and es, it may be needed to specify the country, too, e.g. en-GB, en-US, es-ES, es-AR.

Language codes: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Country codes: http://en.wikipedia.org/wiki/ISO_3166-1

mederi
Big Cone-huna
Big Cone-huna
Posts: 1949
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby mederi » 01 Apr 2012 14:36

I agree with previous post. I use Country codes right in front of file extension: EN, DE, SK, CZ, PL, FR, ES, RU, ... For English language I simply use EN, but could be also differentiated as suggested in previous post: EN, EN-US, EN-GB, EN-AU, ... Most countries also use their country code as Top-level domain (TLD) on Internet.
Perhaps it is possible to define a table (an array) of language codes with their descriptions, for example: "en/eng/english"="English", "en-us"="English (US)", "en-gb"="English (GB)", "en-au"="English (AU)", "cz/cs/cze/czech"="Czech", "sk/svk"="Slovak", ... And then to compare last dot-separated part of file name with the defined table to find a possible language description.
--- EDIT ---
Or simply just show the last dot-separated part of file name (max. 10 characters?) in VLC: Video > Subtitle Track > Track 1: EN. There could be also some option in preferences to turn on/off this feature.

saf4vlc
New Cone
New Cone
Posts: 1
Joined: 21 Jul 2012 16:49

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby saf4vlc » 21 Jul 2012 18:18

Hi- I was searching for this possibility myself and found this post. Has anything happened with this yet? It would be nice if the program would at least list the filenames of the available .srt files in the folder instead of track 1, track 2, and so on. Then it would be up to the user to make sure the filenames of the .srt matched the language inside the .srt file. It's not like seeing track 1, track 2, and so on alerts me to what the language is of the track anyway. Coming up with some future structured naming convention format architecture compliance, reading in-between the dots, program would be nice too but in the meantime just listing the actual .srt filenames in the subtitle menu would rock. Thanks for this program. vlc is the best.

TheFalcon
Blank Cone
Blank Cone
Posts: 70
Joined: 07 Mar 2009 10:01

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby TheFalcon » 05 Aug 2012 06:09

I think using standard two-letter international language codes at the end of the filenames might be best, so filenames would be ...PDTV.XviD.en.srt, ...PDTV.XviD.es.srt, and so on. In some cases, such as en and es, it may be needed to specify the country, too, e.g. en-GB, en-US, es-ES, es-AR.

Language codes: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Country codes: http://en.wikipedia.org/wiki/ISO_3166-1
Yes, this would be even better. It's more professional/standard. Some mediaplayers already support this.

I am already using that format for most of the subtitles

Dr. Crash
New Cone
New Cone
Posts: 1
Joined: 14 Nov 2012 18:03

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby Dr. Crash » 14 Nov 2012 18:19

it should probably be near src/input/input.c and src/input/subtitles.c
I am willing to give this a try as I am also looking to fix a bug where subtitle tracks whose names contain non-ASCII characters (e.g. "Français" or "Español") get blank entries in the menu. (This is also true in other menus like Video and Audio so this might a problem decoding the names from the m4v in my case.)

As much as I agree that using filenames to convey information about the language is not great that is the only option for SubRip SRTs. So I propose to parse a filename as follows:

<movie basename>.<language info>.srt

and then parse <language info> as: <lang = iso 639 alpha 2>["_" < country = iso 3166 alpha 2>]["-" <optional stuff>]. The combination of lang and country with an underscore is like the locale everybody knows. So for example, one would get:

Some movie.Half-SBS.en.srt => en
Some movie.Half-SBS.fr_CH.srt => fr_CH
Some movie.Half-SBS.fr_CH-forced.srt => fr_CH

I like the idea to just display what was parsed in the menu, e.g. "Track 6 (fr_CH-forced)" in the last example. I also am thinking that if the locale is recognized as something valid, I want to let VLC know about the guess so that it can automatically pick the right subtitles based on language.

How does VLC managed forced subtitles? I set forced information in Subler on a track but don't see VLC switch to those subtitles automatically like iTunes/QT would do when the language track changes. But they're still listed in the menu so at least I can do it by hand.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1949
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby mederi » 16 Nov 2012 13:44

I was just thinking again about this. Probably the most universal solution for everybody would be to display the end of filename where the language information should be located: the last dot separated part or just fixed amount of characters (including filename extension?). Then if pointed with a mouse, a full filename should be displayed as a pop-up title or as a next submenu. This way users get information they need, regardless of the way the users use to describe language in subtitle filenames (international codes / names in their native language) or not at all.

Code: Select all

Video > > Subtitle Track > > Track 1 ...EN.srt > Video name.2012.EN.srt > Track 2 ...Français.sub > Some name - Whatever.Français.sub > Track 3 ...r the film.idx/sub > Chinese subtitles for the film.idx/sub
This can be improved with some language codes recognition. Then there are also internal subtitle tracks in multimedia files. This information can be displayed just like for external subtitle files.

waltercacau
New Cone
New Cone
Posts: 2
Joined: 01 Feb 2013 04:19

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby waltercacau » 01 Feb 2013 04:45

Well, I have a working patch with a simple solution. My patch just extracts the string between the last two dots of the filename and sets an internal VLC variable about the language.

So, it works for the cases listed by Dr. Crash

Code: Select all

Some movie.Half-SBS.en.srt => en Some movie.Half-SBS.fr_CH.srt => fr_CH Some movie.Half-SBS.fr_CH-forced.srt => fr_CH
I will try submitting it through the proper channels tomorrow, but if anyone wants to try it out:
https://gist.github.com/4689021

mederi
Big Cone-huna
Big Cone-huna
Posts: 1949
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby mederi » 01 Feb 2013 17:52

Please, could you also include a filename extension? Something like: "en.srt" or "en (srt)". This way users will know, that it is a subtitle file of certain subtitle type. Thanks.

waltercacau
New Cone
New Cone
Posts: 2
Joined: 01 Feb 2013 04:19

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby waltercacau » 01 Feb 2013 21:58

Hi mederi,

I think this can be done with another patch latter. The patch I sent actually uses the structure already in place to tag the subtitle resource with a language.

If anyone wants to give it a shot, the file type can probably be added with a few modifications in the function "EsOutESVarUpdateGeneric" in src/input/es_out.c . Look for the string "Track" in that function and you will find the spot where the string is generated.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby Jean-Baptiste Kempf » 06 Feb 2013 17:56

Thanks for the work.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Cymrodor
New Cone
New Cone
Posts: 5
Joined: 22 Aug 2010 15:51

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby Cymrodor » 18 Jun 2013 12:50

I wonder if or when this feature might make it into the player?

It is annoying having to guess which language is 'Track 1' and which is 'Track 2', especially when I guess wrongly and have to get up from the sofa to change it. :)

penguinball
New Cone
New Cone
Posts: 1
Joined: 26 Jun 2013 13:53

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby penguinball » 26 Jun 2013 13:59

I love VLC and have been a steady user for many years. However, this issue is pretty annoying. :o
If VLC can automatically detect that there are subtitles in the folder available, why can't it grep out the language? Is it something we could add inside the sub/srt file? Otherwise, the name of the file should be sufficient. Just throwing my support in for this change. If I knew how to program, I would try! It's a little over my head now though. :?

bosa60
New Cone
New Cone
Posts: 6
Joined: 28 Jun 2013 19:49

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby bosa60 » 28 Jun 2013 19:53

I've seen it on some other media players. (BSPlayer, and others I can't remember the name).

If the file is renamed in a pattern like movie.language.srt , the menu will show "language", (ie : what is on the right of the last dot sign before the extension), but if the file is chaotically named, it will show the whole file name.

It's a matter of organizing our own file names so that VLC display the name right.

Even if VLC could display the name of any compatible subtitle files, located in the video folder, that would be great.
Because the track number is really not conveniant.

bosa60
New Cone
New Cone
Posts: 6
Joined: 28 Jun 2013 19:49

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby bosa60 » 28 Jun 2013 19:56

:mrgreen: :mrgreen: :mrgreen:

Giftmugs
New Cone
New Cone
Posts: 4
Joined: 21 Jan 2014 18:03

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby Giftmugs » 21 Jan 2014 18:07

I am wondering if something like the following would be possible:
I would be more than happy to just have the "sub-title file name" appear instead of Track 1, Trak 2, etc.
I can rename the .srt file(s) to whatever suits me best (if need be) and then that name would be its trak name.
I load the subtitle files by hand while the video is about to run.
Does this seem possible??
:?:

Giftmugs
New Cone
New Cone
Posts: 4
Joined: 21 Jan 2014 18:03

Re: Subtitles menu - show Name, instead of Track 1, Track 2

Postby Giftmugs » 21 Jan 2014 18:12

I am wondering if something like the following would be possible:
I would be more than happy to just have the "sub-title file name" appear instead of Track 1, Track 2, etc.
I can rename the .srt file(s) to whatever suits me best (if need be) and then that name would be its track name.
I load the subtitle files by hand while the video is about to run.
Does this seem possible??
:?:


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 6 guests