Log in

View Full Version : 10 Bit (v210) To 8 Bit With Dither (Pro Software)


Mr.Sandman
3rd November 2012, 15:38
Hello wise souls! :)

So, i have a premiere generated 2-Pass Neat video Denoised 48 bit v210 10 bit .avi file... and i would like to encode that to a 8-Bit h264 file... and, of course i get a lot of banding...as you already know. So i really need a pro software (something like After Effects or premiere) that accepts my v210 10Bit input and then encode that to an intermediate UT VideoCodec 4:2:0 YV12 file with Down-dithering (10 To 8 Bit) included...

(Situation 1): I Really want to avoid Avisynth and/or mod/hacks to accept v210 input. (Really)

(Situation 2): I Want to avoid flash3kyu debander and/or gradfun's and family.

is This possible?

Thank you
:)

(Sorry my bad english)

sneaker_ger
3rd November 2012, 15:59
Sorry to answer your question with another question, but you do know that flash3kyuu and dither tools (http://forum.doom9.org/showthread.php?p=1386559#post1386559) (gradfun3 package) do include proper dithering from 10 bit to 8 bit? (Not just debanding 8 -> 8)

There isn't any reason to not use AviSynth for the job from a quality point of view.

Mr.Sandman
3rd November 2012, 16:24
Hello sneaker.

But to use flash3ku or gradfun3 i have to use avisynth (that works with 8 bit), i might be wrong in the following ... but those v210 input hacks seems very complicated and buggy? (with all respect to the developers).

kolak
3rd November 2012, 16:46
Use modded ffms2 (it's not buggy or difficult to use) to read v210 and than flash3ku- there is no better solution even in a pro land :)
There is basically no pro software which does proper (eg. Floyd-Steinberg) dithering- avisynth is your best bet :)

Ffvideosource("v210.mov",enable10bithack=true)
f3kdb_dither()

That's all what you need- the best is to index file before running script.
Ffms2 with 10bit hack based on ffmbc: http://nmm.me/me

Mr.Sandman
3rd November 2012, 17:05
kolak tahnx for response... does that ffvideosource v210 read v210 in avi format? or am i limited to .mov container?

kolak
3rd November 2012, 17:23
Both- same as ffmpeg. Also ProRes, DNxHD, AVC-I at 10bit.

Mr.Sandman
3rd November 2012, 17:35
i have this script:

LoadPlugin("C:\ffms2.dll")
FFvideosource("C:\2-Pass-Lossless.avi",enable10bithack=true)
f3kdb_dither()

... i have the following error (on vdub): FFvideosource: video codec not found, error line 2

kolak
3rd November 2012, 17:39
Did you index source file? Are you sure it's v210? Does it work if you drag it to Vdub and does it say v210?
Another possible issue- v210 AVI out of AE has strange structure- some apps don't like it. Do this: open it in Vdub, set in Vdub Full processing mode, Color depth for input and output as V210 and save new AVI. This has to work. You can also render v210 MOV from AE as this seams to work better than AVI.

Mr.Sandman
3rd November 2012, 17:40
sorry the avi is not v210 but yv12... im gonna encode to v210 sorry prevour post

kolak
3rd November 2012, 17:57
Make sure AE is in 16bit or 32bit mode when you export v210 :)

Mr.Sandman
3rd November 2012, 19:52
wow it works... :) even when encoded to h264 the quality is awsome im getting good compressability gains and excelent quality...

thanx guys u rule :)

pandy
5th November 2012, 14:09
There is basically no pro software which does proper (eg. Floyd-Steinberg) dithering- avisynth is your best bet :)

FS is far from doing video dithering in a "proper" way - http://bisqwit.iki.fi/story/howto/dither/jy/

Asmodian
6th November 2012, 22:59
I am not convinced that method of dithering is a big improvement when your "pallet" is the full 24-bit RGB color space, it would also be amazingly slow. I don't think the "moving dither" issue with Floyd-Steinberg dithering is noticeable doing 30/48-bit -> 24-bit. It does look great for converting 24-bit to 8-bit or lower though.

kolak
6th November 2012, 23:37
FS is far from doing video dithering in a "proper" way - http://bisqwit.iki.fi/story/howto/dither/jy/

Show me better one, which is not just on paper and can be use din real world.
This what this guy is showing with FS is no where to be found in real world footage.
He is also using going to very low number of colors which again- has not much to do with 10/8bit video.

pandy
7th November 2012, 16:49
Rule is simple - everything which looks like noise or it is filtered (lost) or not filtered but compressibility suffer - some professional companies instead FS use something like http://www.barco.com/barcoview/downloads/Dithering_explained.pdf however this processing is introduced at the end of chain not in middle or beginning - currently only static dither can survive compression without suffering of the quality itself to much. Color reduction principle is same - 2 lower bits (3 values) must be replaced by different color so more or less this will be case when 4 bit is re-quantized to 2 bit with dither (4096 color to 64 color palette reduction).

My point was only that error diffusion (mentioned FS) is one one many methods and FS can be good for static picture but even in this case there is many comparable methods that can be sometimes "more proper" for example Sierra 24A is a good low computation cost example however seems that error diffusion is no optimal from video point of view anyway...

Perhaps dithering can be shifted to encoder (DCT or HT space) where encoder can perform dithering in a more efficient way...

Currently from compressibility point of view ordered dither seems to be more appropriate than error diffusion (and knowing fact that this is case where 10 bit is converted to 8 bit, ordered dither provide quite good subjective results to).

kolak
7th November 2012, 17:34
Yes- ordered dither works better for low bitrates, but FS is better for eg. Blu-ray level of bitrates or to create uncompressed 8bit masters from 10bit ones. I also put random noise on top of FS dithering to make it even more "smooth". Pure ordered dithering leaves visible pattern, which for me is "more visible" than FS side effects.
The problem is that there are simply almost no pro tools, which do any type of dithering :)

pandy
8th November 2012, 11:19
Yes- ordered dither works better for low bitrates, but FS is better for eg. Blu-ray level of bitrates or to create uncompressed 8bit masters from 10bit ones. I also put random noise on top of FS dithering to make it even more "smooth". Pure ordered dithering leaves visible pattern, which for me is "more visible" than FS side effects.

Visibility or not for ordered dither is very subjective - personally i prefer ordered dither due of it static structure not crawling pixels like for FS. IMHO better than FS is Sierra 24A.
But discussion was started by statement that FS is "proper" method which is not fully correct - that's all - IMHO better results for example are achieved with Riemersma dithering than FS.


The problem is that there are simply almost no pro tools, which do any type of dithering :)

Not sure on this - some psycho-visual tuning in x264 perhaps exploit this area - probably x264 developers are good source of information on this i think.

kolak
8th November 2012, 23:47
I hope to see Sierra 24A implementation in avisynth or vapoursynht :)

sneaker_ger
17th November 2012, 13:54
"Filter Lite" = Sierra?
dmode:int:opt — Dithering mode, when applicable. 0 = Ordered dithering (Bayer), 1 = round, 2 = round, fast but possibly less accurate (not implemented yet), 3 = Filter Lite (default), 4 = Stucki, 5 = Atkinson, 6 = Floyd-Steinberg, 7 = Ostromoukhov

/edit:
Yes, it is:
Filter Lite (Sierra 2-4A) is OK as a general purpose dither algorithm and is very similar to Floyd-Steinberg. Anyway if you want to dither to 8 bits before encoding to avoid colorbanding, you’ll probably prefer using ordered dithering.

kolak
19th November 2012, 15:11
Yes- I tried it- not much real difference to Steinberg for 10-8bit conversion. If I would have to choose Steinberg produces less visible artefacts and is just a bit slower.

Biggiesized
26th November 2012, 21:47
We need to start a thread on Doom9 where we can post control images (16-bit TIFFs of various pictures or patterns) and process them with various dithering algorithms to see which ones look the best.

Of course, we'd also need video samples as well to view them in motion before and after encoding.

pandy
27th November 2012, 11:17
Yes- I tried it- not much real difference to Steinberg for 10-8bit conversion. If I would have to choose Steinberg produces less visible artefacts and is just a bit slower.

I'm curious about equipment You've been use that You see visible artifacts on low 2 bits form 8 bit video.

We need to start a thread on Doom9 where we can post control images (16-bit TIFFs of various pictures or patterns) and process them with various dithering algorithms to see which ones look the best.

Of course, we'd also need video samples as well to view them in motion before and after encoding.

It should be not a big problem - some sky pictures (a few - various tonations), grayscale gradient not sure what else.

kolak
27th November 2012, 18:06
I'm curious about equipment You've been use that You see visible artifacts on low 2 bits form 8 bit video.


Artifacts in form of pattern- Eizo monitor.

pandy
28th November 2012, 14:30
Artifacts in form of pattern- Eizo monitor.

Perhaps EIZO interfere with dithering (ie internal Eizo dithering interfere with 10to8 dithering) anyway i will be delighted to see some sample snapshots. TIA!