Jellyfin Forum
Why is transcoding happening for HEVC->H264 files in chrome? - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Why is transcoding happening for HEVC->H264 files in chrome? (/t-why-is-transcoding-happening-for-hevc-h264-files-in-chrome)



Why is transcoding happening for HEVC->H264 files in chrome? - __WhoAmI__ - 2023-08-21

Hi, 

I don't understand Jellyfins behaviour. 
And dont understand if this is a bug, or by design. 

I have a 4K HEVC/HDR10 mkv file with AC3 5.1 soundtrack. 
In this instance I use Chrome 115(64bit) web player for playback. 

1) If I disable video transcoding, enable audio transcoding = Video playback Direct Play Ok, No Audio
2) If I enable video transcoding, enable audio transcoding = Video playback Transcoding to H264 Ok, Audio playback transcoded to AAC
3)  If I disable video transcoding, disable audio transcoding = No playback in browser

- 1*) I do not understand this behaviour at all. Why is audio transcoding not working in 1? Surely chrome does not know how to playback AC3 5.1.
- 2*) Why is it transcoding HEVC->H264, when chrome can playback HEVC as seen from 1). 
- 3*) This makes good sense.


RE: Why is transcoding happening for HEVC->H264 files in chrome? - Venson - 2023-08-21

Hey @__WhoAmI__

Playback of 5.1 sound is a bit troublesome, do you actually have a supported 5.1 audio system attached to your browser? Because According to the documentation a remux is required to ensure correct playback:
https://jellyfin.org/docs/general/clients/codec-support#wikipedias-audio-codec-tables
https://en.wikipedia.org/wiki/Comparison_of_video_container_formats#Audio_coding_formats_support

Yes chrome _can_ playback hevc however there are multiple reasons why it choses not to, hevc playback is pretty new to chrome. Could you please post a logfile from when you tried to playback those media and upload it to an external site like pastebin? You might want to omit some personal infos like, Ips/Domains/Usernames.


RE: Why is transcoding happening for HEVC->H264 files in chrome? - __WhoAmI__ - 2023-08-22

Hi,

I will try to upload a sample when possible.

However the questions i pose, still does not make any sense in regard to the behaviour.
Why will it not transcode AC3 into AAC for 1) but still play back HEVC natively?
This would be the absolutely most wanted behaviour, as it would allow direct stream of video, and only transcode audio.
But it does not transcode the audio. Only when I allow transcoding of video, will it then transcode VIDEO AND AUDIO.


RE: Why is transcoding happening for HEVC->H264 files in chrome? - TheDreadPirate - 2023-08-22

I've found that a lot of the issues users have are related to transcoding. More specifically, trying to force direct play or trying to force transcoding in certain ways.

Jellyfin will always try to direct play. And when it does transcode, it will use the best codecs that the client supports.

I have yet to see a user successfully "force" Jellyfin to transcode in the way they wanted.


RE: Why is transcoding happening for HEVC->H264 files in chrome? - __WhoAmI__ - 2023-08-24

Is there anywhere where one can try to understand the behaviour of where this is defined in jellyfin?

I don't understand it, and it makes no sense to me, as listed in the OP.

Surely something is set wrong in the decision making process.


RE: Why is transcoding happening for HEVC->H264 files in chrome? - Venson - 2023-08-24

The decision when and where to transcode is done in the client. You can check the github repro to look for that.


RE: Why is transcoding happening for HEVC->H264 files in chrome? - Efficient_Good_5784 - 2023-08-24

Can you take a screenshot of your client's playback info? Are you sure with option 1 that the file is direct playing?

I'm guessing that it's not direct playing, but that it states that the video stream itself is "direct" or unmodified. Then something else is happening where your audio is getting messed up as it tries to transcode it.
And both are remuxed and sent to your client.

At this time, Chrome can direct play HEVC files, but doesn't support MKV files. Try remuxing the file that you want to test into a MP4 file. Maybe that will help here.