I have a clip like this.Code:2160p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 4:2:0 / 10 bits / SDR / BT.709
How can I resize and encode this 1080p 8 bit x264 with Avisynth plugins?
Couldn't find any good way.
Help would be great.
+ Reply to Thread
Results 1 to 8 of 8
-
-
what kind of dithering and resizing algorithm did you want ?
"floyd-steinberg" is common for dither. Spline36 is fairly sharp for downscaling, if it's too sharp for your source, try Spline16
e.g
Code:LWLibavVideoSource("your video.ext") Spline36Resize(1920,1080) ConvertBits(bits=8, dither=1)
There are many different types of dithering and scaling algorithms. You can use dither tools for example to access others -
Glad to receive your reply!
I assume "Floyd–Steinberg dithering" is one of best? Just looking one of best bet for my video.
I thought "ConvertFromStacked(bits=10)" also necessary, that fools me. Anyway here's my script:
LWLibavVideoSource("<video>",format="YUV422P10")
ConvertBits(bits=8, dither=1)
z_ConvertFormat(1920,1080,pixel_type="YV12") -
It's pretty standard, and the most common method used. But one complaint is it can be slightly noisy on some types of video in some scenarios.
On the other hand, some people actually add additional noise and grain on top of dithering, and encode with high bitrates to prevent 8bit banding
Others don't dither at all , because of various reasons
It depends on the source, and the encoding scenario, and what you're trying to do
I thought "ConvertFromStacked(bits=10)" also necessary, that fools me. Anyway here's my script:
LWLibavVideoSource("<video>",format="YUV422P10")
ConvertBits(bits=8, dither=1)
z_ConvertFormat(1920,1080,pixel_type="YV12")
Newer versions of lsmash work with planar YUV directly, so there is need for stacked MSB/LSB format or ConvertFromStacked
HolyWu's branch is the most frequently updated. Recommended
https://github.com/HolyWu/L-SMASH-Works/releases
If you're using z_ConvertFormat, You don't need to use convert bits separately
z_ConvertFormat(width=1920, height=1080, pixel_type="YV12", dither_type="error_diffusion", resample_filter="spline36")
You can change any of the parameters, for example, spline36 is often too sharp for Y scaling from UHD sources. And resample_filter_uv would control the UV downscaling method. Often a softer method like bicubic or bilinear is more pleasing for chroma scaling
(And technically, if you were using convertbits instead of z_convertformat - you should get better results scaling in 10bit before converting to 8bit (although it can be difficult to see difference) . Because you have higher precision during the scaling step)Last edited by poisondeathray; 16th Mar 2020 at 08:50.
-
Holy cow!
I learned a lot of things from you, I can't thank you enough.
Great details, will try more parameters for z_ConvertFormat.
Thank you again. -
You can resize it and do 10bit to 8bit reencode with my smart FFMpeg gui
https://forum.videohelp.com/threads/395425-New-small-GUI-for-FFmpeg
Last edited by ProWo; 16th Mar 2020 at 10:40.
-
Prowo, man, we all love to shove our beloved creation to everyone, but if you do this too much, it becomes a pollution, especially if you do it without any explanation.
Besides almost any GUI can scale down like that,
how do you set error diffusion in your GUI, dithering from 10 to 8 bit and how do you set downscale method?
Similar Threads
-
10-bit to 8-bit Video File Conversions - the easy (free) way!
By VideoWiz in forum Video ConversionReplies: 10Last Post: 6th Feb 2020, 03:24 -
Help with running 32-bit DLL in 64-bit AVSynth with MP_Pipeline.
By Vitality in forum Video ConversionReplies: 1Last Post: 12th Jan 2019, 16:26 -
16-bit PNG ~> 10-bit MKV GPU encode
By Hylocereus in forum Newbie / General discussionsReplies: 8Last Post: 29th Mar 2018, 23:07 -
MPC HC: 32-bit or 64-bit on Windows 7 64-bit
By flashandpan007 in forum Software PlayingReplies: 20Last Post: 22nd Jul 2016, 09:22 -
why in windows 64 bit I don't see 64 bit codec with DSFmgr?
By marcorocchini in forum Newbie / General discussionsReplies: 2Last Post: 8th Sep 2015, 09:01