Format Expresion for Non-english speakers: Dual+Subs

All about user-defined episode / movie / file name format expressions
Post Reply
joaquin2005
Posts: 2
Joined: 31 Oct 2019, 12:36

Format Expresion for Non-english speakers: Dual+Subs

Post by joaquin2005 »

Hi,

I am really sorry if this is really easy or has been treated before, but I have no idea of how to do it and I am looking for some help.

As a spanish user, most of my content has several audio tracks and / or subtitles, and I always rename my movies following this rule:

Movie Name (year) [VideoFormat VidecoCodec FirstAudioStreamCodec] [Dual + Subs].extension

For example...
Batman (1989) [720p x264 AC3] [Dual + Subs].mkv

Obviously, it can happen that the video file doesn't have several audio tracks, nor subtitles, so I would like to be able to tell Filebot something like:

* If there is more than one audio track and any subtitle:

Batman (1989) [720p h264 AC3] [Dual + Subs].mkv

* If there is more than one audio track and no subtitle

Batman (1989) [720p h264 AC3] [Dual].mkv

* If there is just one audio track and no subtitle

Batman (1989) [720p h264 AC3].mkv

Besides, regarding Video Codecs, I would like to convert some possibilities:

Original New One
h264 x264
HEVC x265
XVID Xvid
DivX Divx

Would it be possible to do it?

I guess for english native speakers this request will not be very interesting, but for non-english speakers, would be really great.

Thanks in advanced.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Format Expresion for Non-english speakers: Dual+Subs

Post by rednoah »

I'll assume that you're already familiar with custom format expressions:
https://www.filebot.net/naming.html


1.
joaquin2005 wrote: 31 Oct 2019, 12:51 * If there is more than one audio track and any subtitle:

Batman (1989) [720p h264 AC3] [Dual + Subs].mkv

* If there is more than one audio track and no subtitle

Batman (1989) [720p h264 AC3] [Dual].mkv

* If there is just one audio track and no subtitle
This format snippet should give you the [Dual + Subs] | [Dual] | <nothing> part:

Code: Select all

{audioLanguages.size() > 1 ? textLanguages.size() > 0 ? ' [Dual + Subs]' : ' [Dual]' : null}

2.
joaquin2005 wrote: 31 Oct 2019, 12:51 Original New One
h264 x264
HEVC x265
XVID Xvid
DivX Divx
Doesn't {vc} the value from the "New One" column anyway? If not, you can always use String.replace() to do your own custom replacement on the value that {vc} gives you.

e.g.

Code: Select all

{vc.replace('h264':'x264', 'HEVC':'x265')}
:idea: Please read the FAQ and How to Request Help.
joaquin2005
Posts: 2
Joined: 31 Oct 2019, 12:36

Re: Format Expresion for Non-english speakers: Dual+Subs

Post by joaquin2005 »

Hi,

First of all, thank you very much! It is really useful!.

To be honest I am not really familiar with format expressions, since I just discover Filebot a couple of days ago.

Anyway, I guess I could get the first part without any problem since it should be quite common.

My only question is regarding "First Audio Stream Codec". Is there any command to access just to that audio strem?

Thanks in advance, and again, really grateful for your help!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Format Expresion for Non-english speakers: Dual+Subs

Post by rednoah »

Yes, {ac} will give you the audio codec of the first audio stream:
https://www.filebot.net/naming.html#bindings
:idea: Please read the FAQ and How to Request Help.
Post Reply