Hi,
As we know patched Plex Laika widget requires subtitles need to be unicode so I made a piece of software to batch convert to them and I want to share anyone interested.
DESCRIPTION:
First of all I need to warn you. Program works based on some assumptions. There's no exact way to determine any given file's encoding. There are some libraries attempt to guess given files encoding with heuristic techniques but they are not 100% accurate. I tried mozilla's and ie's encoding detectors and they failed on some files so I took another approach. I normally deal with only English and my native language "Turkish btw" subtitles. My windows current locale set to Turkish and I can read any Turkish or English subtitle successfully with system default encoding. I coded it this way, I read file without specified encoding and write it back UTF-8 with BOM (Byte order mark).BOM is optional for UTF-8 spec but with a file with bom, you can sure it's UTF-8.
Program also convert .sub (MicroDVD I guess) subtitles to SRT. I could'nt find spec for sub files then I examine them little bit to figure out how to convert them. I reads first line and expect first line to be framerate marker as "{1}{1}25" or "{1}{1}23.967" etc. If found that line convert file with that framerate, if don't find framerate info skip file. If you want program handle your sub you can add framerate to the file as first line specified above.
YOU ARE WARNED :
It will work only English and your native language files. It probably break other subtitles files. It don't work complex script languages need UTF-16 which is Chinese, Japanese, Korean, Hebrew, Arabic and Indic languages. BACKUP YOUR SUBTITLES BEFORE TRY IT. There's little error handling or notification. I don't have time to write "quality" software but it works for me. If there will be unexpected interest for this piece of software, I'll consider to improve it.
USAGE:
You need to add paths of your media folder on settings menu. There's two way to do that. Add button opens directory browser and allows you to select directory, Type button allows you type path manually (useful for network path which don't shown on directory browser). You can add any number of paths.
On main screen "Process Subtitles" convert all .srt and .sub files in selected directory and all subdirectories.
LICENSE:
I attach source code of project. There's no license attached with source code. You can do whatever you want with it.
DOWNLOAD:
I guess can't attach file here. It's posted at http://forums.plexapp.com/index.php/top ... converter/ (I hope I didn't violate any forum rule with this.)
Enver
Subtitle Batch converter for Plex widget users
-
- Posts: 3
- Joined: Sat May 12, 2012 2:29 pm
Re: Subtitle Batch converter for Plex widget users
Hi, thanks for the sharing!
I hope users who use Plex(i'm not) will post feedback here.
I hope users who use Plex(i'm not) will post feedback here.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]
DO NOT EVER INSTALL FIRMWARE UPGRADE
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]
DO NOT EVER INSTALL FIRMWARE UPGRADE