关于libaom film grain
dwing吧
全部回复
仅看楼主
level 10
填鸭X海角 楼主
一楼防熊
2020年06月03日 04点06分 1
level 10
填鸭X海角 楼主
闲来无事逛Doom9,发现里面很多人对av1的film grain model评价还挺高的,所以又心血来潮想测试一下
搬运examples/noise_model.c中的使用说明:
* As an example, where the input source is an 854x480 yuv420p 8-bit video
* named "input.854_480.yuv" you would use steps similar to the following:
* Run your denoiser (e.g, using hqdn3d filter):
* ffmpeg -vcodec rawvideo -video_size 854x480 -i input.854_480.yuv \
* -vf hqdn3d=5:5:5:5 -vcodec rawvideo -an -f rawvideo \
* denoised.854_480.yuv
Model the noise between the denoised version and original source:
* ./examples/noise_model --fps=25/1 --width=854 --height=480 --i420 \
* --input-denoised=denoised.854_480.yuv --input=original.854_480.yuv \
* --output-grain-table=film_grain.tbl
Encode with your favorite settings (including the grain table):
* aomenc --limit=100 --cpu-used=4 --input-bit-depth=8 \
* --i420 -w 854 -h 480 --end-usage=q --cq-level=25 --lag-in-frames=25 \
* --auto-alt-ref=2 --bit-depth=8 --film-grain-table=film_grain.tbl \
* -o denoised_with_grain_params.ivf denoised.854_480.yuv
很尴尬的一件事情是noise_model只能输入yuv文件,doom9上有人问过了这个问题但好像还没有好的解决办法(除非直接用libaom的初级降噪--denoise-noise-level=<arg>)
然后自己上github找到了软件pipexec,可以增强pipe的功能,能做到多对一或环形pipe,估计或许大概能在WSL/msys2下使用。。。吧。。。
可以直接apt install pipexec,教程的话直接man或者看它的readme吧。。。也没几个字
举个栗子:
pipexec -- [RAW /usr/bin/ffmpeg -v warning -i ncop1.mkv -s 1280x720 -pix_fmt yuv420p -f rawvideo - ] [DN /usr/bin/ffmpeg -v warning -i ncop1.mkv -s 1280x720 -pix_fmt yuv420p -vf nlmeans=s=1.5 -f rawvideo - ] [FGM ~/.local/bin/noise_model --input=/proc/self/fd/3 --input-denoised=/proc/self/fd/4 --width=1280 --height=720 --output-grain-table=fgm.tbl ] "{RAW:1>FGM:3}" "{DN:1>FGM:4}"
希望能够帮到想要测试film grain model的人(如果有的话。。。)
PS:想用这招来hack ks265的不用试了,我已经试过了,估计金山防着呢。。。
2020年06月03日 04点06分 2
1