Quote:
Originally Posted by vigan1
Thank you so much. Here is what I want to do. I want to use BM3D at 16bit float internal processing, and send it to FFmpeg to be encoded to a 16bit float RGB PNG sequence. What should I do ?
I don't even know if the code for BM3D is ok.
Code:
import vapoursynth as vs
import mvsfunc as mvf
core = vs.core
#core.max_cache_size = 8000
clip = core.lsmas.LWLibavSource(source=r"/home/desktop/input.mkv")
clip = mvf.BM3D(clip, sigma=60.0, profile1="fast", radius1=1)
clip.set_output()
Code:
vspipe BM3D.vpy - | ffmpeg -i rawvideo -pixel_format gbrp -video_size 1920x1080 -framerate 30 output_%04d.png
|
Adjust the settings (vsedit would be nice for feedback) until you're happy. If you can't get vsedit to work, use ffplay or mpv. Otherwise you can't tell if you're using the correct settings (maybe to strong denoise, maybe too weak, maybe you need other filters like sharpen etc....)
After your filters, convert to 16bit RGB and pipe 16bit RGB instead of 8bit RGB . It would look something like this
Code:
clip = core.resize.Bicubic(clip, format=vs.RGB48)
The pixel format in ffmpeg would be "gbrp16le" instead of "gbrp"
For my earlier simple example it would look something like this
Code:
vspipe blankclip.vpy - | ffmpeg -f rawvideo -pixel_format gbrp16le -video_size 640x480 -framerate 24 -i - -start_number 0 output_%06d.png