Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I/B frames image quality/grain retention discrepancy #212

Open
birdie-github opened this issue Oct 25, 2022 · 3 comments
Open

I/B frames image quality/grain retention discrepancy #212

birdie-github opened this issue Oct 25, 2022 · 3 comments
Labels
question Further information is requested

Comments

@birdie-github
Copy link

birdie-github commented Oct 25, 2022

I've noticed that I frames have generally more details retained vs. B frames which feature more blurriness.

Is this intentional/by design?

Here's the resulting video.

Encoding settings used: vvencapp --preset slower -qp 20 -i out.y4m --output=bit.266 # version 1.6.1

There's no need to watch the entire clip looking for artifacts, just focus on the railing. In the first frame you can clearly see its grainy texture, then, despite not seemingly changing between frames, a part of the railing slowly loses details and turns into a blurry blob without any grain.

Here's the exact part which steadily loses details:

encode2

Video encoding is a terribly complicated algo with tons of parameters, so there's no rush in regard to dealing with this bug report. AFAIK a similar bug report for x265 was filed many years ago and was never addressed.

I have an encode at -qp 19 ready, I will check it later but it's substantially bigger (45 vs 60MB).

@adamjw24
Copy link
Member

adamjw24 commented Nov 2, 2022

So this is a somehow tricky question. You want to encode the keyframes with some more bits, because they will be used as references by all other pictures, and the quality of those keyframes propagates throughout all other frames. But of course you need to find the correct balance. If there is more random/uncorrelated movement/noise between the frames, encoding this better in an I-frame does not have the desired propagation effect. I think this is what is happening here. The encoder increases the quality in the keyframe, only to find out later, that the grainy stuff cannot be reused. We are looking into flattening the GOP structure for dynamic scenes and increasing the QP-differences for static scenes, but this is still work in progress or even planing stage.

@adamjw24 adamjw24 added the question Further information is requested label Nov 2, 2022
@jungleboynx
Copy link

x264/5 has a --tune grain parameter which lowers quantizer variation between frames but it also causes the bitrate to double. av1 has an interesting feature where they can filter out the grain/noise and render it back in at the player. I would assume this is like adding dither noise.

@Eric3495
Copy link

Eric3495 commented May 23, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants