VideoHelp Forum

+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Member
    Join Date
    Aug 2008
    Location
    Greece
    Search PM
    Is there a program that we can add it a folder and convert all .srt files exist at this folder to utf-8 srt files?


    I want to can convert any language like Greek.


    Don't need to do it 1 by 1 file.


    Edit: I believe i find from my older topic.
    The program "Subtitle edit" i believe it do the work fine.
    Last edited by fits79; 18th Aug 2022 at 00:44.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    Netherlands
    Search Comp PM
    If you are a Linux user i have a script to convert srt to utf8

    #!/bin/sh
    ls *.srt | while read file ; do
    charset=`file -bi $file | sed 's/.*charset=//'`
    echo '###' $file $charset
    case "$charset" in
    us-ascii) charset="";; # no conversion needed
    utf-8) charset="";; # no conversion needed
    binary) charset="";; # no charset detected
    *) ;;
    esac
    if [ "$charset" != "" ] ; then
    iconv -f "$charset" -t UTF-8 -o "$file".utf "$file" && mv "$file".utf "$file"
    fi
    done
    Save this into the directory where your files are as srt2utf8.sh and give it execute rights. Execute this on terminal in that directory like this: ./srt2utf8.sh

    If you are a Windows users you have to convert this script to Windows batch style, i can't help you with that.
    Quote Quote  
  3. Member
    Join Date
    Aug 2008
    Location
    Greece
    Search PM
    I find a solution to subtitle edit program.
    Quote Quote  
  4. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    For others who are looking for this solution open subtitle edit/tools/batch convert.
    I think,therefore i am a hamster.
    Quote Quote  



Similar Threads