[go: up one dir, main page]

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

Allow VideoStreamCopy for remote source fallback #5617

Merged

Conversation

gnattu
Copy link
Member
@gnattu gnattu commented May 27, 2024

Changes

During LiveTV playback, a fallback is usually needed because the first attempt would be try to direct play the remote url of that channel. If that failed we should still allow stream copy because the playback would still success in this case. The server side will enforce the most compatible format (h264+ts) and still do transcoding if that condition is not met.

Issues

Depends on jellyfin/jellyfin#11851 to guarantee the stream compatibility and actually doing remux for certain input videos

During LiveTV playback, a fallback is usually needed because the first attempt would be try to direct play the remote url of that channel. If that failed we should still allow stream copy because the playback would still success in this case. The server side will enforce the most compatible format (h264+ts) and still do transcoding if that condition is not met.
@gnattu gnattu requested a review from a team as a code owner May 27, 2024 17:35
Copy link
Contributor
@dmitrylyzo dmitrylyzo left a comment

Choose a reason for hiding this comment

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

Having an extra try (for remux) doesn't hurt, but I have a strong feeling that we are trying to fix it from the wrong side.

This is what I tried for direct HLS (but it seemed to work without these changes).
My opinion, we need to probe the source before passing MediaSources to the StreamBuilder. Otherwise, it processes the raw source (until the next playback).
Not tested with STRM.

src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
gnattu and others added 3 commits May 28, 2024 20:27
Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
The TranscodingSubProtocol is no longer nullable on the server side and direct playing media will have a value of http. Check container type when TranscodingSubProtocol is not HLS
src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
src/utils/mediaSource.ts Outdated Show resolved Hide resolved
gnattu and others added 2 commits May 30, 2024 00:12
Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
Copy link
sonarcloud bot commented May 29, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@thornbill thornbill added enhancement Improve existing functionality or small fixes backend Requires work on the server to finish labels May 29, 2024
@thornbill thornbill added this to the v10.9.4 milestone May 29, 2024
@dmitrylyzo
Copy link
Contributor

This PR doesn't require any changes in server. I tested it on the releaze-10.9.z. 👈 backend label
Or has something changed?

@gnattu
Copy link
Member Author
gnattu commented May 30, 2024

This PR doesn't require any changes in server. I tested it on the releaze-10.9.z. 👈 backend label Or has something changed?

Not all HLS streams need the server-side change. Actually, streams strictly obeys standard should not need any server side change. The server-side change is to add compatibility for TV Tuners that is lying about the stream info like bitrate so that the client requests a wrong bitrate and triggered transcoding.

@dmitrylyzo
Copy link
Contributor

I mean, we can merge it without waiting for the server - these web changes are pretty universal.
It is also a bugfix (!): HLS transcoding subprotocol.

@gnattu
Copy link
Member Author
gnattu commented May 30, 2024

I mean, we can merge it without waiting for the server - these web changes are pretty universal. It is also a bugfix (!): HLS transcoding subprotocol.

Yes you can. Nothing should break.

@thornbill
Copy link
Member

I labelled it as "backend" due to this comment in the description:

Depends on jellyfin/jellyfin#11851 to guarantee the stream compatibility and actually doing remux for certain input videos

I will remove that and get this merged since that isn't required. 👍

@thornbill thornbill added bug Something isn't working stable backport Backport into the next stable release and removed enhancement Improve existing functionality or small fixes backend Requires work on the server to finish labels May 30, 2024
@thornbill thornbill merged commit 40e7dc9 into jellyfin:release-10.9.z May 30, 2024
11 checks passed
joshuaboniface pushed a commit that referenced this pull request Jun 1, 2024
Allow VideoStreamCopy for remote source fallback

Original-merge: 40e7dc9

Merged-by: thornbill <thornbill@users.noreply.github.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
@jellyfin-bot jellyfin-bot removed the stable backport Backport into the next stable release label Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants