Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st May 2020, 22:42   #121  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,244
Quote:
Originally Posted by Sagittaire View Post
Well retain grain/noise is bitrate problem. All the codec can retain noise if you use suffisant bitrate for that. Retain grain is problem at low bitrate and at low bitrate, the codec itself remove detail/grain/noise. And soft denoising is not problem in this case simply because codec will make strong denoising by itself. For me FGM is really usefull in "low bitrate" situation exactly like for this "1000 kbps / 1080p" challenge encoding.
Yeah. FGM alone can probably save 20% off this particular challenge.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 23rd May 2020, 17:15   #122  |  Link
Sagittaire
Testeur de codecs
 
Sagittaire's Avatar
 
Join Date: May 2003
Location: France
Posts: 2,487
Quote:
Originally Posted by Funky080900 View Post
First denoise the video
Code:
ffmpeg -i ToS.y4m -vf nlmeans=s=1.5 denoised.yuv
Then use the noise_model application located under ./examples/noise_model: https://aomedia.googlesource.com/aom.../noise_model.c
Code:
noise_model --fps=24/1 --width=1920 --height=800 --i420 --input-denoised=denoised.yuv --input=ToS.yuv --output-grain-table=film_grain.tbl
I only kept sY sCb and sCr because the generated .tbl didn't look good.
well I read this paper:
https://norkin.org/pdf/DCC_2018_AV1_film_grain.pdf

In fact I think that you must encode denoised.yuv and FGM will add grain after stream decoding.

It's logical because if you use FGM at medium/high bitrate with noisy source, codec will able to retain noise and FGM will add more noise at this same encoding natively noised.

The good way seem to be:

Quote:
ffmpeg -i ToS.y4m -vf nlmeans=s=1.5 denoised.yuv
Quote:
noise_model --fps=24/1 --width=1920 --height=800 --i420 --input-denoised=denoised.yuv --input=ToS.yuv --output-grain-table=film_grain.tbl
Quote:
aomenc --passes=2 --pass=2 --fpf=firstpass.log --target-bitrate=1220 --kf-max-dist=120 --cpu-used=0 -t 4 --deltaq-mode=2 --film-grain-table=film_grain.tbl -o AV1-0.ivf denoised.yuv

I will try that. Where I can find compiled noise_model.exe ?
__________________
Le Sagittaire ... ;-)

1- Ateme AVC or x264
2- VP7 or RV10 only for anime
3- XviD, DivX or WMV9

Last edited by Sagittaire; 23rd May 2020 at 18:59.
Sagittaire is offline   Reply With Quote
Old 23rd May 2020, 17:40   #123  |  Link
Tadanobu
Registered User
 
Join Date: Sep 2019
Posts: 36
Here is one https://drive.google.com/open?id=1T3...Lwkx9tmnqaTCyj

Built for Windows 2 months ago.
Tadanobu is offline   Reply With Quote
Old 24th May 2020, 19:44   #124  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,244
Quote:
Originally Posted by Sagittaire View Post
well I read this paper:
https://norkin.org/pdf/DCC_2018_AV1_film_grain.pdf

In fact I think that you must encode denoised.yuv and FGM will add grain after stream decoding.

It's logical because if you use FGM at medium/high bitrate with noisy source, codec will able to retain noise and FGM will add more noise at this same encoding natively noised.
The task of denoising with parameterization so the noise can be reconstructed is a tricky one. And doesn't need to be normative in an encoder, so they punted that part?
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 29th May 2020, 22:49   #125  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,696
Is it reasonable to generate the grain table with a heavily denoised reference, yet do the actual encoding with a more gently denoised clip?

I've found that getting full grain elimination using tools like SMDegrain or KNLMeansCL requires some pretty heavy handed settings, which can result in the plastic face effect. The grain synthesis is really nice, but I'd like to dial back the denoising strength when actually encoding a bit.
Blue_MiSfit is offline   Reply With Quote
Old 29th May 2020, 23:16   #126  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,244
Quote:
Originally Posted by Blue_MiSfit View Post
Is it reasonable to generate the grain table with a heavily denoised reference, yet do the actual encoding with a more gently denoised clip?

I've found that getting full grain elimination using tools like SMDegrain or KNLMeansCL requires some pretty heavy handed settings, which can result in the plastic face effect. The grain synthesis is really nice, but I'd like to dial back the denoising strength when actually encoding a bit.
Sounds like a worthy experiment. I can imagine that the grain at playback could wind up being more intense than in the source if the grain table is based assuming more grain was removed than actually was.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 30th May 2020, 03:34   #127  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Posts: 70
Quote:
Originally Posted by Blue_MiSfit View Post
Is it reasonable to generate the grain table with a heavily denoised reference, yet do the actual encoding with a more gently denoised clip?
Yes, that is a good way of doing it. That way it's helping the encoder, but it's probably doing a filter pass either way so more detail might get wiped in the actual encode (maybe).
It's at least better than leaving aomenc do the denoise and the grain modeling at the same time, because it's using very basic denoise methods.

Last edited by quietvoid; 30th May 2020 at 03:37.
quietvoid is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.