Jump to content

"Auto" quality setting, better tuning


BloodyIron

Recommended Posts

BloodyIron

Hey Folks,

 

So I've been troubleshooting playback of some of my videos, and found this post helped : 

 

Turns out the "Auto" setting is setting the bitrate WAY higher than even the file actually has. For example, a 1080p stream, the file itself is ~12mbps but Auto is picking 1080p 60mbps. Naturally, this is probably causing ffmpeg to use way too high bitrate, for zero benefit. Additionally, 4k and other resolutions suffer from the same effect.

Can we please get "Auto" (home/chromecast/etc) to never go any higher than the option slightly higher than the actual bitrate in the file? Having such massive bitrate differences cause problems with scrubbing through the video timeline as well as halting playback at times with ffmpeg quitting.

Please? :) I'd really like to just "Auto" coast and not have to worry at all.

Link to comment
Share on other sites

Happy2Play

Example please. 

But from a transcode HEVC/x265 codec standpoint the original bitrate is doubled when transcoding down to x264 to maintain the compressed quality.  Now this doubling does not happen when you have a set playback quality or should I say it will not exceed the set playback quality.

Link to comment
Share on other sites

Our settings are "maximum" settings.  It isn't going to produce an output over the input bitrate (with the exception of the HEVC conversion mentioned above).

What, exactly, are you requesting here?

Link to comment
Share on other sites

BloodyIron

Here's stats about the example file. And as you can see, the video bitrate is just under 12mbps. But when I have "Auto" set, it sets it to "Auto 1080p 60mbps", and there is no h265/HEVC going on here:

 

Video
Title
1080p H264
Codec
H264
AVC
Yes
Profile
High
Level
41
Resolution
1920x1080
Aspect Ratio
16:9
Anamorphic
No
Interlaced
No
Framerate
23.976
Bitrate
11,712 kbps
Bit Depth
8 bit
Pixel Format
yuv420p
Reference Frames
1
NAL
4

Audio
Title
English DTS 5.1 (Default)
Language
English
Codec
DTS
Profile
DTS
Layout
5.1
Channels
6 ch
Bitrate
1,536 kbps
Sample Rate
48,000 Hz
Default
Yes

Container
mkv
Size
4026MB
 

Link to comment
Share on other sites

BloodyIron

Also, scrubbing is weird until I set it to a bitrate below the 11.7~mbps, then back up to 15mbps (1080p both). So not doing auto here.

Playback is through the web interface, so stereo 2.0 audio, and I know the source here is 5.1.

Link to comment
Share on other sites

Happy2Play

I am still confused here.  Just because one may select 1080p 60Mbps does not play all media at that value.  Your example media 1080p 12Mbps will direct play unless there is a issue with the audio, then it will direst streams.

Do you have a specific example of bitrate inflation or am I just misunderstanding?

Link to comment
Share on other sites

BloodyIron

You're misunderstanding. I was having scrubbing issues when I set it to auto, as it was setting it to 1080p 60mbps for a video with only 12mbps ish, and I could not skip forward/scrub forward until I manually set it to 15mbps or lower. Auto is supposed to pick a bitrate that makes sense, not literally 600% the bitrate of the actual source itself.

Link to comment
Share on other sites

Happy2Play

What app is giving you this as my Browser says Auto-Direct and so does my IOS app when direct playing media.

I still don't understand the context of what you are saying or seeing.  Who cares if it says 4k-120Mbps as that is a MAX value and has nothing to do with playing a 1080p 12Mbps items.  

How is your media being played? Direct Play, Direct Stream, Transcode

  • Agree 1
Link to comment
Share on other sites

BloodyIron

I linked to a browser playback issue, I guess that wasn't sufficiently clear, I am having this issue through the browser. And as I just said, the issue is that I cannot move forward or back in the video unless I force the bitrate to be much lower, completely defeating the point of "Auto". I don't see how what I'm saying here is unclear.

 

I don't know if it's transcode or whatever, what matters is when I try to skip ahead it doesn't work. Why should this matter at all to me? If it's just going to do 60mbps every time "Auto" is selected, why even show the bitrate in the first place? that's redundant.

Link to comment
Share on other sites

Happy2Play

The context of play has to be provided as different playbacks are doing different things.  So everything is still require from How to Report a problem.

Locally I have no issue opening any item in a browser and jumping to any point.  So I can only guess you are referring to a Remote connection but guessing does not help anyone.

As a feature request we have no idea where a issue may be.

Edited by Happy2Play
Link to comment
Share on other sites

12 hours ago, BloodyIron said:

You're misunderstanding. I was having scrubbing issues when I set it to auto, as it was setting it to 1080p 60mbps for a video with only 12mbps ish, and I could not skip forward/scrub forward until I manually set it to 15mbps or lower. Auto is supposed to pick a bitrate that makes sense, not literally 600% the bitrate of the actual source itself.

