Time Saver: Download subtitles automatically with a simple script

Jos

Posts: 3,073   +97
Staff
Read the full article at:
[newwindow=https://www.techspot.com/guides/748-download-subtitles-automatically/]https://www.techspot.com/guides/748-download-subtitles-automatically/[/newwindow]

Please leave your feedback here.
 
Rename some viruses .sub or else and here you are, compromised.No automatic subtitles for me , thank you!
 
This is what happens when I run the script:

Error at line 41 in #include file "C:\Program Files\AutoHotkey\Lib\_Struct.ahk".

Line Text: #Include <sizeof>
Error: Function library not found.

The program will now exit.
 
I haven't tried the script but it sounds like you may have skipped this step:

"Luckily a lot of the underlying functionality was already taken care off -- you'll need to save the WatchDirectory and Struct scripts onto the Lib folder under your AHK installation. Once that's ready this will get the job done:"
 
I haven't tried the script but it sounds like you may have skipped this step:

"Luckily a lot of the underlying functionality was already taken care off -- you'll need to save the WatchDirectory and Struct scripts onto the Lib folder under your AHK installation. Once that's ready this will get the job done:"
It would be really hard to get an error at line 41 of the Struct script if it wasn't were it is supposed to be. Just saying. lol
 
Media Player Classic does the job for me. Has a built-in function of searching the online database and then loading it in :).
 
I haven't tried the script but it sounds like you may have skipped this step:

"Luckily a lot of the underlying functionality was already taken care off -- you'll need to save the WatchDirectory and Struct scripts onto the Lib folder under your AHK installation. Once that's ready this will get the job done:"
It would be really hard to get an error at line 41 of the Struct script if it wasn't were it is supposed to be. Just saying. lol

Thanks for pointing this out. The Struct class itself calls to another function called sizeof, so you should put this in your Lib folder as well. I'll update the article right away but in the meantime you can find sizeof here: https://raw.github.com/HotKeyIt/_Struct/master/sizeof.ahk
 
I use VLSub with VLC Player, does the trick for me.
When I pitched the idea for this article to our editorial team and to Jose specifically I told him to recommend programs like VLSub (which I had used) and offer good alternatives or something else that worked cross-platform. The Subtitles app that he mentions in the article is indeed really nice, but going further, his automated solution is at its best when you don't rely on a single media player or if you host your videos on a home server and then reproduce them via a Roku or other set top box, so once set up you get a true hands-off approach to subtitle downloading.
 
I haven't tried the script but it sounds like you may have skipped this step:

"Luckily a lot of the underlying functionality was already taken care off -- you'll need to save the WatchDirectory and Struct scripts onto the Lib folder under your AHK installation. Once that's ready this will get the job done:"
It would be really hard to get an error at line 41 of the Struct script if it wasn't were it is supposed to be. Just saying. lol

Thanks for pointing this out. The Struct class itself calls to another function called sizeof, so you should put this in your Lib folder as well. I'll update the article right away but in the meantime you can find sizeof here: https://raw.github.com/HotKeyIt/_Struct/master/sizeof.ahk
Thanks, now the program works great. I appreciate all of you guys that come up with this stuff to make things a lot easier.
I only use Daum Potplayer now. It is by far the best video player that I have used and I have tried all of them over the past 20ish years. Now they just need to add automatic subtitle retrieval, too.
 
Works well but my video file size becomes 0 kb and the video is not playing! :/
Please give me a solution for this!
 
Works well but my video file size becomes 0 kb and the video is not playing! :/
Please give me a solution for this!
I noticed the same thing after you mentioned it. Will have to put this on the back-burner until someone fixes it or tells us how to fix it!
 
Same thing happens to me! I'd *LOVE* to use this method, if only someone would find a way around this. Let's hope Jose updates the post with a solution...
 
I haven't been able to reproduce these errors on my end. I'll try some more and report back.
 
Just curious if anyone is going to get back to us on why our movies are being deleted using these scripts. Any reply would be greatly appreciated!:eek:
 
I know nothing about Applescript, but this script...

on run {process, visible}

tell application "Finder"
set visible of process "Subtitles" to false
end tell

delay 20

tell application "Subtitles"
quit
end tell

doesn't look right. What about...

return input
end run


... at the end?
 
One more thing. How do you select the language for the subtitles? Thanks.
 
Also, Subtitles keep opening up an Amazon web page... annoying! :confused:
I am seeing this as well. Weird.. Is this a virus? Seems to download the srt and then invokes the web browser for Amazon? With the author's name in there somewhere? Amazon doesnt provide subtitles?
 
I'm having the same problem. The scripts are dropping the size of my files to 0 kb...Has there been any progress?
 
Back