#411 Download subtitles does not work anymore


One of the most useful features that separates SMPlayer from the other projects out there is the ability to find and download subtitles from opensubtitles.org.
However, this features does not work anymore. SMPlayer can find the subtitles, but when you doubleclick one of them, a progress bar appears and when it reaches 89%, it says "Download failed". It seems from the source code, that this error is given both on a download error, but also if some other error occurs, e.g. if extraction failed.
I have tried this with several videos, and it does not work for any of them. I have tried copying the URL that SMPlayer finds and then manually downloading the URL and extract the subtitles. Then I load the subtitles with "Load subtitles" and it works just fine.

It seems that the opensubtitles API has changed.


  • Ricardo Villalba

    • status: open --> closed-works-for-me
  • Ricardo Villalba

    I can't reproduce it. It works for me.

  • Thomas Damgaard

    Thomas Damgaard - 2010-09-10

    Hi, maybe it is fixed in a later version?
    Here is my version info:
    Version: 0.6.9 (SVN r3447)
    Using Qt 4.6.3 (compiled with Qt 4.6.2)
    Using MPlayer SVN r1
    Using Kubuntu 10.04.

    rvm, did anything change in the code for downloading subtitles between our versions?

  • Thomas Damgaard

    Thomas Damgaard - 2010-09-10
    • status: closed-works-for-me --> open-works-for-me
  • Surkow

    Surkow - 2010-09-10

    I can reproduce this bug reliably. Downloading subtitles from opensubtitles.org always fails.

    My version information:

    Version: 0.6.9 (SVN r3447)
    Using Qt 4.4.3 (compiled with Qt 4.4.3)
    Using MPlayer 1.0rc3
    Using UBuntu 8.10

  • Ricardo Villalba

    I tried with a few videos and I had no problem to download the subtitles. I didn't make any change in the code.

    I'm using:
    Version: 0.6.9+SVN-r3556
    Using Qt 4.3.5 (compiled with Qt 4.3.5)

    If it doesn't work for you, attach the smplayer log.

  • dragongc

    dragongc - 2010-09-11

    Version: 0.6.9 (SVN r3447)
    Using Qt 4.6.2 (compiled with Qt 4.6.1)
    Using MPlayer 31042
    Using Ubuntu 10.04.

    I can confirm same bug.

    Here is log from SMPlayer:
    [19:33:34:852] FindSubtitlesWindow::updateRefreshButton: state: 6
    [19:33:34:852] FindSubtitlesWindow::updateRefreshButton: state: 0
    [19:33:40:525] FindSubtitlesWindow::currentItemChanged: row: 0, col: 0
    [19:33:40:525] FindSubtitlesWindow::currentItemChanged: row: 1, col: 1
    [19:33:40:801] FindSubtitlesWindow::itemActivated: row: 1, col 1
    [19:33:40:802] FindSubtitlesWindow::itemActivated: download link: 'http://www.opensubtitles.org/en/download/sub/<removed>'
    [19:33:40:805] FileDownloader::httpRequestFinished: request_id 9, error 0
    [19:33:50:848] FileDownloader::httpRequestFinished: request_id 10, error 0
    [19:33:50:850] FindSubtitlesWindow::archiveDownloaded
    [19:33:50:850] FindSubtitlesWindow::archiveDownloaded: a temporary file will be saved in folder '/tmp/'
    [19:33:50:850] FindSubtitlesWindow::archiveDownloaded: file saved as: /tmp/archive_J<removed>.zip
    [19:33:50:850] FindSubtitlesWindow::uncompressZip: zip file '/tmp/archive_J<removed>.zip', output_path '<removed>', save subtitle as '<removed>.sub'
    [19:33:50:850] WARNING: FindSubtitlesWindow::uncompressZip: open zip failed: -1000

    I am using stable and testing software source. How can I update to newest version?

  • Steinar Hugi

    Steinar Hugi - 2010-09-11

    I've been having this problem on both Windows 7 and Ubuntu but found no pattern for when it occurs. It appears that retrying will eventually download the given subtitle in most cases, however I usually go around it by copying the URL and download the subtitle file manually.

    On Windows 7:
    Version: 0.6.9 (SVN r3447)
    Using Qt 4.5.1 (compiled with Qt 4.5.1)

    Using MPlayer SVN r30369

    On Ubuntu 10.1:
    Version: 0.6.7-1
    Mplayer: 2:1.0~rc3+svn20090426-1ubuntu10.1

  • Ricardo Villalba

    > [19:33:50:850] WARNING: FindSubtitlesWindow::uncompressZip: open zip failed: -1000

    It fails to open the zip file. It would be very useful if you could attach the zip file.

  • dragongc

    dragongc - 2010-09-12

    I have done this:

    watch --interval=1 "ls -al /tmp/"

    I have started monitoring temp folder with 1s second interval.
    During subtitle download, there is no new file in temp folder (with name from log or any at all).

  • Anonymous - 2010-11-03

    This might be a problem in certain QT versions. I sniffed the TCP stream while trying to download a subtitle (and failing), and successfully decompressed it. The temporary zipped file in /tmp is incomplete. The reason seems to be requestFinished() happening too early or "error" not being set for some reason. I compared the supposed data size sent in the http header with what is actually in the buffer when httpRequestFinished() is called, and the sizes differ if the bug occurs, so unzipping fails afterwards.

    My version info:
    Version: 0.6.9 (SVN r3447)
    Qt 4.4.3 (Compiled with Qt 4.4.3)
    Using MPlayer dev-SVN-r26940

  • simon

    simon - 2011-02-12

    I've been experiencing the same problem and spent some time this week trying to find the cause. The downloaded zips are incomplete but can be fully reconstructed from the tcpdump captures. The problem seems to occur more frequently on slow or congested links.
    So what was breaking the QHttp's IO?
    The QProgressDialog is started modal and - by design - when started modal you have to explicitly "..call QApplication::processEvents() or QEventLoop::processEvents(ExcludeUserInput) to keep the event loop running to ensure that the application doesn't freeze..." (from QProgressDialog reference)
    It seems that when your internet link is fast and the requestFinished signal comes before the second dataReadProgress signal the Qhttp IO can finish in time. But when the second dataReadProgress signal coincides with requestFinished AND the progressbar is updated/repainted with the new bytes_read value the IO is broken and the Qhttp instance misses a couple of packets.
    The missing amount of data from the downloaded zip file is the the multiple of 1460 bytes + the bytes from the last packet. In my case always the last 3 or 4 packets.

    I've uploaded a patch for this bug: https://sourceforge.net/tracker/?func=detail&aid=3179078&group_id=185512&atid=913575

    The patch also addresses a secondary problem: the QBuffer used as intermediary between Qhttp and the temporary zip file is never cleared. The temporary zip file created contains all the previously downloaded zip files and by pure chance the QuaZip library extract the zip anyway sometimes leading to subs from previous downloads being extracted and sometimes the new ones :-)

  • Thomas Damgaard

    Thomas Damgaard - 2011-06-15

    Is anything happening with this bug?
    It has been confirmed. Sengelsman has even isolated the bug to a race condition and provided a patch. Will this be fixed soon?

  • Ricardo Villalba

    That patch was added to svn 3598.

  • Thomas Damgaard

    Thomas Damgaard - 2011-06-16

    Ok. When will a fixed version be released?


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks