TechSpot

Time Saver: Download subtitles automatically with a simple script

By Jos
Dec 2, 2013
Post New Reply
  1. Lurker101

    Lurker101 TS Addict Posts: 637   +124

    Splayer already auto downloads the subtitles for whatever you play.
     
  2. mosu

    mosu TS Enthusiast Posts: 309   +9

    Rename some viruses .sub or else and here you are, compromised.No automatic subtitles for me , thank you!
     
  3. Kelly Kufeldt

    Kelly Kufeldt TS Member

    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.
     
  4. Matthew

    Matthew TechSpot Staff Posts: 6,077   +84 Staff Member

    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:"
     
  5. Kelly Kufeldt

    Kelly Kufeldt TS Member

    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
     
    Matthew likes this.
  6. I use VLSub with VLC Player, does the trick for me.
     
  7. This is absolutely cool.
     
  8. Media Player Classic does the job for me. Has a built-in function of searching the online database and then loading it in :).
     
  9. Jos

    Jos TechSpot Staff Topic Starter Posts: 2,100   +67 Staff Member

    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
     
  10. Matthew

    Matthew TechSpot Staff Posts: 6,077   +84 Staff Member

    Touche.
     
     
  11. Julio Franco

    Julio Franco TechSpot Editor Posts: 6,577   +342

    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.
     
    Jos likes this.
  12. Kelly Kufeldt

    Kelly Kufeldt TS Member

    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.
     
    Jos likes this.
  13. Works well but my video file size becomes 0 kb and the video is not playing! :/
    Please give me a solution for this!
     
  14. Kelly Kufeldt

    Kelly Kufeldt TS Member

    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!
     
  15. 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...
     
  16. Also, Subtitles keep opening up an Amazon web page... annoying! :confused:
     
  17. Jos

    Jos TechSpot Staff Topic Starter Posts: 2,100   +67 Staff Member

    I haven't been able to reproduce these errors on my end. I'll try some more and report back.
     
  18. Kelly Kufeldt

    Kelly Kufeldt TS Member

    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:
     
  19. 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?
     
  20. One more thing. How do you select the language for the subtitles? Thanks.
     
  21. Sounded good. Only problem is it does not work with the latest version of VLC, so better not update...
     
  22. 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?
     
  23. I'm having the same problem. The scripts are dropping the size of my files to 0 kb...Has there been any progress?
     


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...
Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.