njmckenzie96 6 Posted December 12, 2025 Posted December 12, 2025 Wondering if there could be a way for emby to select track 2 in a movie file if the server recognizes that it's transcoding the audio. For me, all my movies have DTS or TrueHD as the first option, and the second option is eac3 or ac3 for more compatibility. When off my network, it would be cool for emby to auto load track 2 as I'm most likely not using a tv with a good Soundsystem or on a phone (would be helpful for family members outside my network so that don't have to select anything). I realize it is maybe a small use case and would require a toggle as many users might not want it, or don't have their libraries setup with 2 versions of audio. But for me, I put the work in to have two audio versions so it would be awesome if the server could auto select the 2nd track.
ebr 16817 Posted December 12, 2025 Posted December 12, 2025 Hi. If transcoding, the audio will be converted to AAC or DD anyway.
njmckenzie96 6 Posted December 12, 2025 Author Posted December 12, 2025 (edited) Well yes, but sometimes the video stream is fine right? But it has to convert audio, or it just brings the Mbps down on the video but leaves the audio. Edited December 12, 2025 by njmckenzie96
Luke 43155 Posted December 13, 2025 Posted December 13, 2025 Hi, we actually already do what you're asking, assuming all other factors are equals. What I mean by that is, your user audio preferences come first. That is the criteria that is used to determine which track to play. But if two tracks are determined to be equally eligible, then it looks at which one might be able to direct play as a secondary criteria. Does that answer your question?
njmckenzie96 6 Posted December 13, 2025 Author Posted December 13, 2025 Okay thanks for the reply. I'll mess around with it more then!
Luke 43155 Posted December 14, 2025 Posted December 14, 2025 I would start by configuring your user audio preferences. Please let us know what you find. Thanks.
njmckenzie96 6 Posted 6 hours ago Author Posted 6 hours ago So I've been testing this a lot the past few months and so far here are my findings. On iOS and android apps, if both audio tracks are set to default in the mkv container, the apps select the secondary track IF the 1st track is TRUHD. If the 1st track is DTS OR DTS MA, Emby selects those and transcodes the audio even though there is a secondary track that is compatible. Today, I had a family member test playing a movie remote on their Roku. The movie played direct, and both audio files were set to default (trueHD, and Eac3),. Since Roku can't decode trued, Emby transcoded the audio without trying to switch to the second track that was compatible. I had the family member manually select the 2nd track and it played perfectly. Is there a way you could work on this behavior or anything I should try? I've scoured through all their settings and everything is set, at least from my understanding, for the movie and audio to try to play direct, and it does play direct if they select the 2nd compatible track. I've tested all this on my home setup but my chromecasts are plugged into receivers that are able to pass/unpack truehd/dts without needing anything transcoded. The goal in all this is ease for the users who don't know about these settings. I realize I could flip which default track is at the top in the container, but then that means I have to change the audio settings on my home network when my family watches movies. So, if it's possible to work that would be awesome! Thanks for all the continued support and features on Emby!
visproduction 374 Posted 4 hours ago Posted 4 hours ago (edited) NJ, Not sure if this helps. You can try switching the audio file so the EC3 or AAC is the first choice and DTS is the second audio. This can be done with MKVToolNix or ffmpeg, which probably could do multiple files at once using a command script. Since this is not a transcoding task, it should take around 1 minute pre media on an average speed server with a 2 hour 1080P file. After doing that, most users will get the audio that works best for them first. The alternate audio is available on the media page in the pull down, for those users with everything working for higher end audio. The best designed automatic solution can fail when there is a change in connection speed from Internet traffic so the first handshake test by the Emby server, sees any audio or video issue and starts transcoding anyway to AAC. This can happen on a weekend because of heavy Internet traffic issues and not be a problem mid-week. So any automatic feature would still flip back and forth. Making AAC the first audio choice is a good idea, but that may mean transcoding and adding a new AAC audio track, which is more work. I believe AAC is better for streaming delivery because EC3 always requires more overhead processing by the user to playback. Depending on the user's setup, this can maybe get in the way of processing TCP packets and cause stuttering. The Emby server, I believe will often transcode EC3 anyway to AAC which, I think, forces a video transcode. So, even the best automatic solution will continue to cause issues. Having AAC audio, first choice, is more dependable. Any automaticfeature would also run into comment auio tracks which are typicaly AAC or AC3 stereo. You really don't want commen tracks automatically chosen. If you left the media with all the audio tracks attached an automatic solution can run into this issue, where my idea to prep your media with your preferred track in audio 1, won't have this probem. If the user wants higher end, they can pick EC3, DTS or True Audio. I think Emby remembers the audio choice per media, maybe even there is a way to pick an audio type by each user. That leave the issue you metnion above. Can Emby find audio track 2 DTS and choose it for a particular user? I think admin of a lbrary collection needs to prep the media to work best for the users. Every profesional site streaming media does this type of prep with scripts that set audio preferences and transcodes video to what works best for users. Typical online site has the HD level user have access to pick higher end resolutions and audio. Automatic features, trying to match users exactly to media preferences, from media that has every audio mixed in, is never going to work 100% of the time. Professional online sites would, I think, refuse to code an all automated feature and choose instead to prep the media, with best choice in audio track 1.. Anyway, hope that makes sense. Edited 4 hours ago by visproduction
Luke 43155 Posted 1 hour ago Posted 1 hour ago 4 hours ago, njmckenzie96 said: Emby selects those and transcodes the audio even though there is a secondary track that is compatible. HI there, can you please provide a specific example? How to Report a Problem Thanks !
njmckenzie96 6 Posted 39 minutes ago Author Posted 39 minutes ago Here's the log from the session where the Roku won't select the second track thats compatible, but instead Emby decides to transcode the audio. ffmpeg-remux-939dd66b-2f60-4892-ba78-2809dfdd7da7_1.txt
Luke 43155 Posted 33 minutes ago Posted 33 minutes ago The track is compatible, but with the Roku video player, there is no way to tell it to play a secondary track. So in this example, even if you manually select the second track, you will still get a server-side remuxing process to make the second track the first track. 1
Luke 43155 Posted 31 minutes ago Posted 31 minutes ago but also, how are the emby user audio settings configured?
njmckenzie96 6 Posted 18 minutes ago Author Posted 18 minutes ago If you mean in their profile server side, audio is set to auto, no bandwidth restrictions on the user. Or do you mean in the Roku Emby all specifically?
Luke 43155 Posted 14 minutes ago Posted 14 minutes ago Quote If you mean in their profile server side Can you please show a screenshot? Thanks.
Luke 43155 Posted 5 minutes ago Posted 5 minutes ago They've selected "play default audio track regardless of language" - so you are getting the track that you asked for. This is what I previously went over in my Dec 13 response. Additionally, if they enable remembering previously selected audio tracks, that will also impact this.
njmckenzie96 6 Posted just now Author Posted just now But didn’t you just say Roku app can’t play the second anyways? So why is this relevant? I get it for other devices.
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