Avoiding transcoding ... - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Support (https://forum.jellyfin.org/f-support) +--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions) +--- Thread: Avoiding transcoding ... (/t-avoiding-transcoding) |
Avoiding transcoding ... - jellyfin - 2025-01-13 I am quite happy with my Jellyfin server, but I noticed that all my DVD and BluRay rips (makemkv) get transcoded by Jellyfin. This is something that should ideally be avoided. From https://jellyfin.org/docs/general/clients/codec-support/ I got the impression that H264 8-Bit should be the most compatible video codec, esp. for Jellyfin clients or playing over a web browser. This should allow for DirectPlay on most clients, if I read correctly. I would need to stay at "mkv" containers, because of multiple audio and subtitle tracks. Currently, I struggle with the audio codec to be used. IIRC, DTS often cannot be used over DirectPlay and I read that AAC and AC3 are the most compatible. I read that AAC is more modern and supports high-quality audio, but for my goals, AC3 seems to be the way to go, being more compatible. But the above link shows that AAC is more compatible. So what should I use to avoid transcoding? And finally, what to do with the bitrate? I often see such audio tracks: DTS 5.1ch 768 kpps DTS 5.1ch 1536 kbps Convert to AC3 5.1ch 48k and WHAT bitrate? Somewhere, I read that 448 should be used. I sometimes see DTS-HD MA which is uncompressed audio, IIRC. That should be skipped for the goal of saving space and avoiding transcoding. RE: Avoiding transcoding ... - TheDreadPirate - 2025-01-13 Codec support varies greatly between clients and devices. And for audio some devices have a maximum number of channels they support. I'm assuming the audio is what is getting transcoded most of the time. I also wouldn't be surprised if the DVDs are also getting transcoded as many new devices don't support MPEG2 anymore. We'd need to see your ffmpeg logs to figure out what is getting transcoded. RE: Avoiding transcoding ... - jellyfin - 2025-01-13 (2025-01-13, 08:05 PM)TheDreadPirate Wrote: Codec support varies greatly between clients and devices. And for audio some devices have a maximum number of channels they support. I'm assuming the audio is what is getting transcoded most of the time. I also wouldn't be surprised if the DVDs are also getting transcoded as many new devices don't support MPEG2 anymore. The DVDs are just ripped with makemkv, so they are not H264. I need to re-encode them to avoid that, from what I read at https://jellyfin.org/docs/general/clients/codec-support My question above was about the audio codec - do you probably have a hint for me? AC3? AAC? Some say AC3 is most compatible and best to avoid transcoding, but the above link says AAC is better. At what bitrates, coming from DTS 5.1ch 768 or 1536 kbps? Any recommendation? Many thanks! RE: Avoiding transcoding ... - jellyfin - 2025-01-13 The Jellyfin client on iPadOS seems to transcode even AC3 to AAC. The "Direct Streaming Info" shows "Audio codec: AAC", regardless if the track was AAC, AC3 or DTS. So that should answer my question, it seems. I should use AAC to avoid any transcoding. RE: Avoiding transcoding ... - bitmap - 2025-01-13 Honestly, either is likely fine. They're both established codecs. If you want the best quality, avoid re-encoding lossy formats (this is why DTS-HD MA, FLAC, TrueHD, and other lossless codecs exist). If you need to increase compatibility and don't mind the artifacting, clipping, or other loss of quality, pick what user clients support. I would venture 768 kbps is more than enough. If you look at Opus, for example, around 160 kbps provides transparency in stereo audio -- double that for 5.1 and it's still great. Something like AAC I would want more like 256 kbps minimum for stereo and maybe 512 kbps for surround. These are all subjective, though. They depend highly on your hearing ability (mine is quite damaged), client and personal setups (e.g., home theater system, sound bar, TV speakers), and client devices (e.g., Roku, Firestick, Jellyfin Media Player, web). (2025-01-13, 08:33 PM)jellyfin Wrote: The Jellyfin client on iPadOS seems to transcode even AC3 to AAC. So this is likely audio transcoding and remuxing. Not a big deal and does not trigger video transcoding, which is what you should be most worried about. Also forgot in my last post, make sure the audio is 5.1 channels or less (i.e., 5.1, stereo, dual/single mono). RE: Avoiding transcoding ... - TheDreadPirate - 2025-01-13 AAC is the most compatible codec you can use. The bit rate should be 64Kbps PER CHANNEL. 2 channel = 128Kbps. 6 channels (5.1) = 384Kbps. And so on. RE: Avoiding transcoding ... - jellyfin - 2025-01-13 Great many thanks. @bitmap and @TheDreadPirate! I created a test file with a single AAC track (and H264) to check if this avoid transcoding. But ffmpeg still get's executed: Code: [2025-01-13 22:00:48.894 +01:00] [INF] [90] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "user". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True And I still see LOTS of files below ~/Library/Application\ Support/jellyfin/cache/transcodes: Code: -rw-r--r--@ 1 tja staff 1361 Jan 13 22:00 0594744946fabc12f84ceea5ee1051df-1.mp4 So this does not avoid transcoding. I will test again with disabling transcoding for the user. RE: Avoiding transcoding ... - jellyfin - 2025-01-13 I can neither disable audio nor video transcoding. When I try, the video cannot get played anymore! "Playback failed because the media is not supported by this client" (from the Jellyfin iPadOS client) This needs more time and tests, I fear. EDIT: I noticed that my AAC audio has a bitrate of 320 instead of 448 which I set Handbrake to. Maybe this plays part in why the file still get's transcoded. I will repeat with 320 instead of 448, even as I don't understand why not 448 got used (from the original DTS 768 track). RE: Avoiding transcoding ... - TheDreadPirate - 2025-01-13 How many channels are in the original audio? RE: Avoiding transcoding ... - jellyfin - 2025-01-13 (2025-01-13, 09:16 PM)TheDreadPirate Wrote: How many channels are in the original audio? The original tracks are DTS 5.1ch 768 kbps and DTS 5.1ch 1536 kbps For the test I used the "DTS 5.1ch 768 kbps" and converted to AAC 5.1ch sample rate 48 and bitrate 448, but Jellyfin says that the file only has 320 instead of 448. EDIT: I am creating a new test, using only a AAC stereo track EDIT 2: Not even this get's play when transcoding is disabled. I give up for today |