justinrh 260 Posted April 23, 2023 Posted April 23, 2023 Auto convert unsupported to DD downmix to stereo How is this understood if set to Auto? Does Auto consist of only the other two settings? If one of the other two are selected, then what happens? Is the downmix option an always, every audio track setting?
Solution ebr 16172 Posted April 23, 2023 Solution Posted April 23, 2023 Hi. Auto will attempt to direct play all audio by either passing it through (if supported) or decoding it locally in the app (if possible). The convert option will take multichannel formats that are not supported to pass through and convert them to DD 5.1 on the server. The downmix option will always downmix locally to stereo (this is best if you are just using TV speakers). 1
heffeque 78 Posted July 7, 2023 Posted July 7, 2023 On 4/24/2023 at 1:47 AM, ebr said: Hi. Auto will attempt to direct play all audio by either passing it through (if supported) or decoding it locally in the app (if possible). The convert option will take multichannel formats that are not supported to pass through and convert them to DD 5.1 on the server. The downmix option will always downmix locally to stereo (this is best if you are just using TV speakers). Hello, I'm forcing downmix to Stereo on a FireTV Cube 4K (2023) because it's currently connected to an ancient TV. All channels are working OK on the downmixing... except the subwoofer channel. I tested it with the "Dolby Atmos Amaze" trailer, and the subwoofer part is missing (especially noticeable when it says "Powerfull bass" @0:36 ) Subwoofer channel also missing in the stereo downmix when playing "DTS:X Out of the Box", and on speaker call-out videos with various formats. Surprisingly, sub channel is not missing in the stereo downmix on videos with lossless TrueHD audio. Amaze (Not OK) Format : E-AC-3 JOC Format/Info : Enhanced AC-3 with Joint Object Coding Commercial name : Dolby Digital Plus with Dolby Atmos Codec ID : ec-3 DTS:X (Not OK) Format : DTS XLL X Format/Info : Digital Theater Systems Commercial name : DTS-HD MA + DTS:X Codec ID : A_DTS Lossless (OK) Format : MLP FBA 16-ch Format/Info : Meridian Lossless Packing FBA with 16-channel presentation Commercial name : Dolby TrueHD with Dolby Atmos Codec ID : A_TRUEHD
ebr 16172 Posted July 7, 2023 Posted July 7, 2023 1 hour ago, heffeque said: I'm forcing downmix to Stereo Hi. There is no subwoofer channel in stereo. Just L/R.
heffeque 78 Posted July 7, 2023 Posted July 7, 2023 (edited) 3 hours ago, ebr said: Hi. There is no subwoofer channel in stereo. Just L/R. Correct. That's why we need the subwoofer channel to be downmixed into the L/R channels the same way the center, surround and height channels are downmixed into the L/R channels. I'm not sure why the sub channel is being excluded from the downmix. (Please re-read my previous comment with that in mind). Edit: I noticed that the subwoofer channel is also being discarded with the VLC app on the Fire Cube TV, which might give clues as to why this might be happening (maybe an issue with ffmpeg downmixing in general, since it's SW downmixing) Edited July 7, 2023 by heffeque
ebr 16172 Posted July 7, 2023 Posted July 7, 2023 1 hour ago, heffeque said: I noticed that the subwoofer channel is also being discarded How are you determining that?
heffeque 78 Posted July 7, 2023 Posted July 7, 2023 8 minutes ago, ebr said: How are you determining that? I first picked it up because bass in "Dolby Atmos Amaze" @0:36 is 100% missing. The only bass coming out comes from residual bass from other channels. Then I put speaker call-out videos and confirmed my suspicions: total silence during the bass "call-out".
ebr 16172 Posted July 7, 2023 Posted July 7, 2023 So, all you are really determining is a perceived lack of bass in the resulting mix-down. it is quite possible that some algorithms to mix 5.1 to stereo would ignore the sub channel or also possible that they would have a high-pass filter that would effectively do the same thing. The mixing is being done either by ffmpeg or the target device depending on exactly what signal is being sent. 1
justinrh 260 Posted July 7, 2023 Author Posted July 7, 2023 3 hours ago, heffeque said: I put speaker call-out videos and confirmed my suspicions: total silence during the bass "call-out". Where is such a video found? Sounds interesting.
rbjtech 5284 Posted July 8, 2023 Posted July 8, 2023 (edited) Yes - by default - if emby are just using the -ac 2 option - then the sub channel is omitted by the downmix. This is standard ffmpeg behaviour. https://trac.ffmpeg.org/wiki/AudioChannelManipulation#a5.1stereo It can be mixed in with a custom map - but being honest here, any downmix is likely needed because the Audio equipment cannot play 5.1 in the first place - so it is highly unlikely the speakers are capable of reproducing sub bass anyway. If you want the 'sub' channel - then my advice is to not downmix it in the first place - passthrough the audio though to the audio playback device and let it deal with it at source. btw - you can test out the theory by just creating a dedicated 'Stereo Mix - DD 2.0' track using ffmpeg directly - ffmpeg.exe -i "input.mkv" -map -0:t:? -map 0:v:0 -map 0:a:2 -map 0:a -c:v copy -c:a copy -c:a:0 ac3 -ac 2 -metadata:s:a:0 title="DTS HD to AC3 5.1 Downmix" -f matroska "output.mkv" This will insert a new audio track 0 as a Stereo downmix of audio track 2 (-map 0:a:2) - using the default -ac 2 command. Edited July 8, 2023 by rbjtech
heffeque 78 Posted July 29, 2023 Posted July 29, 2023 On 7/7/2023 at 10:48 PM, ebr said: So, all you are really determining is a perceived lack of bass in the resulting mix-down. it is quite possible that some algorithms to mix 5.1 to stereo would ignore the sub channel or also possible that they would have a high-pass filter that would effectively do the same thing. The mixing is being done either by ffmpeg or the target device depending on exactly what signal is being sent. It's as rbjtech says, the downmix is ignoring the subwoofer channel. It's easily identifiable using a channel check video. On 7/8/2023 at 1:06 AM, justinrh said: Where is such a video found? Sounds interesting. You can find some here: https://kodi.wiki/view/Samples#HD/object-based_Audio_Test_Clips "DTS-HD MA 5.1 Channel Check" and also "DTS-HD MA 7.1 'Dredd' Audio Channel Check" are very intuitive. On 7/8/2023 at 12:09 PM, rbjtech said: Yes - by default - if emby are just using the -ac 2 option - then the sub channel is omitted by the downmix. This is standard ffmpeg behaviour. https://trac.ffmpeg.org/wiki/AudioChannelManipulation#a5.1stereo It can be mixed in with a custom map - but being honest here, any downmix is likely needed because the Audio equipment cannot play 5.1 in the first place - so it is highly unlikely the speakers are capable of reproducing sub bass anyway. If you want the 'sub' channel - then my advice is to not downmix it in the first place - passthrough the audio though to the audio playback device and let it deal with it at source. btw - you can test out the theory by just creating a dedicated 'Stereo Mix - DD 2.0' track using ffmpeg directly - ffmpeg.exe -i "input.mkv" -map -0:t:? -map 0:v:0 -map 0:a:2 -map 0:a -c:v copy -c:a copy -c:a:0 ac3 -ac 2 -metadata:s:a:0 title="DTS HD to AC3 5.1 Downmix" -f matroska "output.mkv" This will insert a new audio track 0 as a Stereo downmix of audio track 2 (-map 0:a:2) - using the default -ac 2 command. Hello rbjtech, thanks for all the info, and sorry for the delay on the response. In this case the TV is old (so no passthrough possible), but the audio equipment is a 2.1 speaker system that's connected to the TV via optic cable. The speaker system is definitely more than capable of reproducing decent sub bass. Would there be a way to modify the standard ffmpeg behaviour to actually include the the sub channel into the 2.0 downmix? @ebrMaybe Emby can add an option/setting to downmix without excluding the sub channel? This not only would be nice for people that can't use passthrough but have decent speakers that can take advantage of the bass, but also it would be nice for people with decent headphones, where sub channel would also be appreciated.
rbjtech 5284 Posted July 30, 2023 Posted July 30, 2023 7 hours ago, heffeque said: Would there be a way to modify the standard ffmpeg behaviour to actually include the the sub channel into the 2.0 downmix? Not easily no. You can substitute ffmpeg values if the file is being transcoded (allowing us to remap/remix the audio - replacing -AC 2 with FL+FR+LFE), but I believe the decoding is actually done client side in this instance. The only other option is to simply add a 2.1 mix into the source files using a simple ffmpeg script and make that track the new default.
pwhodges 2012 Posted July 30, 2023 Posted July 30, 2023 Remember that if used correctly the subchannel only contains special effects. The full bass of the other channels remains in them in the file. It is the receiver which may extract bass from the channels and send it to the sub if the channels are known to have a restricted frequency range (should be a setting for this). Of course, conversely the receiver should take sub channel info (like the centre channel) into the other speakers if no sub is available (also a setting), which I guess is the behaviour being looked for here. Paul
heffeque 78 Posted July 30, 2023 Posted July 30, 2023 (edited) 2 hours ago, rbjtech said: Not easily no. You can substitute ffmpeg values if the file is being transcoded (allowing us to remap/remix the audio - replacing -AC 2 with FL+FR+LFE), but I believe the decoding is actually done client side in this instance. The only other option is to simply add a 2.1 mix into the source files using a simple ffmpeg script and make that track the new default. Yup, most sources have direct playback with the Fire TV Cube, so the 2.0 downmix is being done on client side. Current behaviour (as per what you documented) is that it's doing downmix from 5.0/7.0 to 2.0, even if the source is 5.1/7.1... The idea is to downmix from 5.1/7.1 to 2.0. No need for 2.1 whatsoever. My syster's TV is the only one that would need this manual audio recoding of all videos... so not really worth it. I guess she'll have to live without the sub channel (unless ebr puts a "do not exclude sub channel on 2.0 downmix" option/setting on the to-do list). 1 hour ago, pwhodges said: Remember that if used correctly the subchannel only contains special effects. The full bass of the other channels remains in them in the file. It is the receiver which may extract bass from the channels and send it to the sub if the channels are known to have a restricted frequency range (should be a setting for this). Of course, conversely the receiver should take sub channel info (like the centre channel) into the other speakers if no sub is available (also a setting), which I guess is the behaviour being looked for here. Paul Yup, I did notice that bass is more than present, but on specific scenes it was missing, which was a bummer, since it was generally missing on explosions on action scenes, which is where you need deep bass the most! (It's like... welp, that explosion was underwhelming... ) Yeah, the behavior that is being searched for here is that bass channel that's present in "X.1" audio shouldn't be taken out of the downmix to 2.0. The receiving audio system will split the 2.0 into 2.1 by itself. (Or some people might have 2.0 with deep bass capabilities, be it speakers, or headphones, so they will also benefit from having this option/setting available). So if an "X.1" track is available, have an option/setting to downmix "X.1 to 2.0" (instead of the current "X.0 to 2.0"). Let's see what ebr says... Edited July 30, 2023 by heffeque 1
rbjtech 5284 Posted July 30, 2023 Posted July 30, 2023 (edited) 3 hours ago, heffeque said: Yup, most sources have direct playback with the Fire TV Cube, so the 2.0 downmix is being done on client side. Current behaviour (as per what you documented) is that it's doing downmix from 5.0/7.0 to 2.0, even if the source is 5.1/7.1... The idea is to downmix from 5.1/7.1 to 2.0. No need for 2.1 whatsoever. My syster's TV is the only one that would need this manual audio recoding of all videos... so not really worth it. I guess she'll have to live without the sub channel (unless ebr puts a "do not exclude sub channel on 2.0 downmix" option/setting on the to-do list). Yup, I did notice that bass is more than present, but on specific scenes it was missing, which was a bummer, since it was generally missing on explosions on action scenes, which is where you need deep bass the most! (It's like... welp, that explosion was underwhelming... ) Yeah, the behavior that is being searched for here is that bass channel that's present in "X.1" audio shouldn't be taken out of the downmix to 2.0. The receiving audio system will split the 2.0 into 2.1 by itself. (Or some people might have 2.0 with deep bass capabilities, be it speakers, or headphones, so they will also benefit from having this option/setting available). So if an "X.1" track is available, have an option/setting to downmix "X.1 to 2.0" (instead of the current "X.0 to 2.0"). Let's see what ebr says... It may be simply because the dynamic range of any speakers typically used for LR (especially on a TV) cannot reproduce LFE anyway - so rather than attempt (and probably distort) the resulting sound - ffmpeg simply remove it and this is probably the correct thing to do imo - leaving the standard bass in the LR channel. For a 2.1 - then yes, this is obviously a discreet LFE channel. As I said, you 'can' mix it in if you want to compare (ie mix all 5.1 and 7.1 channels to 2.0) - but I would be personally be surprised if it sounded any different at all on typical TV speakers. Edited July 30, 2023 by rbjtech
heffeque 78 Posted July 30, 2023 Posted July 30, 2023 28 minutes ago, rbjtech said: It may be simply because the dynamic range of any speakers typically used for LR (especially on a TV) cannot reproduce LFE anyway - so rather than attempt (and probably distort) the resulting sound - ffmpeg simply remove it and this is probably the correct thing to do imo - leaving the standard bass in the LR channel. For a 2.1 - then yes, this is obviously a discreet LFE channel. As I said, you 'can' mix it in if you want to compare (ie mix all 5.1 and 7.1 channels to 2.0) - but I would be personally be surprised if it sounded any different at all on typical TV speakers. Sorry to be a bit rude but... you haven't seemed to have read my comment (or maybe diagonally). I explicitly comment several times what would be the use-cases of having 5.1 to 2.0 instead of 5.0 to 2.0, and "typical TV speakers" was definitely not one of those use-cases. Also no interest whatsoever on 5.1 to 2.1 output, as a speaker system that cannot process 5.1 input also cannot process 2.1 input. Please re-read previous comment entirely, as there's a ton of explanation given PS: The "but I would be personally be surprised if it sounded any different at all on typical TV speakers" part... was basically for skimming through my comment, but you got the "As I said, you 'can' mix it in if you want to compare (ie mix all 5.1 and 7.1 channels to 2.0)" right, and that's why I'm asking ebr to add the option/setting to the client, as there are use-cases where it would be greatly appreciated.
ebr 16172 Posted July 30, 2023 Posted July 30, 2023 8 hours ago, heffeque said: that's why I'm asking ebr to add the option/setting to the client, as there are use-cases where it would be greatly appreciated. Hi. I'm afraid it isn't quite as simple as just adding an option. ffmpeg is handling this decoding. It would likely require changes there.
heffeque 78 Posted July 30, 2023 Posted July 30, 2023 8 minutes ago, ebr said: Hi. I'm afraid it isn't quite as simple as just adding an option. ffmpeg is handling this decoding. It would likely require changes there. Changes on the "ffmpeg options" when the setting is enabled is what would be nice, yes. I'm assuming that it would require studying what is needed, and with that info, seeing if the developing time is worth it or not.
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