mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-24 07:30:57 +01:00
Transcoding instead of muxing #5223
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#5223
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @weberc2 on GitHub (Nov 8, 2023).
When I play an HEVC/MKV file, the transcoder kicks in even though the same file converted to HEVC/mp4 plays just fine. I would expect it to remux and not transcode.
Media Info of the file
MP4 version
MKV version
Logs
Logs showing playback of mkv and then playback of mp4
FFmpeg Logs
Stats for Nerds Screenshots
Server System (please complete the following information):
Client System (please complete the following information):
@weberc2 commented on GitHub (Nov 8, 2023):
I'm also seeing
"SupportsDirectStream": falseand"TranscodingUrl": "...VideoCodec=h264..."in the PlaybackInfo response body:URL:
http://raspberrypi:8096/Items/b8457277ab7e36ab0a80861e5b0cd021/PlaybackInfo?UserId=488517aee48541448542fa83102806a3&StartTimeTicks=974509670&IsPlayback=true&AutoOpenLiveStream=true&MaxStreamingBitrate=76363636Request Body
Response Body
@weberc2 commented on GitHub (Nov 8, 2023):
I'm also seeing
"SupportsDirectStream":truein the ffmpeg log (full log contents in the issue description):@dmitrylyzo commented on GitHub (Nov 9, 2023):
HEVC remuxing currently/always requires fMP4 to be enabled on the client (Settings / Playback).
I didn't immediately realize what the problem was, since I'm used to Samsung TV supporting HEVC in TS.
@weberc2 commented on GitHub (Nov 10, 2023):
@dmitrylyzo Ok, I can try enabling that setting on Chrome. I'm noticing there's a setting in the iOS app called "prefer fMP4", but it's grayed out--is there any way to support this in iOS? In particular, when I stream to my Samsung TV (I believe DLNA is the protocol it uses?) I still see this issue (is this because my iOS app doesn't support fMP4 or because the TV doesn't support it?).
Also, is there documentation somewhere I can update to make this more obvious to newbies like myself? I'm happy to submit a PR.
Lastly, in the longer term, shouldn't the server remix regardless of whether the client supports fMP4? As a user, my intuition is that if the client can play HEVC/mp4 then the server should remux it even if the client doesn't support fMP4--would this be a reasonable feature request?
@weberc2 commented on GitHub (Nov 10, 2023):
I toggled the "Prefer fMP4" setting in Chrome, but it still transcodes when I play HEVC/mkv content.
@dmitrylyzo commented on GitHub (Nov 11, 2023):
Turns out fMP4 is only available for Safari, Tizen, and webOS:
4b6bbcfe26/src/scripts/browserDeviceProfile.js (L693)It will be available for Chrome in 10.9: https://github.com/jellyfin/jellyfin-web/pull/4762
It should be available on any web based client: browsers, Android (mobile), iOS (not Swiftfin), Tizen, webOS. Although enabling it doesn't guarantee that it will use fMP4 - this will be tested later when playback starts.
If you are using AirPlay then, I guess, it depends on your source device (iOS).
Jellyfin has a "Cast To" feature (though sometimes it's not available). You can control one Jellyfin client from the another. In this case, it will depend on the target device.
Probably.
https://github.com/jellyfin/jellyfin.org/blob/master/docs/general/clients/codec-support.md
Progressive transcoding (remux to MKV/MP4) was removed for web based clients: https://github.com/jellyfin/jellyfin-web/pull/4385
Iirc, it restarted transcoding when seeking.
@weberc2 commented on GitHub (Nov 11, 2023):
Ah, that makes sense.
Huzzah! 🎊
Forgive my ignorance, but why not just remux the whole file when the stream starts? If episode-01.mp4 plays just fine on a given client, but episode-01.mkv doesn't work, why not just remux
episode-01.mkv -> episode-01.mp4when playback starts? It only takes 3.5s for a Raspberry Pi with a USB-connected spinning metal disk to remux a 1080p TV episode, but maybe this is undesirable since a 4K movie might take multiple minutes to remux ahead of time?@dmitrylyzo commented on GitHub (Nov 12, 2023):
When you resume watching, it starts from the requested time. Otherwise, it will take some time to remux the file from the beginning. Imagine it needs to remux almost the entire movie (big size) if you start playback almost from the end.
IMO, those seeking problems were mostly due to poor implementation of seeking in the absence of timestamps. Timestamps can be fixed with
copyts. To fix seeking we shouldn't restart the transcoding job when the new time is within the current session.Not sure, maybe there were also problems with audio desync.
@jellyfin-bot commented on GitHub (Mar 11, 2024):
This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.
If you have any questions you can use one of several ways to contact us.
@jellyfin-bot commented on GitHub (Apr 1, 2024):
This issue was closed due to inactivity.