Hi! So…
I’ve been playing with Blender’s EXR files and FFMPEG for a while now. Since EXRs are by far the fastest to write/read and carry all the data I can ever need at some point, and also can be as lightweight as needed.
Though ultimately, they are not simple 8bits sRGB jpegs, so I have to somehow deal with the color transforms to keep my color work as is. And when using multilayer EXR, ffmpeg simply can’t recognize the channels at all.
So… Two questions:
- What’s the best transform method? Or better: is there a way to use Blender’s OCIO config in ffmpeg?
- How to deal with multilayer files ? It’s half the reason why I want to use EXR in the first place, so it would be cool to make it work.
Detailed explanations:
In the past I came up to this solution for converting with ffmpeg:
ffmpeg ^
-apply_trc iec61966_2_1
-framerate 24 ^
-start_number 1 ^
-i "frames_%%03d.exr" ^
-c:v libx265 -pix_fmt yuv420p -crf 23 ^
-tune fastdecode ^
"%~p1%~n1.mkv"
The important part here is -apply_trc iec61966_2_1
which is - so far - the color transform giving the closest result from what I do in Blender. Still not the same though.
Just today, I’ve found I could use -gamma 2.2
instead. After a few very quick tests, it seems to give closer results (and it’s an option I can actually easily memorize, so that’s cool). Though I’d need to do deeper tests to see how close it is.
Now, the issue is, … I can use ffmpeg only on simple EXR files, not on EXR multilayer files. The reason being, it seems ffmpeg can’t figure out which channels are what:
[exr @ 000001a6b639df80] Unsupported channel Composite.Combined.A.
[exr @ 000001a6b639df80] Unsupported channel Composite.Combined.B.
[exr @ 000001a6b639df80] Unsupported channel Composite.Combined.G.
[exr @ 000001a6b639df80] Unsupported channel Composite.Combined.R.
[exr @ 000001a6b639df80] Unsupported channel Main.AO.B.
[exr @ 000001a6b639df80] Unsupported channel Main.AO.G.
[exr @ 000001a6b639df80] Unsupported channel Main.AO.R.
[exr @ 000001a6b639df80] Unsupported channel Main.Combined.A.
[exr @ 000001a6b639df80] Unsupported channel Main.Combined.B.
[exr @ 000001a6b639df80] Unsupported channel Main.Combined.G.
[exr @ 000001a6b639df80] Unsupported channel Main.Combined.R.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject00.A.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject00.B.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject00.G.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject00.R.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject01.A.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject01.B.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject01.G.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject01.R.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject02.A.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject02.B.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject02.G.
[exr @ 000001a6b639df80] Unsupported channel Main.CryptoObject02.R.
[exr @ 000001a6b639df80] Unsupported channel Main.Debug Render Time.X.
[exr @ 000001a6b639df80] Unsupported channel Main.Debug Sample Count.X.
[exr @ 000001a6b639df80] Unsupported channel Main.Denoising Albedo.B.
[exr @ 000001a6b639df80] Unsupported channel Main.Denoising Albedo.G.
[exr @ 000001a6b639df80] Unsupported channel Main.Denoising Albedo.R.
[exr @ 000001a6b639df80] Unsupported channel Main.Denoising Depth.Z.
[exr @ 000001a6b639df80] Unsupported channel Main.Denoising Normal.X.
[exr @ 000001a6b639df80] Unsupported channel Main.Denoising Normal.Y.
[exr @ 000001a6b639df80] Unsupported channel Main.Denoising Normal.Z.
[exr @ 000001a6b639df80] Unsupported channel Main.Depth.Z.
[exr @ 000001a6b639df80] Unsupported channel Main.Noisy Image.A.
[exr @ 000001a6b639df80] Unsupported channel Main.Noisy Image.B.
[exr @ 000001a6b639df80] Unsupported channel Main.Noisy Image.G.
[exr @ 000001a6b639df80] Unsupported channel Main.Noisy Image.R.
[exr @ 000001a6b639df80] Missing red channel.
[exr @ 000001a6b639df80] Missing green channel.
[exr @ 000001a6b639df80] Missing blue channel.
Error while decoding stream #0:0: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished