seashell 42 Posted December 29, 2023 Posted December 29, 2023 I'm new to emby and I'm not even sure which of the 10000 sections to post this in. Feel free to move it to someplace appropriate. Is emby only capable of using AC3 when transcoding? There are almost no settings in the transcode section to give a hint if that's the case. Playback hardware is good up to DTS-X (MA, etc.) / TrueHD Atmos, but anytime a transcode is triggered for any reason audio gets dumped to AC3. Doesn't matter if it's the video or the container. Whether it gives a real reason or the oh so helpful "Direct play error". It always downgrades audio to AC3.
Abobader 3464 Posted December 29, 2023 Posted December 29, 2023 Hello seashell, ** This is an auto reply ** Please wait for someone from staff support or our members to reply to you. It's recommended to provide more info, as it explain in this thread: Thank you. Emby Team
Luke 42080 Posted December 29, 2023 Posted December 29, 2023 Hi, the answer is it depends on what you're playing and what transcoding method is being used. Can we please look at an example? How to Report a Problem Thanks.
seashell 42 Posted December 29, 2023 Author Posted December 29, 2023 Sure, here's presumably the relevant portion of the log. ffmpeg-remux-e1139944-f908-4566-8e71-9ae6acf7558e_1.txt
rbjtech 5284 Posted December 29, 2023 Posted December 29, 2023 For multi-channel sound, then AC3 @ 384 kb/s is used as it's the de-facto standard that 100% of media players/devices can play without issues - ie the original Dolby Digital 5.1 specification. If it's Stereo only, then Emby may even resort to MP3 as again, this is the most compatible codec - especially in browsers. There may be a case for giving the users the option to use something a bit more modern - such as EAC3. You can actually force this by using the Diagnostic Options and replace the AC3 option in the ffmpeg command to use EAC3 instead.
Luke 42080 Posted December 29, 2023 Posted December 29, 2023 What codec would you rather have used instead?
rbjtech 5284 Posted December 29, 2023 Posted December 29, 2023 7 minutes ago, Luke said: What codec would you rather have used instead? The option to use a higher bitrate AC3 (up to 448 or even 640 kb/sec) might be a nice transcoding option. My understanding is the ffmpeg EAC3 encoder is not on par quality wise with their AC3 encoder - thus moving to EAC3 does not necessarily increase the audio quality at the same bitrate (and obviously lowers the compatibility) - so personally, I think giving users options of which codec to use (EAC3/AAC etc) will just lead to more support calls ...
seashell 42 Posted December 29, 2023 Author Posted December 29, 2023 Since the device can play the full audio stream my preference would have be remuxing the audio stream unconverted. I'm pretty sure it's container problems (.ts / .mkv) and Dolby Vision (7 bl+(mel or fel)+rpu) that's causing the transcode requirements, not the audio. Yet the conversion is remuxing the HDR10 base layer and really compressing the audio. Where are these diagnostic tools? Can I tell emby to remux rather than transcode the audio?
Luke 42080 Posted December 29, 2023 Posted December 29, 2023 22 minutes ago, seashell said: Since the device can play the full audio stream my preference would have be remuxing the audio stream unconverted. I'm pretty sure it's container problems (.ts / .mkv) and Dolby Vision (7 bl+(mel or fel)+rpu) that's causing the transcode requirements, not the audio. Yet the conversion is remuxing the HDR10 base layer and really compressing the audio. Where are these diagnostic tools? Can I tell emby to remux rather than transcode the audio? When a conversion is needed, we use the HLS streaming protocol, and you can't put DTS in that. That's why you get ac3.
seashell 42 Posted December 29, 2023 Author Posted December 29, 2023 Thanks. That answers the original question then. Emby can only do AC3 when transcoding. At least knowing that I can not waste time doing tests or looking for settings to preserve the audio.
rbjtech 5284 Posted December 29, 2023 Posted December 29, 2023 1 hour ago, seashell said: Since the device can play the full audio stream my preference would have be remuxing the audio stream unconverted. I'm pretty sure it's container problems (.ts / .mkv) and Dolby Vision (7 bl+(mel or fel)+rpu) that's causing the transcode requirements, not the audio. Yet the conversion is remuxing the HDR10 base layer and really compressing the audio. Where are these diagnostic tools? Can I tell emby to remux rather than transcode the audio? So the real question is why is it transcoding ? What is the playback device ? Emby is perfectly capable of playing back DV7 single layer on an Nvidia Shield - but it's one of the few devices that can. DV5 and DV8 are more compatible with other devices such as FireTV's etc.
seashell 42 Posted December 29, 2023 Author Posted December 29, 2023 Test playback devices for this file are an nvidia shield running the emby app (which is what the log is from) and a Sony x800m2 via dlna which plays the file without transcoding with emby serving. I'm new to all of this, so I'm not 100% confident on the naming scheme of layers, tracks, and streams in the various containers but I believe this is a dual layer MPEG-TS container. And yes, the x800m2 gives me a way to play this file without issue, I'm just currently exploring the tradeoffs of various containers, players, servers, apps etc. to see what does what and what ends up being the best compromise. Video #1 ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2086, HDR10 compatible Codec ID : 36 Duration : 1 h 54 min Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0050 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 600 cd/m2 Maximum Frame-Average Light Level : 487 cd/m2 Video #2 ID : 4117 (0x1015) Menu ID : 1 (0x1) Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : Dolby Vision, Version 1.0, dvhe.07.06 , EL+RPU, Blu-ray compatible / SMPTE ST 2086, HDR10 compatible Codec ID : 6 Duration : 1 h 54 min Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0050 cd/m2, max: 1000 cd/m2 1
rbjtech 5284 Posted December 30, 2023 Posted December 30, 2023 ok - so yes, this is an original TS container - with the dual layer video tracks. To get it to work with DV (on any player, not just emby) - you need to combine the HDR10 and DV tracks into a single track. The easiest way to do this, is to just run the .TS/M2TS file through makemkv (a free app). Then you will have an MKV file that contains just a single video track - but it will have both HDR10 and DV7. Your shield will play this (as DV, assuming you have a DV capable TV..) without any issues, other non DV devices will play it as HDR10 - or transcode it to SDR via tonemapping if not 4K etc It's also worth noting there are two emby apps for the shield - one is for Android TV (the one you get from the store) and another just for Android (non-TV) that currently needs to be sideloaded. The Android TV one 100% works with all flavours of DV as I've used it myself for years - the other one (the 'new' one which Luke is pushing hard) I cannot vouch for as I have not used it beyond a few isolated tests. For maximum compatibility - it is probably best to convert the DV7/HDR10 to DV8/HDR10 - but that's for another thread ... I hope that helps. 1
seashell 42 Posted December 30, 2023 Author Posted December 30, 2023 Thanks for the reply, but I'm actually not trying to trigger DV on the shield. It's stored this way for playback on the x800m2 in DV with proper processing of the FEL. (By chance this particular example is a movie on the list of ones that look worse if the DV is improperly processed by players like the shield that ignore the FEL, but like DV8 conversion off topic for this thread.) So if emby did the "right" thing it would take the first HDR10 video track and the DTS-HD audio stream and remux them and send it to the shield in whatever container. It does the video part fine but unfortunately decides to convert the uncompressed 7.1 stream to compressed 5.1 AC3. Luke says it has to do with the HLS streaming protocol they choose when doing a conversion. I read that as answering my original question as yes emby cannot handle HD audio when transcoding and probably not when remuxing either. I've seen this with a few other test cases as well which is why I asked my question. Now I don't understand why emby made this choice given it would probably stream the HDR10 video and HD audio correctly if I had a file specifically with that combo around, or had this stored as single track DV like you suggested, but it is what it is I guess. At least emby will stream these .ts files to the x800m2 over DLNA. I've tried a few other media servers that can't even do that as they oddly change the metadata of the .ts files to something the x800m2 thinks it can't play. All in all I've found media streaming to be surprisingly fragile and frustrating.
ebr 16185 Posted December 30, 2023 Posted December 30, 2023 4 hours ago, seashell said: Now I don't understand why emby made this choice given it would probably stream the HDR10 video and HD audio correctly if I had a file specifically with that combo around, or had this stored as single track DV like you suggested Yes it would but the reason lies in the fact that there is a very large technical difference between sending a complete, finished and indexed file to a player and sending it what amounts to a live stream (because it is being converted on the fly). Different protocols must be used for things to work properly.
rbjtech 5284 Posted December 30, 2023 Posted December 30, 2023 5 hours ago, seashell said: All in all I've found media streaming to be surprisingly fragile and frustrating. I think if you settle on the most compatible formats - such as DV8, EAC3 Audio (with HD Tracks 'available' but not default for direct play devices, such as the Shield) and the MKV container - then I direct play 99.9% of my content - emby rarely has to transcode for me.
seashell 42 Posted December 30, 2023 Author Posted December 30, 2023 42 minutes ago, ebr said: Yes it would but the reason lies in the fact that there is a very large technical difference between sending a complete, finished and indexed file to a player and sending it what amounts to a live stream (because it is being converted on the fly). Different protocols must be used for things to work properly. Fair enough. 29 minutes ago, rbjtech said: I think if you settle on the most compatible formats - such as DV8, EAC3 Audio (with HD Tracks 'available' but not default for direct play devices, such as the Shield) and the MKV container - then I direct play 99.9% of my content - emby rarely has to transcode for me. Thanks, I'll keep that in mind. It's not just the transcoding though. I'm still not sure why 2 of 4 DLNA servers wouldn't present the ts or m2ts files to the x800m2 when the others would. One even using a supposed specific to the x800m2 profile. It didn't work with a generic profile either. I've currently landed on emby as it seems the least broken, but when it kept playing me the wrong file via the web interface from some extras off a blu ray I got pretty frustrated with it as well. And that's not even considering the whole DV mess. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now