[vlc-devel] [PATCH] Detecting language of subtitles using its filename

Eduardo Piombino drakorg at gmail.com
Sat Feb 2 19:34:35 CET 2013

You mean peeking into the subtitles contents and detecting the language
from there?

I don't like the idea too much because it's error prone. Even chrome's
language detector fails from time to time.

Secondly, and I think most important, this technique is not limited to text
subtitles. It's also used with graphical subtitles (.ass, .sup, .sub+.idx).
Of course someone could suggest automatically OCR'ing, but I wouldn't
seriously consider getting into that either.

Just my opinion,
Best regards,

On Sat, Feb 2, 2013 at 3:17 PM, Luiz Vitor Martinez Cardoso <
grabber at gmail.com> wrote:

> Dear,
> What about using de NAME_FILE.LANG.extension as a hint and start checking
> the legend file content?
> You could relatively easily use some n-gram (
> http://en.wikipedia.org/wiki/N-gram) technique to detect the language.
> Best regards,
> Luiz.
> On Sat, Feb 2, 2013 at 4:13 PM, Eduardo Piombino <drakorg at gmail.com>wrote:
>> Support for this "extension" should not break anything. Regular subs
>> without the prefix should be accepted as always, but subtitles that meet
>> this naming convention, if any, should be considered as alternative subs
>> for the same movie. That's all.
>> Regarding where it is accepted, as I stated, oppo player, and philips are
>> aware of this convention (at least) and will decode the 2 letter prefix
>> into the language (English for "en", Italian for "it", French for "fr",
>> etc). I have seen some confussion for Spanish for example, where I've seen
>> the "es", "esp", "sp" and "spa" prefixes.
>> However, if you stick to some naming convention for automatic decoding,
>> lets say "es", and leave the default behaviour of leaving the prefix intact
>> (without decoding) if it doesnt match any of the names in the convention,
>> then the worst that can happen is that it will show up as "ESP", and you
>> will still know what it is. It's a huge step forward, with no backdraws.
>> You can even use this default behaviour to give the track any custom name
>> like Walter also suggested.
>> If it can be extended or be improved further, no doubt of it, but it is a
>> huge improvement over current state, where Track numbers don't do the job
>> for describing its contents.
>> Here are two more threads on this subject, plus the one that Walter has
>> already posted.
>> http://superuser.com/questions/346599/what-is-naming-convention-for-subtitle-files
>> https://groups.google.com/forum/#!msg/mx-videoplayer/TjK8CZWtUhQ/WZDbNE18ogAJ
>> Best regards,
>> Eduardo
>> On Sat, Feb 2, 2013 at 1:46 PM, Edward Wang <
>> edward.c.wang at compdigitec.com> wrote:
>>> On 13-02-02 11:44 AM, Eduardo Piombino <drakorg at gmail.com> wrote:
>>>> Hi, I dont think its in any RFC but at least its standarized.
>>> Where? Do other media players support it?
>>> Also, does this patch break support for regular subtitles (without the
>>> language extension)?
>>> Regards,
>>>         Edward Wang
>>> ______________________________**_________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> http://mailman.videolan.org/**listinfo/vlc-devel<http://mailman.videolan.org/listinfo/vlc-devel>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> http://mailman.videolan.org/listinfo/vlc-devel
> --
> Regards,
> Luiz Vitor Martinez Cardoso
> Celular: (11) 7351-7097 | Skype: grabberbr
> engineer student at maua.br
>  <http://maua.br>intern marketing engineer at geindustrial.com.br
> entrepreneur at adboxnetwork.com
> "If you wanna be successful, you need total dedication, go for your last
> limit, give your best and love your love infinitely!"
> "The only limits are the ones you place upon yourself"
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20130202/6c80f4cc/attachment.html>

More information about the vlc-devel mailing list