Page 1 of 1

Subtitle rename

Posted: 30 Jan 2021, 16:03
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

Re: Subtitle rename

Posted: 30 Jan 2021, 16:12
by rednoah
Just use the {plex} format which takes care of these things by default, or add {'.'+lang} to your custom format.

Re: Subtitle rename

Posted: 30 Jan 2021, 21:11
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

Re: Subtitle rename

Posted: 31 Jan 2021, 02:48
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.

Re: Subtitle rename

Posted: 31 Jan 2021, 11:32
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'

Re: Subtitle rename

Posted: 01 Feb 2021, 03:36
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}"