justinrh 260 Posted October 6, 2021 Posted October 6, 2021 (edited) original post title: Conversion bitrate not honored When I convert this file, the selected bitrate is not even close on the output file. original 8Mbps selected 4Mbps selected Edited October 7, 2021 by justinrh
Luke 42079 Posted October 6, 2021 Posted October 6, 2021 Hi there, let's look at an example conversion: Thanks.
justinrh 260 Posted October 6, 2021 Author Posted October 6, 2021 I thought we just did :-) Are you asking for a transcode log or what?
Happy2Play 9780 Posted October 7, 2021 Posted October 7, 2021 Need the corresponding logs to see what Emby did as MediaInfo is really irrelevant. But am pretty sure there are other topics on this and will attach if I find them.
justinrh 260 Posted October 7, 2021 Author Posted October 7, 2021 logs attached Please explain how the stats of resultant file are not relevant? The whole point is to make a file of a certain quality, right? embyserver.txt ffmpeg-transcode-cee6c2b4-b066-414a-a681-eb62caa9d4ed_1.txt hardware_detection-63769147490.txt
Luke 42079 Posted October 7, 2021 Posted October 7, 2021 Try resetting these back to default: >>>>> Non-Default Encoder Parameters Warning EncoderParametersH264LibX.ConstantRateFactor: Original: 23 Actual: 28 Warning EncoderParametersH264LibX.Preset: Original: veryfast Actual: faster
justinrh 260 Posted October 7, 2021 Author Posted October 7, 2021 @Luke 19 hours ago, Luke said: Try resetting these back to default: How do I do that?
Happy2Play 9780 Posted October 7, 2021 Posted October 7, 2021 3 minutes ago, justinrh said: @Luke How do I do that? That would suggest Conversion is using Transcode options then so Dashboard-Transcoding.
justinrh 260 Posted October 8, 2021 Author Posted October 8, 2021 (edited) Changed settings per Luke's direction. Logs attached. Still, the video is ~1.5Mbps. ffmpeg-transcode.txtembyserver.txt Edited October 8, 2021 by justinrh
Happy2Play 9780 Posted October 8, 2021 Posted October 8, 2021 @Luke @softworkzwasn't there a discussion about maxrate conversions as the conversion sits at about 1.5Mps instead of the set quality? -c:v:0 libx264 -g:v:0 180 -maxrate:v:0 3520000
Luke 42079 Posted October 8, 2021 Posted October 8, 2021 The quality setting is really a maximum. It just so happens that the software encoder doesn't come quite as close to the requested max as the hardware encoders do. Not at default settings at least.
softworkz 5067 Posted October 8, 2021 Posted October 8, 2021 16 hours ago, Happy2Play said: @Luke @softworkzwasn't there a discussion about maxrate conversions as the conversion sits at about 1.5Mps instead of the set quality? -c:v:0 libx264 -g:v:0 180 -maxrate:v:0 3520000 Yes, this is something we haven't come to work on yet. For libx264, we're using the CRF (constant rate factor) mode which isn't working in a way to hit the desired bit rate. The options for getting closer are: 1. Use lower CRF Values Means lower than the default (23), e.g. 16-22 2. Try ABR Mode To activate, you need to install the "Emby Diagnostics" plugin and adjust the encoding parameters of the libx264 encoder under "Advanced Transcoding": We've documented this a number of times, but received just minimal feedback so far. (which might explain the prioritization) As I always said: feedback on playing around with this is welcome! softworkz 1
justinrh 260 Posted October 8, 2021 Author Posted October 8, 2021 Help me understand this correctly. The quality settings (Mbps) are basically not working at all?
softworkz 5067 Posted October 8, 2021 Posted October 8, 2021 Just roughly, meaning that higher values will produce higher output bandwidth, but not hitting those values like in case with hw encoders.
justinrh 260 Posted October 8, 2021 Author Posted October 8, 2021 @softworkz It seems to me you are trying to control too many factors, as they all do the same thing, so which wins? CRF and preset both determine quality output. Consider Handbrake's UI - only one or the other (bitrate or CRF) can be set, but not both; then a preset is just a prescribed CRF. We have too many inputs acting at the same time. Given this UI, what quality value is the user actually going to get?
softworkz 5067 Posted October 8, 2021 Posted October 8, 2021 (edited) 5 minutes ago, justinrh said: CRF and preset both determine quality output. Consider Handbrake's UI - only one or the other (bitrate or CRF) can be set, but not both; then a preset is just a prescribed CRF. We have too many inputs acting at the same time. That's not correct. A preset is not a prescribed CRF! In simple words: CRF determines the output rate ("constant rate factor") The presets determine the amount of compute resources to use for encoding (you can have better and worse quality at the same encoded bitrate) Edited October 8, 2021 by softworkz
justinrh 260 Posted October 8, 2021 Author Posted October 8, 2021 Then maybe Emby's use of 'preset' is different than Handbrake's use of 'preset'. In HB, selecting a preset changes the CRF to a certain value, then the user can adjust from there overriding the preset value. Either way, how is a user supposed to grasp these two settings? Both are said to determine "quality". There is no way to correlate.
softworkz 5067 Posted October 8, 2021 Posted October 8, 2021 Both affect quality: one by increased file size and the other one by increased CPU usage I agree that these settings are confusing. It's not even clear that these apply to software encoding only, but not when hw acceleration is used. 1
justinrh 260 Posted October 9, 2021 Author Posted October 9, 2021 (edited) I set CRF = 18 (preset = veryfast). "8Mbps" -> 6.5Mbps (1920x1080), "4Mbps" -> 2.8Mbps (1280x720). Much closer! The visual quality is much better. I'm curious as to why the frame size changes - another variable not shown to the user! Tomorrow I'll play with the diags plugin if I have time. Edited October 9, 2021 by justinrh
softworkz 5067 Posted October 9, 2021 Posted October 9, 2021 10 minutes ago, justinrh said: I'm curious as to why the frame size changes - another variable not shown to the user! This is because the conversion uses the same logic as for playback: for playback, we have the bandwidth as input parameter (either auto-detected or set by the user). Going from there, we need to find the best way to present a video, and with a given bandwidth, there are certain steps where the overall result will be better at a lower resolution instead of keeping the resolution and reducing the bitrate only. 1
justinrh 260 Posted October 9, 2021 Author Posted October 9, 2021 I installed the diag plugin and don't see anything for libx264 in these pages:
softworkz 5067 Posted October 9, 2021 Posted October 9, 2021 Got to "Transcoding", choose "Advanced" and Save. Got to "Advanced Transcoding", scroll down to libx264 Encoder and click on the gear button.
justinrh 260 Posted October 9, 2021 Author Posted October 9, 2021 There is no 'advanced' on the Transcoding page.
Happy2Play 9780 Posted October 9, 2021 Posted October 9, 2021 1 minute ago, justinrh said: There is no 'advanced' on the Transcoding page. You do not see this drop down box?
Painkiller88 249 Posted October 10, 2021 Posted October 10, 2021 (edited) Yes we already had a discussion like that about the set bitrate also for transcoding streams. The Problem is, The Client can overrule this setting (lower, but not higher) eg. If you set all clients to allow 10MBIT but the client on his phone is set to AUTO it will result in exactly the same bitrate you have on your images. If you set the Users Phone Settings to exactly 10MBIT like you allows to him, he will get about 6-8MBIT in his streams instead of the waned 10MBIT Setting the Users Phone Settings from AUTO to 12MBIT will result in the 10MBIT you are granting him, because he can't go higher as you allow him. I know this is confusing as the configured Bitrate is not working as it should, but this is what i recorgnized in my time using emby how you get your desired Bitrate. I would say it is NOT working correctly but the answer in another Thread was, this is like it should be... so i just tell all my friends to set the bitrate a bit higher than i allowed them to use it. This solved it so far. Edited October 10, 2021 by Painkiller8818
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