Popcorn-desktop: "Error reading subtitle timings, file seems to be corrupted"

Created on 27 May 2019  路  23Comments  路  Source: popcorn-official/popcorn-desktop

Operating System Version:
OS X 10.12.6

Popcorn Time Version:
Version 0.3.10

Download date:
May 9, 2019

Expected Behaviour

I simply wanted to load some subtitles from the in-app droplist.

Actual Behaviour

The app freezes for a moment, and then displays a message in a red box that reads:

"Error reading subtitle timings, file seems to be corrupted
Try another subtitle or simply drop one in the player"

It happens with all subtitles in any language.

Steps to reproduce the behaviour

  1. Simply start playing any given show or movie.
  2. Once it starts playing, try picking any language from the add subtitles option.
  3. The screen will freeze for a moment, and the error will appear afterwards. The show or movie will also continue playing, but without any subtitles. The keyboard shortcuts for stuff like faster or slower playing or changing the timing for subtitles will also stop working.

error

bug

Most helpful comment

Videojs really doesnt like them for some reason.

They switched the number of audio channels.

  • Before 01m28s (2 ... stereo)
    Screenshot_2020-11-06_00-12-29

  • At 01m28s (5.1)
    Screenshot_2020-11-06_00-13-10

All 23 comments

I've recently tried the app in a Windows computer, and it had the same problem.

This isnt really an issue with Popcorn Time or else it would affect everyone. That error is when subtitle timings are actually unreadable (by Popcorn Time atleast). It might be that opensubtitles were feeding you bad subtitles due to your IP. They were known to do that, not sure if they still do.

Either way, a lot have changed since this issue was created and tbh its not an actual Popcorn Time issue to begin with.

@Persei08 can you close this please?

It might be that opensubtitles were feeding you bad subtitles due to your IP. They were known to do that

It would be informative to know what country and/or ISP might be causing this, this way in the future we can answer why this happens.

Also using an (very) old version is not helping the issue.

@dutchy1001 I tried to find their forum post were an admin was admitting this but couldnt in the first couple of minutes so I gave up. I think they go by VPN ip ranges rather than whole countries due to the fact they have attacks and abuse of their service etc. Again it was a couple of year old post though. Not sure if this continues, especially since they changed their API policy to require login information from everyone now (except if your useragent is exempt, like Popcorn Time's, most of the time..)

@kiriles90 so basically just point the VPN to different location should fix this then.

Sometimes, except when they blocked multiple servers/locations because they know people will just do this :D

hmm, i think bad subtitles timing is another thing not related to opensuibtitles blocking some ip ranges.

I don't think bad subtitles timing is caused by a PT issue, but if it brake shortcuts then, there is probably the shortcuts to fix.

No ?

Its not when its 1 bad sub in a 100. Which means its actually unreadable by Popcorn Time. (other app might read it who knows)

But the OP said

It happens with all subtitles in any language.

Which leads me to believe they were feeding him bad subtitles everytime. They cant be all corrupted, and only for him.

About the keyboard shortcuts.. he was using 0.3.10.. so who knows if the issue still exists/ever existed. Any known bad sub for something so we can test? :)

I don't think bad subtitles timing is caused by a PT issue

Agreed there, as I said in an other post (#1714 ) timings for subs are depending on what source they have been made with, then you have the frame rate that can also be different.

About the keyboard shortcuts.. he was using 0.3.10.. so who knows if the issue still exists/ever existed.

Update to latest build first and see if the OP still has that issue with the shortcuts would be the first thing to do

I just realised, this issue is from May 2019, the OP might have moved on or got already a new version without the issue.
Unless the OP reports back I would not spend more time here (I saw the version 3.1.0 but didn't look at the date made).

Agreed. The subtitle issue doesnt exist or we would hear a lot more about it. The keyboard shorcuts issue.. who knows but probably doesnt also, a lot have changed since then. I'll try to find a bad subtitle and report back if it breaks my keyboard shortcuts just for the sake of it though so we can close this in good conscience.

Ok so.. from my testing it breaks space. All other player keyboard shortcuts including p still work (? for the list)

If someone wants to try and replicate and confirm this (or not) try _Harry Potter and the Philosopher's Stone_ in 1080p with Greek subtitles. The first ones should be 'timings corrupted'.

Or just paste App.vent.trigger('notification:show', new App.Model.Notification({title: i18n.__('Random notification'),autoclose: true})); in the console and trigger a dummy notification to break space while any movie is playing. Its related to the notification showing on top of the player, not the subtitles.

(EDIT: it breaks all of them if you are watching a show instead of a movie because the unbindKeyboardShortcuts() function in show_detail is different from that of movie_detail)

I'll check if I can do anything about it and link a PR if I manage something.

Harry Potter and the Philosopher's Stone with Greek subs gives me also the error for subtitle, but then it still shows it. Spacebar doesn't work but P does also I can use G and H for timings

greek potter

When using my external (SMPlayer) player I dont get the error and subs just play normal too.

Console output gives:
videojshooks.js:334 Error reading subtitles timing, file seems corrupted TypeError: Cannot read property 'split' of undefined at subObj.vjs.TextTrack.parseCueTime (chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/node_modules/video.js/dist/video-js/video.dev.js:8291:17) at subObj.vjs.TextTrack.parseCues (chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/node_modules/video.js/dist/video-js/video.dev.js:8248:28) at vjsBind (chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/src/app/vendor/videojshooks.js:332:23) at parse (chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/src/app/vendor/videojshooks.js:297:17) at decode (chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/src/app/vendor/videojshooks.js:326:17) at chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/src/app/vendor/videojshooks.js:362:17 at Request._callback (chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/src/app/vendor/videojshooks.js:132:25) at Request.self.callback (C:\Users\Mike\AppData\Local\Popcorn-Time\node_modules\request\request.js:185:22) at Request.emit (events.js:316:20) at Request.<anonymous> (C:\Users\Mike\AppData\Local\Popcorn-Time\node_modules\request\request.js:1161:10)

@dutchy1001 thank you for confirming. Its the notification showing on top of the player that breaks space. Everything else still works. Also doesnt matter what that notification is, its not related with the subtitles. Try triggering a random one with the code in my comment above (I've edited) and it will break space while any movie is playing.

App.vent.trigger('notification:show', new App.Model.Notification({title: i18n.__('Random notification'),autoclose: true}));
Does indeed break the space for me too

Ok, reopening this one, because I encounter the issue and have more details to provide.


Step to reproduce:

  • Watch Shazam (2019) - 720p with French subtitles.

-PCT will download the subtitles srt file from opensubtitles api... (http://dl.opensubtitles.org/en/download/src-api/vrf-19d80c5d/sid-weGQcc7naP4MHQ1HbPa9xuBsua9/filead/1956393619)
The subtitle file is edited by opensubtitles to add advertisement for opensubtitles.org.

-You can go on opensubtitles.org and download the zip archive of the subtitles here: https://www.opensubtitles.org/en/subtitles/7822010/shazam-fr
The subtitles isn't edited and doesn't contain advertisement.

Download both subtitles and try each of them.

Now if you compare the 2 whole srt file, you will notice (https://www.diffchecker.com/w9DACkiC) :

The one from opensubtitles api:

1
00:00:06,000 --> 00:00:12,074
Annoncez votre produit ou votre marque ici. 
Contactez www.OpenSubtitles.org aujourd'hui !

2
00:00:45,754 --> 00:00:50,259
脡TAT DE NEW YORK

3
2
00:00:59,142 --> 00:01:01,144
N'Y COMPTE PAS

4
00:01:02,896 --> 00:01:04,022
Thad !

(...)

1575
02:11:35,020 --> 02:11:36,063
Sous-titres : Pierre Arson

1577
02:11:37,305 --> 02:12:37,469
Soutenez-nous et devenez membre VIP pour d茅sactiver toutes les publicit茅s sur www.OpenSubtitles.org

The one from opensubtitles site:

1
00:00:45,754 --> 00:00:50,259
脡TAT DE NEW YORK
1974

2
00:00:59,142 --> 00:01:01,144
N'Y COMPTE PAS

3
00:01:02,896 --> 00:01:04,022
Thad !

(...)

1574
02:11:35,020 --> 02:11:36,063
Sous-titres : Pierre Arson

So, they're messing with the subtitles index numbers.

Now if you just edit the subtitle file downloaded from the api to:

3
00:00:59,142 --> 00:01:01,144
N'Y COMPTE PAS

It works as expected, just that.

So @everyone, please report with which movies and subtitles language you got the issue, so we can do more tests and eventually find a way to correct the subtitles. Thx

To me this looks then that the opensubtitles API is causing this issue, not PCT.

BUT, when checking the Shazam with the "API" French subs is working fine for me while using an external player (SMPlayer) but not when using the default PCT player.
So why does SMPlayer read through the error and PCT doesn't?
Is there any way you can see from SMPlayer (source (or any other external player that works)) how it reads the subs and implement this then to PCT so it does the same to avoid the error? (me just thinking out loud here)

PCT use videojs web player the implementation is different.

The srt file syntax isn't right and it's what bug the thing. My guess is VLC, SMPlayer, ... better handle errors and ignore the corrupted lines.

More specificaly, PCT call the videojs parseCues fonction to read the subtitles timing, but it fail because the 3rd subtitles (line 3) should be followed with timing:

3
2
00:00:59,142 --> 00:01:01,144
N'Y COMPTE PAS

What I need here are few other exemples, to see what need to be cleaned in the subtitles.

Doesn't those external players (VLC, SMPlayer) not have an API to implement and swap the videojs web player out? Not sure this is an option...

EDIT:
Trying to find a movie with corrupted subs is like finding a needle in a haystack. I've gone through about 20 movies using different language subs but no errors.

Doesn't those external players (VLC, SMPlayer) not have an API to implement and swap the videojs web player out? Not sure this is an option...

There was a VLC browsers plugin, but I'm not sure if it's still well supported or is not restricted by chromium... but i don't want to go this way, i'm looking for something more easy.

for my issue with shazam, I can parse the subtitle file with a regex in PCT to fix the annoying lines. then it works.
but this apply to this subtitle file, there are other reasons which trigger 'subtitle timing' errors.

I was trying Games of thrones S01E03 720p with french subs... but the video file is corrupted, so it's crash the player and i don't even want to waste time trying to find the issue of the subtitles of a video which crash the player. One issue at the time is enough :D

Its those "CTU" releases. Videojs really doesnt like them for some reason.

Videojs really doesnt like them for some reason.

They switched the number of audio channels.

  • Before 01m28s (2 ... stereo)
    Screenshot_2020-11-06_00-12-29

  • At 01m28s (5.1)
    Screenshot_2020-11-06_00-13-10

i close this one, will eventually repon depending the comments and details provided. Else feel free to report same issue next time you encounter it... with all details so we can try to debug and find what is wrong with the subtitles. Thx

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dollhaus picture dollhaus  路  3Comments

allan-andrade picture allan-andrade  路  3Comments

Villelmo picture Villelmo  路  4Comments

LKHN picture LKHN  路  5Comments

Faaabiii picture Faaabiii  路  4Comments