Setting default SRT encoding in app?
Setting default SRT encoding in app?
Is there anyway to set a specific encoding as the default for all SRT? I've got upwards of 50 episodes to convert and things would go a lot faster if I didn't have to specify UTF-8 for all of them, one by one. Though all that being said is there anyway to get Handbrake to automatically add the same named SRT file when it's scanning the source?
Thanks
Thanks
-
- Veteran User
- Posts: 4840
- Joined: Wed May 04, 2011 11:06 pm
Re: Setting default SRT encoding in app?
Script the CLI.
Re: Setting default SRT encoding in app?
Yea, I'm with rollin here, trivial batch script for the HB CLI.
Re: Setting default SRT encoding in app?
It would be nice to automatically detect utf-8 encoded files.
Re: Setting default SRT encoding in app?
It would also be nice if UTF-8 files were always properly tagged as such.
Re: Setting default SRT encoding in app?
Indeed. But it's generally not hard to detect these days. Basically parse as utf-8 and if there are any errors during parsing, it's not valid utf-8.
Re: Setting default SRT encoding in app?
Of course this doesn't hold true for some bytes that are valid utf-8 but mean something else in another encoding. But most of the time it works, especially on long text. Would be better than nothing, perhaps.
We could theoretically use something like enca (https://github.com/nijel/enca) to detect other encodings it supports and then iconv (which we already use) to convert to utf-8.
We could theoretically use something like enca (https://github.com/nijel/enca) to detect other encodings it supports and then iconv (which we already use) to convert to utf-8.
Re: Setting default SRT encoding in app?
When you say script the CLI... ...? Dipping my toe into the CLI version here. I've always used the GUI version. Can I use the enclosing folder as the source and destination?
Re: Setting default SRT encoding in app?
With the CLI, you can put the output anywhere you please. But that means you lose the protections the GUI has to try to prevent things like overwriting the source file with the output file.
Re: Setting default SRT encoding in app?
If I select a folder instead of a file (will it even allow that?) will it run the command on all the files in it? Sidenote: This is going well -.- I'm still trying to get the CLI to run in Terminal...
Re: Setting default SRT encoding in app?
Considering I don't do any scripting, I think I've already hit the limit on how much effort I'll be putting in vs how much I'll get out of it. Thanks anyway for all your help!
Re: Setting default SRT encoding in app?
I created a new issue on GitHub to track any progress toward implementing this feature: https://github.com/HandBrake/HandBrake/issues/861