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

Add support for native PGS subtitle rendering without transcoding #2404

Merged
merged 1 commit into from
Aug 11, 2024

Conversation

Arcus92
Copy link
Contributor

@Arcus92 Arcus92 commented Jul 11, 2024

Changes
This PR allows the client to request and render native PGS subtitle streams without transcoding. PGS is a graphical subtitle format. The subtitles are rendered locally by the client on-top of the video element.

This adds a new dependency libpgs-js. I just created this library for the Jellyfin project. If desired, you can fork it into the https://github.com/jellyfin domain.

Related Pull Request (backend): jellyfin/jellyfin#12056
Related Pull Request (web): jellyfin/jellyfin-web#5688

@jellyfin-bot
Copy link

jellyfin-bot commented Jul 11, 2024

Cloudflare Pages deployment

Latest commit 35864a1
Status 🔄 Deploying...
Preview URL Not available
Type 🔀 Preview

View bot logs

Copy link
Member

@ferferga ferferga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, not tested with server yet but I suppose you did. Any reason why this is still listed as draft? Can this go in full review mode?

@Arcus92
Copy link
Contributor Author

Arcus92 commented Jul 19, 2024

@ferferga Yes, it is working just fine.
Like the default web interface I would like to add a opt-in option in the subtitle settings. However, I had no time to look into the setting menu in vue yet. Maybe this weekend.

@Arcus92
Copy link
Contributor Author

Arcus92 commented Jul 20, 2024

@ferferga Just noticed there aren't any subtitle settings at the moment. Is it okay to just leave it enabled for now?

Btw. here is it working in vue:
grafik

@jellyfin-bot jellyfin-bot added the merge conflict Something has merge conflicts label Aug 9, 2024
@ferferga
Copy link
Member

ferferga commented Aug 9, 2024

@Arcus92 The subtitle settings are being worked on in #2360
After your perf improvements in your library, is there any good reason for keeping the opt-in setting for rendering? (I'd say it should be opt-out in Vue as well, given this client targets evergreen browsers and modern platforms, unlike web).

@Arcus92
Copy link
Contributor Author

Arcus92 commented Aug 9, 2024

It should be fine performance wise. I haven't tested different server architectures yet. Ripping .sup files from the source is an intensive task. Worst case ffmpeg could run out of memory or cache disk space and block playback or crash the server. Currently this is just my unfounded fear. For web, I just wanted to be extra safe because this a brand new feature.
Since vue is already experimental we could just enable it - with your permission - and wait for some feedback. Best case no one will notice the difference.

@ferferga
Copy link
Member

@Arcus92 It's completely alright for me. I'll fix the conflicts and ship it later today!

@jellyfin-bot jellyfin-bot removed the merge conflict Something has merge conflicts label Aug 11, 2024
Copy link

sonarcloud bot commented Aug 11, 2024

@ferferga ferferga marked this pull request as ready for review August 11, 2024 06:31
@ferferga ferferga merged commit bc69685 into jellyfin:master Aug 11, 2024
16 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants