K22R8CT 24 Posted September 1, 2019 Share Posted September 1, 2019 After adding podnapisi as a subtitle provider I noticed Emby downloaded a bunch of sub files without the corresponding idx file. I don't know if this bug is specific to podnapisi or to do with the fact that most other providers don't offer sub/idx. 2019-09-01 07:22:16.182 Info HttpClient: GET https://www.podnapisi.net/subtitles/search/old?sXML=1&sL=en&sK=MyShow&sTS=1&sTE=7&sY=2004 2019-09-01 07:22:16.766 Info HttpClient: GET https://www.podnapisi.net/en/subtitles/en-myshow-2004-S01E07-O-seventh-episode/9c0n/download 2019-09-01 07:22:17.057 Info SubtitleManager: Saving subtitles to /Volumes/Download/TV/My Show/My Show S01E07 - Seventh Episode.en.sub 2019-09-01 07:22:17.341 Info MediaEncoder: ProcessRun 'ffprobe' Execute ... Link to comment Share on other sites More sharing options...
K22R8CT 24 Posted September 1, 2019 Author Share Posted September 1, 2019 Further probing indicates this is a "problem" with podnapisi, not Emby. e.g. https://www.podnapisi.net/en/subtitles/en-deadwood-2004-S01E07-O-bullock-returns-to-the-camp/9c0n offers only a sub file (no idx) Also, the idx file isn't strictly necessary, which I didn't realize. Sorry for jumping the gun. Link to comment Share on other sites More sharing options...
K22R8CT 24 Posted September 1, 2019 Author Share Posted September 1, 2019 (edited) Solution: for anyone who needs to convert subs with missing idx's to srt in linux. (I use this as part of a suite of subtitle standardization scripts which I'll post when it's cleaned up) # Install mplayer for framerate detection sudo aptitude install mplayer # Install perl swiss army sub converter and required modules # Required modules cpan # (select 'sudo') install Subtitles quit # Now converter cd wget http://karasik.eu.org/software/Subtitles.tar.gz gunzip Subtitles.tar.gz tar -xvf Subtitles.tar cd Subtitles-1.00/ perl Makefile.PL make # Helper script based on l0co@wp.pl script sudo emacs /usr/local/bin/subs2srt.sh # Paste the following until (but not including) #END: #!/bin/bash # converts subtitles to "srt" format # uses: mplayer to detect movie framerate # subs (from Subtitles perl swiss army knife: http://karasik.eu.org/software/) echo "subs2srt.sh" if [ ! "$#" = "2" ]; then if [ ! "$#" = "1" ]; then echo Usage: subs2srt.sh MOVIENAME SUBSNAME exit fi MOVIENAME=$1 SUBSNAME="${MOVIENAME%.*}.txt" else MOVIENAME=$1 SUBSNAME=$2 fi SRTNAME="${SUBSNAME%.*}.srt" if [ "$SRTNAME" == "$SUBSNAME" ]; then SRTNAME="${SUBSNAME%.*}1.srt" fi echo "moviename: $MOVIENAME" echo "subsname: $SUBSNAME" echo "srtname: $SRTNAME" if [ ! -f "$MOVIENAME" ]; then echo "Movie not found" exit fi if [ ! -f "$SUBSNAME" ]; then echo "Subtitle not found" exit fi # detect framerate FRAMERATE=`mplayer -vo null -ao null -identify -frames 0 "$MOVIENAME" |grep ID_VIDEO_FPS| sed "s/ID_VIDEO_FPS=//"` echo "framerate: $FRAMERATE" # execute conversion /usr/local/bin/subs "$SUBSNAME" -r $FRAMERATE -c srt -o "$SRTNAME" # END # Set permissions sudo chmod a+rx /usr/local/bin/subs2srt.sh Script can now be called like so: /usr/local/bin/subs2srt.sh "/mnt/data/Download/TV/My Show/My Show S01E01.mkv" "/mnt/data/Download/TV/My Show/My Show S01E01.sub" Producing the file: /mnt/data/Download/TV/My Show/My Show S01E01.srt Edited September 1, 2019 by Anon28109 Link to comment Share on other sites More sharing options...
Luke 37246 Posted September 2, 2019 Share Posted September 2, 2019 Great, thanks for the info ! 1 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