Hi.  Again, that is a max value.  It does not mean the bitrate of the item is being increased.  Whatever problem you are having is unrelated.  The bitrate setting is set per the connection, not the media being played.

Let's please look at specifics for the actual problem you are having (the seeking).  Thanks.

 

Link to comment
Share on other sites

  • 1 year later...
archecon

Hi, please how can I disable feature: auto-quality-setting-better-tuning in general? Emby server on windows.

I searched for the option in the xlm configuration files, but in no success.
I need to disable the option for the purpose of debugging and testing my system.

Thank you

Edited by archecon
Link to comment
Share on other sites

GrimReaper
9 minutes ago, archecon said:

please how can I disable feature: auto-quality-setting

Just select some fixed numerical quality value in your client app.

9 minutes ago, archecon said:

I searched for the option in the xlm configuration files, but in no success.
I need to disable the option for the purpose of debugging and testing my system.

It is per-client setting, not server-side setting, you cannot disable it in general/by default, it needs to be set in each client app separately.

 

Link to comment
Share on other sites

archecon
1 hour ago, GrimReaper said:

Just select some fixed numerical quality value in your client app.

It is per-client setting, not server-side setting, you cannot disable it in general/by default, it needs to be set in each client app separately.

 

That's a misunderstanding.
In the application, as well as in the browser, for example, I manually entered the maximum bitrate of 30Mbit/s. However, the real bitrate is around 5Mbit.  Please I am not confusing Mbit and Mbyte.

If I understand correctly, the developers have implemented some version of bitrate control including encoding.  That is, even if I manually set 30Mbit, if it is evaluated that the connectivity is not enough, a bitrate reduction is applied and automatically. This is a very welcome feature.
But in case I am debugging or testing my system and environment, it would be good to be able to disable this feature.

Translated with www.DeepL.com/Translator (free version)

2022-11-26_23-41-57.png

2022-11-26_23-38-37.png

Link to comment
Share on other sites

GrimReaper
1 minute ago, archecon said:

That's a misunderstanding.

It is not.

1 minute ago, archecon said:

In the application, as well as in the browser, for example, I manually entered the maximum bitrate of 30Mbit/s. However, the real bitrate is around 5Mbit.  Please I am not confusing Mbit and Mbyte.

The real bitrate of example item is 36 Mbps (Mbit/s, not MByte/s) and you have quality in client app set to 30 Mbps.

  • Agree 1
Link to comment
Share on other sites

archecon
3 minutes ago, GrimReaper said:

It is not.

The real bitrate of example item is 36 Mbps (Mbit/s, not MByte/s) and you have quality in client app set to 30 Mbps.

 

bandwidth.jpg

Link to comment
Share on other sites

GrimReaper
4 minutes ago, archecon said:

 

bandwidth.jpg

That means nothing as streams are sent in segments, your screenshot shows it's a 36 Mbps mkv file being transcoded to 30 Mbps stream, which is what MediaInfo section in item detail screen would show you as well.

image.png.a3d0e2b6ae5ec0987de8d7306a93ed31.png

Edited by GrimReaper
Link to comment
Share on other sites

archecon

I see it.

BUt, 

I don't have a 36Mbit connection even theoretically from my ISP. 
To make sure that windows doesn't show the wrong bitrate, I loaded the Wifi connection in parallel plus spedtest.net. So to reach my maximum from ISP. The test confirmed that Emby's bitrate measurement of about 5Mbit is correct.

Link to comment
Share on other sites

archecon
7 minutes ago, GrimReaper said:

That means nothing as streams are sent in segments, your screenshot shows it's a 36 Mbps mkv file being transcoded to 30 Mbps stream, which is what MediaInfo section in item detail screen would show you as well.

image.png.a3d0e2b6ae5ec0987de8d7306a93ed31.png

Reducing bitrate due to quality setting . Means further automatic reduction of bitrate beyond the limit specified by the user in the client application.
Please consult with softworkz and Luke.
Thank you

Link to comment
Share on other sites

GrimReaper
7 minutes ago, archecon said:

Reducing bitrate due to quality setting . Means further automatic reduction of bitrate beyond the limit specified by the user in the client application.

It does not, Reducing bitrate due to quality setting is "Transcoding reason" as it's going 36Mbps->30Mbps, there's nothing further. Bring up Stats For Nerds while playback and you'll have exact bitrate shown. If it differs to what's shown, than something is off.

Link to comment
Share on other sites

Happy2Play
20 minutes ago, archecon said:

Reducing bitrate due to quality setting . Means further automatic reduction of bitrate beyond the limit specified by the user in the client application.
Please consult with softworkz and Luke.
Thank you

Would need server and ffmpeg logs for specific example but from what you have provided Grrim is correct.

  • Like 1
Link to comment
Share on other sites

archecon
19 hours ago, Happy2Play said:

Would need server and ffmpeg logs for specific example but from what you have provided Grrim is correct.

