ciss 4 Posted March 19, 2016 Share Posted March 19, 2016 (edited) Hey guys, I'm wondering if you know a way to automate with lets say Task Scheduler a task which would do the following: - find all .srt files, set character from iso-8859-1 to iso-8859-2 and then convert and save them to UTF-8? I tried and adapted this script by miquelx, but I get "sh: line 7: inotifywait: command not found" #!/bin/bash # Srt Encoder WATCH_PATH="/volume1/MOVIES/" FROM="iso-8859-2" TO="utf-8" ICONV="iconv -f $FROM -t $TO" inotifywait -m --format '%w%f' -e create -e moved_to -e modify -r $WATCH_PATH | while read file; do EXT=${file##*.} if [ $EXT = "srt" ] then IS_TARGET=`file "${file}" | grep -i iso-8859` if [ "$IS_TARGET" != "" ]; then echo "${file} ---- Will be converted!" cp "${file}" "${file}.bak" $ICONV < "${file}.bak" > "${file}" fi fi done Any help? Edited March 19, 2016 by ciss Link to comment Share on other sites More sharing options...
MndWrp 96 Posted March 19, 2016 Share Posted March 19, 2016 Have you tried it in SubtitleEdit ? It has a batch functionality that can pretty much do that in a jiffy. Link to comment Share on other sites More sharing options...
ciss 4 Posted March 20, 2016 Author Share Posted March 20, 2016 thanks, will try it out, but I'd prefer a task/script to be run every hour/s. Link to comment Share on other sites More sharing options...
Luke 33567 Posted July 28, 2016 Share Posted July 28, 2016 We have a new installation procedure for Synology users. It's very easy and is now on our website: http://emby.media/nas-server.html All Synology users are recommended to use this going forward (if your model supports it). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now