LUT application?

Questions and answers on how to get the most out of FFAStrans
Post Reply
bradphippsnz
Posts: 1
Joined: Wed Apr 06, 2016 9:59 pm

LUT application?

Post by bradphippsnz »

Is there a way to apply a custom LUT to a file when transcoding? We've just started using FFAStrans and noticed the files are coming into the Avid a lot flatter than files directly imported through an Avid client.

We're transcoding files from GoPro and AVC-Intra to DNxHD 36.

Thanks in advance.
admin
Site Admin
Posts: 1658
Joined: Sat Feb 08, 2014 10:39 pm

Re: LUT application?

Post by admin »

Currently there is no way to do that other that creating you own "Custom FFmpeg"-preset og "Custom AviSynth-script"-preset. I will however take a look at the DNx-encoder and see if there is anything that's bit off.

-steipal
davep
Posts: 14
Joined: Mon Jan 14, 2019 11:52 am

Re: LUT application?

Post by davep »

Resurrecting this - I'd be interested in this as well - If we used custom FFmpeg/AviSynth scripts to integrate a LUT, would it be possible to still wrap the resulting video into an Avid ready MXF? I'm wondering if there's a way to manually recreate the BMX work that the DNxHD module does but in other scripts?
User avatar
FranceBB
Posts: 230
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: LUT application?

Post by FranceBB »

What do you mean?
Avisynth is a frameserver and as such it creates an uncompressed A/V stream which has to be encoded, you can't remux it.
If you mean just to encode it and use BBC BMX to then remux the newly created MXF, then you can do so by specifying the muxer in the encoder node.
As to the Avisynth syntax, it's pretty easy, just use something like this in a custom Avisynth node:

Code: Select all

c=ConvertBits(m_clip, bits=16)

rgb=ConvertToPlanarRGB(c)

lut=Cube(rgb, "yourLUT.cube")

yuv=Converttoyuv444(lut)

m_clip=ConvertBits(yuv, bits=8, dither=1)

return m_clip
You can use "Converttoyuv" to convert back to your desired YUV output (4:2:0 planar - 4:2:2 planar/interleaved - 4:4:4 planar).
Keep in mind that working with 16bit precision is required to avoid banding artifacts.
Besides, if your output is 8bit, I suggest you to add ConvertBits(bits=8, dither=1) to use the Floyd-Steinberg error diffusion instead of truncating the 16bit precision result.
You can get the "Cube" filter from here: https://forum.doom9.org/showthread.php?t=175552

Cheers,
Frank.
Post Reply