Page 1 of 1

Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 06:30
by Biff
Can FileBot automatically add the language (e.g. "ENG" or "DE") to srt files when renaming them (sometimes it does sometimes it does not)?
Image

And the same for forced subs:
Image
becomes:
Image

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 09:23
by rednoah
Yes, that's what {subt} and {lang} are for. The {plex} binding will also take care of the subtitle tag implicitly.

What format are you using?

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 09:40
by Biff
Thank you, rednoah.

Strange, {subt} and {plex} are not implemented. Where do I have to add them? And although I have {lang} added sometimes it does not work.

I use this format:
I:\Eigene Dateien\Videos\Filme\{n.replace(':', ' -')} ({y}){' CD'+pi}{'.'+lang}{tags}{file.path =~ /Kinofassung/ ? '[Theatrical Cut]' : ''}

Many thanks again

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 09:48
by rednoah
1.
Are you using the latest version of FileBot?

2.
Are you testing with real text-based subtitle files? If you use image-based subtitle files (e.g. idx/sub) or empty files then statistical language detection may not work.

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 10:15
by Biff
1. Yes, I do, the portable one.

2. Yes, I use the original srt files, no dummies, empty files or such.
If you use image-based subtitle files (e.g. idx/sub)
I do not know what image-based file are, but, yes, such files I have also and idx files.

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 10:58
by rednoah
1.
Biff wrote:1. Yes, I do, the portable one.
What's the sysinfo output?
Biff wrote:{subt} and {plex} are not implemented.
This indicates that you're using an older version.


2.
Language detection won't work for idx/sub files, unless you add language tags like ".eng" to the filename yourself first. You won't have such issues with *.srt or *.ass subtitle files.

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 11:14
by Biff
1.
Sorry, how can I get that output? It is 4.7.2:
Image
This indicates that you're using an older version.
Sorry again, I meant not implemented in my formats, it is available:
Image

2.
Alright, so I would have to add the language tags manually to idx/sub files.

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 11:37
by rednoah
1.
If you want to test these bindings, you need to select a sample file.

"plex" => NO
"C:/path/to/subtitles.eng.srt" => YES

Click on the "Open Folder" icon and select a subtitle file you want to test with.

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 11:47
by Biff
"plex" => NO
"C:/path/to/subtitles.eng.srt" => YES
Very sorry, I cannot understand.

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 11:56
by rednoah
rednoah wrote:Click on the "Open Folder" icon and select a subtitle file you want to test with.
The "Media File" input field expects you to enter a valid file path. "plex" is not a valid file path.

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 12:06
by Biff
Sorry again, where do I have to add {subt} and {plex} to my format?

Code: Select all

I:\Eigene Dateien\Videos\Filme\{n.replace(':', ' -')} ({y}){' CD'+pi}{'.'+lang}{tags}{file.path =~ /Kinofassung/ ? '[Theatrical Cut]' : ''}

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 12:09
by rednoah
Wherever you want. Most people would put it at the end.

e.g. 1st built-in example movie format:

Code: Select all

{n.colon(' - ')} ({y}){' CD'+pi}{subt}

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 12:16
by Biff
So, this could be right:
I:\Eigene Dateien\Videos\Filme\{n.replace(':', ' -')} ({y}){' CD'+pi}{'.'+lang}{tags}{file.path =~ /Kinofassung/ ? '[Theatrical Cut]' : ''}{n.colon(' - ')} ({y}){' CD'+pi}{subt}
?

And where can I add {plex}?

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 12:23
by rednoah
At this point you can either pay me for my services, or figure it out for yourself. I most highly recommend the latter. ;)

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 12:39
by Biff
Ah yes, thank you, that's a great and cool idea, how much do you want? May be I could also pay some money for using this nice website and or the traffic I am generating posting here. Hope, it will not be that much.

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 12:55
by rednoah
Your format already looks good to me. I see no reason why you'd want to use the {plex} binding if you already have your customized format.

Re: Automatically add the language (e.g. "ENG" or "DE") to srt files?

Posted: 16 Sep 2016, 13:04
by Biff
With this format
I:\Eigene Dateien\Videos\Filme\{n.replace(':', ' -')} ({y}){' CD'+pi}{'.'+lang}{tags}{file.path =~ /Kinofassung/ ? '[Theatrical Cut]' : ''}{n.colon(' - ')} ({y}){' CD'+pi}{subt}
Filebot does this:
Image

There must be anything wrong with the format.