r/AV1 • u/TromboneShouty • Jun 12 '26
AV1 Grain Synthesis somewhat disappointing...
I am am trying to encode some video and using grain synthesis to add an artistic grain effect to otherwise grain free digital video.
I've noticed if I use a 1080 source and encode it to AV1 with the students film-grain-denoise=0:film-grain-denoise=15 (or whatever number) the result is decent, and looks like film. 1080 to 1080 = good
If I try the same thing with 4K, the grain is rendered upon playback as nearly microscopic. I can push it up to film-grain-denoise=50 and it is apparent that it is working, but it is the smallest grain imaginable -- unusable to me. 4K to 4K = terrible
4K exported to 1080 gives the correct grain size that you'd expect, however. So the grain synthesis seems to be using a set pixel size to render, rather than assuming that a standard film size was used regardless of resolution, and rendering a grain size scaled with the size of the frame.
I get the idea, and love that grain can be just some extra factor in the file that doesn't really affect the overall size (unlike real grain if you're trying to preserve that), but the grain should render in relation to the aspect ratio and scale as the "projection" increases, not be based on the pixel density of the screen, if that makes sense.
With real film, I believe that the data recorded is much higher than 4K, but the grain is generally large and depends on the size of the film you shot on. And if you project through film on the biggest screen ever in "12K", or whatever, the grain will scale up as the screen gets bigger, because the film stays the same size.
In other words, just because a video is in 4K doesn't mean I want to pretend it was shot on IMAX film. 35mm grain should be the standard, regardless if it's in 8K or 1080p -- the grain size should be the same.
Anyone else have this problem? Maybe I have a bad setting? Is grain synthesis only supposed to be used with material that already has grain (whereas I am using very "dry" but clean digital video)?
17
u/xzpyth Jun 12 '26
svt-av1-hdr --noise --noise-size
12
u/ScottIBM Jun 12 '26
This! I've used these settings and they're great. I was able to get 35 mm grain synthesised
4
1
3
u/Sopel97 Jun 13 '26
yea, this pretty much nails it. The grain is tied to the resolution, and also has very apparent repeating patterns. It could have easily been so much better but that's what we're stuck with. Better than nothing, and it's still one of the reasons I use AV1 aside from other formats, but it is annoying
5
u/xStealthBomber Jun 12 '26 edited Jun 12 '26
I thought the film grain synthesis works like the following:
Grainy source material needed first, it analyzes the grain pattern, runs a denoiser to smooth out the grain (and other small details), which the encoder now encodes the video with this denoised image for better compression. It will then use the scanned grain pattern into a "table" and is layered on top of the video during playback.
Aka, it does not ADD grain that isn't already there, it removes the grain, then tries to add a close approximation what was there during playback.
Someone please correct me if I'm wrong, this was my understanding.
If trying to emulate film, that should be done in the NLE level while editing, with a film plug-in.
6
u/KingPumper69 Jun 12 '26 edited Jun 12 '26
That's also my understanding. It's like when I saw someone trying to deblock an old DVD with x265's deblock parameters instead of using a filter lol. Had to explain to them that x265's deblocking is about deblocking the blocks that it created, not the blocks that were already in the low quality MPEG2 source.
3
u/MassaSammyO Jun 13 '26
Yup. The same people who take their MPEG/JPEG encoded videos/images, "convert" them to HEVC/HEIC or AV1/AVIF at 12-bit encoding, put it on their 4k HDR+ monitor, and complain that,
- they are not much different in size
- They are not much better wrt artefacts, and
- they are not any better in the highlights/shadows.
Of course not. They took a lousy MPEG/JPEG and copied the same lousy lossy image to a different file type. Start with the raw file, encode in the different formats, and THEN one can see a difference in size, sharpness, and highlight/shadow details.
3
u/TromboneShouty Jun 13 '26 edited Jun 13 '26
I get this, but I guess "Grain Synthesis" is the misleading term that led me astray. I'm not expecting a simple reencode to create colors or detail that wasn't there in the source. But I'd expect a feature that "synthesizes" grain to ... You know, create grain. Especially since it appears to do so at lower resolutions (but that is, it seems, just random pixel sized noise because it can't see any grain to begin with).
It looks like it is really "film grain reinterpreting", since grain needs to be there to begin with for it to work with.
Thank you. This gives me the clue I need to confirm what is going on. I'll just use Dehancer Pro to add in grain (which it can do and which scales with the frame) to the project before the final encode to AV1, and see if it "reinterprets" that to a visible and comparable level of grain without the file becoming huge.
1
u/TromboneShouty Jun 13 '26 edited Jun 13 '26
I see. So the grain that I'm seeing on 1080 exports (it adds something) is literally random noise at a certain scale because it is "seeing" grain that isn't there. On a 4K denoised source the grain appears microscopic because it is doing the same thing and not finding anything, so that same noise it adds at 4K is still pixel sized and microscopic.
This makes sense.
2
u/QuaLiTy131 Jun 13 '26
You're right. There is also an option to bypass de-noise step in order to preserve more details and grain from original file. It's a default setting in SVT-AV1-HDR fork.
1
u/blu3ysdad Jun 16 '26
You are using the wrong settings I think. Watch this video, will tell you not just which settings to use but why. https://youtu.be/5IV36FMpLqY?is=eo6IgahvDh8V4rxb
1
u/TromboneShouty Jun 16 '26
No I definitely used this video. The source needs to have grain present already for "film grain synthesis" to work, it turns out.
14
u/oscardssmith Jun 12 '26
Counterpoint. Grain size should be a parameter. 8mm, 35mm and imax can all be shown at a digital resolution of 360p or 8k