Log in

View Full Version : FFVideoSource + 10-bit to 8-bit


Lyris
9th February 2017, 20:51
Are the hacked versions of FFVideoSource that allow a 10-bit master to be decoded into a "stacked" format and then post-dithered still around? The latest version doesn't seem to support this.

I notice the default behavior of the new versions is to decode such files to YV16, but how are people doing 10-bit to 8-bit now?

Thanks!

sneaker_ger
9th February 2017, 21:02
Haven't seen any patched ffms2 versions more recent than 2015. But ffms2 can output >8 bit to AviSynth+ and VapourSynth. Vanilla L-Smash Works still supports "hacked" output to regular AviSynth.

Lyris
9th February 2017, 22:30
Thanks for your reply - one question though...

But ffms2 can output >8 bit to AviSynth+ and VapourSynth

How is that done with Avisynth+ ? I can't see any reference for how to handle this in the documentation. A flat color bar + gradient appears with an obvious dither 'grid' - not as good as the random dither I used to get with stacked + f3kdb - if I use this line:

ffms2("master.mov")

That gives me YV16 output. If I force YUY2 output, I get what looks like 8-bit with banding, but no dither 'gird'.

ffms2("master.mov", colorspace="YUY2")

Sorry if I'm missing something, I'm just looking for a clean 10-bit to 8-bit with adjustable dithering options, and something seems to have changed under the hood.

sneaker_ger
9th February 2017, 22:34
Could be a bug. Ask ffms2 dev.

I don't have any experience with AviSynth+ but VapourSynth with f3kdb or fmtconv work well in my experience.

FranceBB
9th February 2017, 23:23
@Lyris... "master.mov" 10bit, I assume it's an apple pro res 10bit.

Please note that many master files are 4:2:2 planar, so yv16, and not YUY2.
Probably FFMpegSource2 doesn't deliver a YUY2 output 'cause your source is 10bit 4:2:2 planar (yv16).
As to the "colorspace=" option, FFMpegSource2 tries to guess the color space when it decodes files, but it fails because you are telling it that you are dealing with 4:2:2 interleave (and it expects it to be that way) while you are actually dealing with a 4:2:2 planar.
As to the 10bit support, FFMpegSource2 is able to dither down 10bit sources, but the "hack" implemented for it hasn't been available for a while now, so if you wanna output 10bit and work with a 10bit source in avisynth, you gotta use LSMAS (which actually works very well).

Lyris
9th February 2017, 23:41
Aha! Yes, you're right - Apple ProRes 10-bit. I wasn't aware of the distinction between planar vs non-planar.

I'll look into LSmashSource. Thanks a ton!

Reel.Deel
10th February 2017, 00:21
As to the 10bit support, FFMpegSource2 is able to dither down 10bit sources, but the "hack" implemented for it hasn't been available for a while now

It has been available here (http://avisynth.nl/index.php/High_bit-depth_Support_with_Avisynth#FFMS2) for a few years now. But, instead of hacks, it's better to report the issue in the FFMS2 thread or here (https://github.com/FFMS/ffms2/issues). Hopefully it gets fixed.

mp3dom
10th February 2017, 09:22
On Avisynth+, if you want to have the old stacked way with FFMS2:

FFVideoSource("Master.mov",colorspace="YUV422P16")
ConvertToStacked()


And with LSMASH (works also on classic AviSynth)

LSMASHVideoSource("Master.mov",format="YUV422P16",stacked=true)