Once again, in my opinion, there is an automatic adjustment of the data flow /reduction/. I don't consider this a bug, but a /desirable/ feature. I ask where is the option in the configuration file to disable this /automatic flow control/ feature.
To be clear. I really don't have a 50Mbit connection from the ISP on the client side. This is completely out of the question. The video being played is not choppy, it just has reduced quality corresponding to the lower bitrate /about 10 -15Mbit/.
 

2022-11-27_19-01-36.png

ffmpeg-transcode-e7edb81b-11a5-4b38-8289-fe32f5c17399_1.txt embyserver (1).txt

Link to comment
Share on other sites

2 hours ago, archecon said:

Once again, in my opinion, there is an automatic adjustment of the data flow /reduction/

Hi.  There is not.  There is only the settings you choose.  In the example above, the original item is 73Mb/s and it is being transcoded down to (roughly) 50Mb/s due to the app requesting that maximum:

http://...&AudioCodec=aac&VideoBitrate=49616000...&TranscodeReasons=ContainerBitrateExceedsLimit
...
18:58:17.725 Input #0, matroska,webm, from 'E:\ServerFolders\Filmy_4k\ex-machina-c071ad44c0.mkv':
...
18:58:17.725   Duration: 01:48:16.99, start: 0.000000, bitrate: 73203 kb/s
...
18:58:20.793 Output #0, segment, to 'D:\H265\transcoding-temp\CD24D4\CD24D4_%d.ts':
18:58:20.793   Metadata:
18:58:20.793     encoder         : Lavf59.27.100
18:58:20.793   Stream #0:0: Video: h264, yuv420p(tv, bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 90k tbn
18:58:20.793     Metadata:
18:58:20.793       encoder         : Lavc59.37.100 libx264
18:58:20.793     Side data:
18:58:20.793       cpb: bitrate max/min/avg: 49616000/0/0 buffer size: 99232000 vbv_delay: N/A

Based on those values, this may have been auto detection but you can choose a specific value also.

Link to comment
Share on other sites

archecon

Then how is it possible that the actual bitrate is somewhere between 7-15mbit?  It's not a coincidence, I can replicate it at any time.
The video itself has no lags, it doesn't crash. It just looks visually like a lower bitrate..
The client can't even receive 30Mbit because it objectively has no connectivity... The windows measurement of the bitrate doesn't lie, I've done experiments that it shows correctly. It's a mystery... Ok the server is producing 50mbit but the client is receiving 7-15?  
I haven't noticed similar behavior in old versions of Emby. Simply the video got stuck due to high bitrate and low connectivity and the user had to select a lower bitrate manually in the app.
Didn't the developers experiment with flow control and just not mention it publicly?

Link to comment
Share on other sites

archecon
1 hour ago, ebr said:

Hi.  There is not.  There is only the settings you choose.  In the example above, the original item is 73Mb/s and it is being transcoded down to (roughly) 50Mb/s due to the app requesting that maximum:

http://...&AudioCodec=aac&VideoBitrate=49616000...&TranscodeReasons=ContainerBitrateExceedsLimit
...
18:58:17.725 Input #0, matroska,webm, from 'E:\ServerFolders\Filmy_4k\ex-machina-c071ad44c0.mkv':
...
18:58:17.725   Duration: 01:48:16.99, start: 0.000000, bitrate: 73203 kb/s
...
18:58:20.793 Output #0, segment, to 'D:\H265\transcoding-temp\CD24D4\CD24D4_%d.ts':
18:58:20.793   Metadata:
18:58:20.793     encoder         : Lavf59.27.100
18:58:20.793   Stream #0:0: Video: h264, yuv420p(tv, bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 90k tbn
18:58:20.793     Metadata:
18:58:20.793       encoder         : Lavc59.37.100 libx264
18:58:20.793     Side data:
18:58:20.793       cpb: bitrate max/min/avg: 49616000/0/0 buffer size: 99232000 vbv_delay: N/A

Based on those values, this may have been auto detection but you can choose a specific value also.

Yes I can select a specific value. I have also selected it many times... But if I have a weak internet connection, the bitrate is automatically reduced on the server side.
The server doesn't keep the manually selected bitrate. 
That's the crux of the issue... Although the manually set bitrate is set by the client. and it doesn't matter whether firefox or android client, it will be adjusted depending on the quality of the connection.
If the server reduces the bitrate despite the manual setting, the message: reducing bitrate due to quality settingsYes I can select a specific value. I have also selected it many times... But if I have a weak internet connection, the bitrate is automatically reduced on the server side.
The server doesn't keep the manually selected bitrate. 
That's the crux of the issue... Although the manually set bitrate is set by the client. and it doesn't matter whether firefox or android client, it will be adjusted depending on the quality of the connection.
If the server reduces the bitrate despite the manual setting, the message: reducing bitrate due to quality settings

 

See: 

 

 

Edited by archecon
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...