jellyfin / jellyfin-vue

A modern web client for Jellyfin based on Vue
https://jellyfin.org
GNU General Public License v3.0
1.24k stars 223 forks source link

Add support for native PGS subtitle rendering without transcoding #2404

Closed Arcus92 closed 4 weeks ago

Arcus92 commented 1 month ago

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): https://github.com/jellyfin/jellyfin/pull/12056 Related Pull Request (web): https://github.com/jellyfin/jellyfin-web/pull/5688

jellyfin-bot commented 1 month ago

Cloudflare Pages deployment

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

View bot logs

Arcus92 commented 1 month ago

@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 commented 1 month ago

@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

ferferga commented 4 weeks ago

@Arcus92 The subtitle settings are being worked on in https://github.com/jellyfin/jellyfin-vue/pull/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 commented 4 weeks ago

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 commented 4 weeks ago

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

sonarcloud[bot] commented 4 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud