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

Online subtitle search #490

Closed
tazihad opened this issue Apr 1, 2023 · 12 comments · Fixed by #756
Closed

Online subtitle search #490

tazihad opened this issue Apr 1, 2023 · 12 comments · Fixed by #756

Comments

@tazihad
Copy link

tazihad commented Apr 1, 2023

Maybe it's a bit too much for minimal ui. I was thinking is there any way to search subtitle online?

@christoph-heinrich
Copy link
Contributor

christoph-heinrich commented Apr 1, 2023

I'm pretty sure there are already scripts that can search/download subtitles. Those scripts can use the menu API that uosc provides for better integration.

@tomasklaen tomasklaen changed the title [Feature Request] Online subtitle search Online subtitle search Apr 1, 2023
@tomasklaen
Copy link
Owner

I really want this in uosc as well. This is exactly why I added support for spinner icons in menu items (displaying loading indicator while fetching subtitle data). But when I was thinking about writing it a couple months ago, I haven't found a good subtitle provider with an open API that would make it easy, and I don't feel like hacking together html parsers, and dealing with captchas, and extractors breaking every time they change html structure or rename an html class/id.

If someone makes something that integrates with uosc, I'll gladly add it to install instructions.

@NormTurtle
Copy link

i would like to add some material required here :

@BhaturaGuy
Copy link

BhaturaGuy commented Apr 10, 2023

SubsPlease doesn't provide subs, animetosho is the one that provides anime subtitles, but using that would be quite complicated, since anime subs are usually .ass which do require fonts to properly display subs, not to mention that it gives subs + their fonts in .7z archive.

So the required output would be something like this.

  1. Download .7z archive.
  2. Extract it somewhere, media file's location preferably.
  3. Change the name of the sub file from track{track_id}_{slang}.ass to mediafile name_{slang}.ass.
  4. Then move the files in attachments folder to somewhere where mpv can parse them without installing them, ~~/fonts maybe?
  5. Then reload mpv with all the settings intact (playtime, profiles, filters, etc).
  6. Then use slang priority order in mpv.conf or sub-select to select sub and play.

Since I am not an engineer I can only imagine how tough this would be, but then again maybe anime sub support isn't required at all since "why would someone download anime without subs?"

@gunir
Copy link

gunir commented Jun 12, 2023

i would like to add some material required here :

* ⭐ **[Open Subtitles](https://opensubtitles.org/)** - Subtitles

* [Podnapisi](https://www.podnapisi.net/) - Subtitles

* [Subsplease](https://subsplease.org/) - Subtitles

* [opensubtitles.com](https://www.opensubtitles.com/) - Subtitles

* [HandySub](https://github.com/HandyOrg/HandySub), [SubDownloader](https://subdownloader.net/) or [Subscene-Subtitle-Grabber](https://github.com/RafayGhafoor/Subscene-Subtitle-Grabber) - Subtitle Downloader

* https://subask.com/

* https://subask.com/
  there is so many more

Great list, but I want to add Subscene because I think this website is very "easy", compare to OpenSubtitles which requires users to login and do captcha, this one is pretty loose.

@NormTurtle
Copy link

I want to add Subscene

i think instead of adding * particular to the list i now directly link to a place which contain most of info possible related to piracy
https://fmhy.pages.dev/videopiracyguide/#subtitles

note : this maybe bad 💀 that im saying , yes im a member and i have done some contribution to there list and thus still , you can give me improvements on that wiki too

@gunir
Copy link

gunir commented Oct 15, 2023

@christoph-heinrich Is is possible to bring socket support to MPV's lua ? With socket captability we can write much much better network code instead of relying on curl, aria2c.... And calling subprocess which is slow.

I don't understand why most programming languages have a socket library but lua doesn't

I consider this a big jump in terms of usability.

@christoph-heinrich
Copy link
Contributor

@gunir I'm sure it's possible, but if you want that in mpv then the uosc issue tracker is the wrong place to ask 😉

@FichteFoll
Copy link

@gunir you may be looking for https://mpv.io/manual/master/#json-ipc.

@kasper93
Copy link

kasper93 commented Nov 2, 2023

Neat feature. Although I personally don't use subtitles it's nice to have an option to search them quickly should you need them.

Do you consider adding more providers in the future? Specifically I find podnapisi.net way more useful than opensubtitles in both the quality and availability of subtitles. YMMV depending on the language, but form my limited experience podnapisi serve me better.

@tomasklaen
Copy link
Owner

Afaik there are no other subtitle providers with an API endpoints, and I'm not maintaining html serializers and trying to work around rate limiting, captchas, and stuff like that.

@kasper93
Copy link

kasper93 commented Nov 2, 2023

Afaik there are no other subtitle providers with an API endpoints, and I'm not maintaining html serializers and trying to work around rate limiting, captchas, and stuff like that.

No, no, of course not. I would not suggest anything like that.

They provide XML API. Maybe it is not advertised well, but it is documented on forum here https://www.podnapisi.net/forum/viewtopic.php?f=62&t=26164#p212652.

Client that we added in MPC-HC 8 years ago is still working fine today. There is no captcha, login requirement, etc. Not sure if it uses latest api version, but it still works. They also support the same hash as opensubtitles.
https://github.com/mpc-hc/mpc-hc/blob/e37826845859bfbc360989aaef3807ef15a83768/src/mpc-hc/SubtitlesProvider.cpp#L548-L764

Apparently there is also JSON API Diaoul/subliminal#916 (comment) (MasterMind2k is podnapisi admin)

If you would be interested in adding it, I guess you can ping MasterMind2k with any questions. I don't want to summon him here prematurely :)

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

Successfully merging a pull request may close this issue.

8 participants