Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Nightly] Show All Subtitle Results in Menu #121

Open
roeycohen opened this issue Oct 10, 2016 · 14 comments
Open

[Nightly] Show All Subtitle Results in Menu #121

roeycohen opened this issue Oct 10, 2016 · 14 comments

Comments

@roeycohen
Copy link

hi,
most times, there are more than one subtitles per language and the player doesn't choose the best one.
an option to manually switch between these subtitles will be really good.. as manually downloading the subtitles isn't very fun :)
also, the player should remember the user's last subtitles language that was in use. i think it safe to assume that if he use the subtitles features he will use it with all videos.

i hope it's not something too complicated...

@jaruba
Copy link
Owner

jaruba commented Oct 10, 2016

Is this for the v0.98 version (stable version) or for the v1.00 Nightly (beta version)?

@roeycohen
Copy link
Author

nightly.
looking at this file: src/components/Player/workers/subtitles/find.js (63)
it's seems like the last subtitle in each language overrides all previous one. may be this most simple thing to do will be using numbers:
english 1
english 2
french 1
french 2
and adding a simple filtering at the menu's top.

@jaruba jaruba changed the title subtitle selection [Nightly] Subtitle Selection Oct 10, 2016
@jaruba
Copy link
Owner

jaruba commented Oct 11, 2016

It doesn't choose the last subtitle, it actually uses a complex algorithm to predict the best possible subtitle for each language (a module made by @vankasteelj ).

Funnily enough, "english 1, english 2, french 1, french 2" is how some of the very first versions of Powder used to do it, it would just show all the possible results for all languages.

It's strange that I have seen a significant decrease in the number of subtitle results and also received numerous complaints as to subtitle discovery not being as good as in previous versions.

I would indeed try to make a lot more subtitle settings, one of which could be to let users select from "show best result", "show all results" as I see a need for that now, maybe even the possibility to switch between multiple subtitle discovery modules for testing purposes.

@roeycohen
Copy link
Author

that would be really good :)
can you please explain how the "complex algorithm" works or redirect me to it in the code?

@jaruba
Copy link
Owner

jaruba commented Oct 11, 2016

Although @vankasteelj would probably explain it best. I believe that the actual subtitle search is in:
https://github.com/vankasteelj/opensubtitles-api/blob/master/lib/search.js

(i'm obviously using an older version of the module in the Nightly as I packaged it some time ago)

From what I remember as I worked on it a bit too, it does 3 separate searches on OpenSubtitles:

  • by IMDB id
  • by Tag (actual file name)
  • by Video Hash (not the actual file hash, but the OpenSubtitles File Hash, calculated by first and last X bytes)

Then merges all of the results from these searches and gives a score to each subtitle by this logic:
https://github.com/vankasteelj/opensubtitles-api/blob/master/lib/search.js#L200-L230

The top scoring subtitles are then selected and sent to Powder. :)

@roeycohen
Copy link
Author

that's very sophisticated :) still yesterday i didn't get the right subtitle...
manual selection would be really good...

besides that, what a great player!!
p.s.
i'm the author of bit player chrome app:
https://chrome.google.com/webstore/detail/bit-player/mjkikpbeengfefopcnmhljmiobkghfpd
i've found this player when i realized google is shutting down it's (packaged) app store.

@vankasteelj
Copy link
Collaborator

It's all described here : https://github.com/vankasteelj/opensubtitles-api#search-the-best-subtitles-in-all-languages-for-a-given-movieepisode

Yet to have a real match, you need to have the video file first. It works 99% of the time right from my tests, but it has trouble with less watched shows or non-US movies

@roeycohen
Copy link
Author

i'll take your word for it... still it would be nice to manually choose.
i know that "back in the days " of popcorn-time the wrong subtitles issue was a real pain.
and it also happened to me yesterday on the first video i've tried to play with hebrew subtitles - so it must be not that uncommon.

@jaruba
Copy link
Owner

jaruba commented Oct 11, 2016

There's no 100% solution for anything as abstract as this, I agree that @vankasteelj 's module is the best out there, I also agree that false positives will always happen in such a scenario.

With that said, Powder was never built to be the dummy's player, quite the contrary, I always attempted to add as many options as possible for the power users. So I'll just do what I always do, implement all that I can and offer settings for people to switch between them. Then see what works best and make that the default behavior.

@jaruba jaruba changed the title [Nightly] Subtitle Selection [Nightly] Show All Subtitle Results in Menu Oct 11, 2016
@jaruba
Copy link
Owner

jaruba commented Oct 11, 2016

Off Topic

p.s.
i'm the author of bit player chrome app:
https://chrome.google.com/webstore/detail/bit-player/mjkikpbeengfefopcnmhljmiobkghfpd
i've found this player when i realized google is shutting down it's (packaged) app store.

@roeycohen had a chance to test out your player, it's pretty nifty, glad to find a fellow player developer and torrent enthusiast, what are your future plans in these circumstances though?

@vankasteelj missing you dude, wtf are you up to these days? give a holler whenever, would love to hear from you :)

@roeycohen
Copy link
Author

@jaruba I received an email from google about the retirement of packaged apps and a recommendation to try move the program to NWJS or Electron.
I was a bit disappointed about that :/
going over the lists of apps at NWJS i saw this app and i think it really cool.
I don't see a good reason to start a new project that does the same while this one is clearly very good and actively developed.
I hope i'll have the time to contribute to this project :) it will be a good opportunity to dive into React JS and be helpful.
I also hope that one day the google dev team will allow to use tcp sockets inside the browser. that way software like this one could just be an extension or embedded inside sites.

@jaruba
Copy link
Owner

jaruba commented Oct 12, 2016

@roeycohen The Nightly is actually build on Electron, v0.98 (the latest stable version) is actually built on NW.js. I stopped using NW.js because their developers never answered any of the issues and did not seem to have any desire to fix anything, while the Electron devs always answer all the issues and actively fix them.

The Nightly is actually a total rewrite of Powder with Electron, React.js and Polymer. While v0.98 was just NW.js with no framework whatsoever, it was my first NW.js project and I literally treated it like making a website from scratch. :P

I also hope that one day the google dev team will allow to use tcp sockets inside the browser. that way software like this one could just be an extension or embedded inside sites.

They won't ever do that though, the fact that WebSockets wore created demonstrates that they evade making any TCP / UDP implementation, and that's understandable as it would give to much power to websites and create substantial security issues.. :(

@roeycohen
Copy link
Author

well you're doing a good job :)
i hope i'll be able to participate.. i know coding is consuming.

They won't ever do that though, the fact that WebSockets wore created demonstrates that they evade making any TCP / UDP implementation, and that's understandable as it would give to much power to websites and create substantial security issues.. :(

i still hope they would eventually give us the developers the option to over come these limitations without creating security holes.

@vankasteelj
Copy link
Collaborator

Something like that might happen if Microsoft or Linux decide to start shipping Node by default. Microsoft even seem heading that way with their JS engine (competitor of v8, I don't recall the name right now). Because if Node is present on 100% of the machine, it's possible some day, we start seeing in browsers the hability to natively use node if we decide to give special permissions, for example.
But it's absolutely not for right now anyway x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants