Jump to content

Force transmuxing for saving bandwidth with multiple audio tracks


Kubadzi

Recommended Posts

Kubadzi

Hello,

I've been testing Emby for some time and I really like it, but I think it could benefit from one option.

I personaly keep my files with multiple audio tracks - usually 5.1 original language track, my 1st language local track and sometimes some additional ones, such as commentaries or "night mode" stereo downmixes. I've noticed that when file is "Direct Playing" the bandwidth required is a sum of bitrates of all streams in an MKV file.

So let's say there is an 8 Mbps video stream plus one lossless 3.5 Mbps track, one dubbed 1.5 Mbps track and let's say 192 Kbps stereo downmix. The total bandwidth required to stream such file is around 13 Mbps. So, if client chooses the downmix or the dubbed track, he is using quite a bit of bandwidth for nothing. When streaming locally it's not a problem, but when using remote access sometimes every Mbps matters plus some people might have limited internet plans with data caps.

So my idea is to add an optional feature to force transmuxing ("Direct Stream") - nothing would be re-encoded (so no quality loss and no significant load on server) -  the file would be demuxed and then muxed only with selected tracks. So now, lets say client chooses 192kbps downmix track, he would only need 8.2 mbps of bandwidth instead of 13 Mbps and wouldn't download unnecessary gigabytes.

This would also help avoid transcoding, especially when one likes to keep lossless tracks, as they usually have high bitrates.

Regards

Edited by Kubadzi
Link to comment
Share on other sites

Hi, can't you already accomplish using the quality setting? Using your example, if the quality setting were set to 12 mbps, you'd most likely get exactly what you're asking for, meaning, original video + single audio track.

Link to comment
Share on other sites

Kubadzi

Thanks for answer
I've just checked and it seems that Emby assumes the bitrate of video to be the same as bitrate of a whole MKV file. I have this one file with multiple audio tracks which is good for testing this.
As you can see in Mediainfo, video bitrate 1Mbps but since there is a lot of audio tracks, overall bitrate is around 6Mbps:
image.jpeg.31dc3a9dfc33ec4a346e0fd962a8acff.jpeg
But Emby shows video bitrate as 6Mbps:
image.jpeg.28e0d8b8032b527b5481b7e48fa6db00.jpeg

Which leads to transcoding when I select "720p - 3 Mbps" option (even through video bitrate is 1Mbps and audio 448Kbps, so it would only use 1,5Mbps if transmuxed):
image.png.76b9009a3c83fad2538bdf2ae94b06ec.png

So you maybe this feature already exist (by choosing quality setting) but Emby would have to change the way it calcluates bitrate of each stream for it to work properly.

Link to comment
Share on other sites

Hi, no, Emby doesn't assume that, but occasionally, for some videos, ffprobe reports it that way.

 

Link to comment
Share on other sites

Kubadzi

I've looked around my library and seems that it's reporting it this way for most MKV files - video stream bitrate is the overall container bitrate. I haven't tested MP4. Could that possibly be fixed? Maybe ffprobe has some commands to analyze video bitrate. If not, is there any way to modify this metadata manualy?

Link to comment
Share on other sites

Yea we may have to investigate within ffmpeg source code to see why this happens sometimes.

 The good news is that if we can resolve that, then Emby is already built to handle the bitrates like you’re describing.

Link to comment
Share on other sites

Kubadzi

That's great to hear,  this will be very useful for people who keep multiple audio tracks. Thank you for support.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...