Subtitle rename

All about user-defined episode / movie / file name format expressions
Post Reply
werilles
Posts: 7
Joined: 24 Oct 2020, 13:39

Subtitle rename

Post by werilles »

Hi

How can the caption be renamed and the language added at the end?

Example:

You have videos and subtitles with different names in a folder

Grays.Anatomy.S02E08.WEB-DL.GBR.mkv
Grays.Anatomy.S02E08.WEB.AMZN.srt

So I launch the code to rename the files and they look like this

Grays Anatomy 2x08.mkv
Grays Anatomy 2x08.srt


However, I wanted the caption to have a language acronym at the end, example:

Grays Anatomy 2x08.mkv
Grays Anatomy 2x08.eng.srt

It is possible?

I use Filebot on Linux via ssh
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitle rename

Post by rednoah »

Just use the {plex} format which takes care of these things by default, or add {'.'+lang} to your custom format.
:idea: Please read the FAQ and How to Request Help.
werilles
Posts: 7
Joined: 24 Oct 2020, 13:39

Re: Subtitle rename

Post by werilles »

rednoah wrote: 30 Jan 2021, 16:12 Just use the {plex} format which takes care of these things by default, or add {'.'+lang} to your custom format.
This does not work in the cli version
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitle rename

Post by rednoah »

werilles wrote: 30 Jan 2021, 21:11 This does not work in the cli version
Naturally, custom formats work the same in both GUI and CLI. Why wouldn't they?

There's the --format option for that:
https://www.filebot.net/cli.html

:?: What have you tried so far? What does the console output say? Please read viewtopic.php?t=1868 for details.
:idea: Please read the FAQ and How to Request Help.
werilles
Posts: 7
Joined: 24 Oct 2020, 13:39

Re: Subtitle rename

Post by werilles »

rednoah wrote: 31 Jan 2021, 02:48
werilles wrote: 30 Jan 2021, 21:11 This does not work in the cli version
Naturally, custom formats work the same in both GUI and CLI. Why wouldn't they?

There's the --format option for that:
https://www.filebot.net/cli.html

:?: What have you tried so far? What does the console output say? Please read viewtopic.php?t=1868 for details.
Can you tell me the correct way to add "--format" to the command line?

Where to add --format? And that below is right?

filebot -non-strict -rename -r --output srt --lang pt-br /mnt/****/'***'/'Greys Anatomy'/'S01'
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitle rename

Post by rednoah »

You will find examples in the documentation linked above:
https://www.filebot.net/cli.html

e.g.

Code: Select all

--format "{plex.name}"
:idea: Please read the FAQ and How to Request Help.
Post Reply