VLC and OpenSubtitles downloader

I’ve recently found a nice VLC script for adding subtitles to any video using the great OpenSubtitles portal on this VLC Forum post. Such script does exactly what it sais: it crawls the OpenSubtitles website looking for the matching movie (no osdb hash function involved) and adds the subtitle into the VLC media player.

I’ve edited such LUA script (so, I’m not the original author of such script) also allowing the subtitle downloading for an off-line usage, the downloaded file is placed in the same movie folder, renamed as the movie itself with the language suffix. It’s my first attempt into LUA scripting language, it’s quite easy, but I’ve used about 3 hours to find out all the LUA features and the (sometimes not documented) VLC scripting functions.

Notes:

  • Due to a issse in VLC, all lua plugins that use GUIs (like SubtitlesFinder) aren’t supported under MAC OSx [citation missing]

Downloads:

Updates:

  • [version 1.3-beta]
  • 2013-04-05: Show plugin version in “Plugin details” dialog
  • 2013-04-05: fixed auto-show of search dialog (by Mederi)
  • 2013-04-05: Fixed typos in Italian language (by Mederi and Ciprus)
  • [version 1.2]
  • 2013-04-03: Fixed Linux subtitle file saving (thanks to Abraham van Helpsing)
  • 2013-04-03: Various fixes and improvements (thanks to Mederi)
  • 2013-04-03: Removed standard downloader since WebDownloader retrieves the most updated plugin
  • .. full changelog on SubtitlesFinder commit log

Alternatives:
For an alternative of VLC-Subtitles-Finder, try VLCSub (written by Guillaume Le Maout) available at my GIT repository, installer also available in the project download section. VLCSub can’t search by movie title, but implements the Opensubtitles.org HASHing function (sometimes more accurate).

118 thoughts on “VLC and OpenSubtitles downloader

  1. @Medri – Hi! — I like the way it looks, and the improvements you made, especially the fact that one click starts it. and it work just fine in windows. but not in Linux (no saving) – at least from the link you posted. do you have another one for download?

  2. the script with the two patches (mederi’s and abraham’s) now works in both Windows and Linux, with optional save, and without the need for clicking twice ‘View/Subtitles finder’ (once to activate and once to download)

  3. Dear Ciprus, Medeli and Abraham: I’ve updated my script on GitHub following your suggestions (and provided thanks and authorship of each change). Could you test the latest online version?
    I’ll try to reply to all the forums and comments you linked ASAP 🙂 Thank you all for your efforts! 🙂

  4. O.K.
    * As cipricus reported: “languages, ‘Italina’ needs correction to ‘Italian'”.
    * Then I forgot to highlight with comment also default trigger of download dialog box: “trigger_menu(1)” in function activate(). I think, that it is quite confusing, when a user activates the extension in VLC menu and nothing happens. Automatic show of dialog box with an information, that other options are now available in VLC menu is good solution, isn’t it?
    * Also version “1.2” in function descriptor()?

    Another issus/ideas to solve:
    * Saving of multiple subtitles? If there are more subtitles in the package, now only one subtitle file is saved. And multiple selection?
    * To check end-of-lines in saved subtitles. Windows uses “\r\n”, Linux “\n”, or just keep original file.
    * There is a problem with paths. If a path contains non-English characters, then there is a problem because of incompatibility of UTF-8 encoded path from Lua script and original code page of OS. As a workaround there could be implementation of a preview of downloaded subtitles in dialog box in html widget (d:add_html()). It is just necessary to convert EOL-s to tag. Then it is possible to select a content of subtitles there, then copy and paste it in some text editor like Notepad to save subtitles manually.

  5. Thanks Mederi for your feedback, I fixed the first three points (easy ones) 🙂
    GIT repository has been updated. 🙂

  6. hello, please make another feature where it also saves the copy of .srt file same as movie name in the same folder. Currently it shows subtitles Ok but when you restart the same video, there are no subtitles. So again we need to download or use your extension.

  7. If you know LUA scripting you can implement the new features and I’ll be happy to commit them in the plugin! 🙂

  8. I’m trying to speed up the addition of subtitles, I managed to edit the .lua file so as only English appears/is in the list. I also made the Save check box always be checked since I want to save files.
    Is there any way to make it so that it searches for subtitles automatically when the window opens, without pressing the button. Also what about (down)loading the first result?

  9. Hi Marius, thank you for your efforts, looking forward to see your edits! 🙂
    BTW: Are you sure the first result is always the right one? 🙂

  10. I’m back with an update and a question.
    The script now automatically searches by calling the click_search() method by default. It could also load the subtitle if I call the click_load_from_search_button() function but I’m have trouble manually selecting the first element because selection = subtitles_list[1] does not seem to work. Perhaps the Get_selection() method can be modified so that it returns the first element as being selected when nothing else is?
    I usually always download the first result, most of the time there are two results at most, one of them being a Hearing Impaired version of the other.

  11. Hello. So i have the following problem. I go to VideoLAN>VLC>lua and i see no “extensions” folder exist over there. I’m using the 2.0.8 VLC version for windows 7, 64 bit. I’d like some help. Thank you.

  12. I noticed that if you have a huge playlist loaded, it crashes the whole VLC program. Like if you load up a whole series of at least 7 26 episode seasons. Works best if you load in one season at a time. Then you can download the subs as-needed. Usually, it finds the exact release so the subs line up.

    I’ve been trying to find a way to have this plugin show up in my particular skin mode, but so far no luck, so you have to use it while VLC is in Native Skin mode.

  13. Great work, can this work on mac osx? I put the plugin in extension folder and when I loaded from vlc, load fine and search subtitles ok, but when I click “load selected subtitles” this error shows
    “Falló lectura de archivo
    VLC no pudo abrir el archivo «//zip://http://www.opensubtitles.org/es/http://dl.opensubtitles.org/es/download/subad/4682450!/Dexter 7×02 ?2d Sunshine and Frosty Swirl ?28Espa?c3?b1ol ?28Espa?c3?b1a?29?29.srt» (m).”

    and this one

    “Su entrada no puede abrirse
    VLC es incapaz de abrir el MRL «file:////zip%3A//http%3A//www.opensubtitles.org/es/http%3A//dl.opensubtitles.org/es/download/subad/4682450%21/Dexter%207×02%20%3F2d%20Sunshine%20and%20Frosty%20Swirl%20%3F28Espa%3Fc3%3Fb1ol%20%3F28Espa%3Fc3%3Fb1a%3F29%3F29.srt». Vea el registro para más detalles.”

    please help

Comments are closed.