Avidemux Forum

Avidemux => Unix-Like (Linux/Bsd/...) => Topic started by: Cacho on February 06, 2024, 02:00:39 AM

Title: Load Cube (3DLUT files) fails with Invalid file
Post by: Cacho on February 06, 2024, 02:00:39 AM
I have an OM-1 camera, and took a video with a flat profile. I have the 3D LUT files for my camera, that I downloaded from the company site.

When I try to load the .cube file with avidemux via

    Filters > Colors > 3D Lut > Load Cube

I get an error:

    Load failed: invalid file.

This is the format of the .cube file:

LUT_3D_SIZE 33

0.000000 0.000000 0.000000
0.053071 0.002243 0.002777
0.111055 0.005081 0.006271
0.150546 0.007065 0.008820
0.197253 0.008896 0.011322
0.240299 0.010163 0.013214
...

I am able to apply this .cube file with ffmpeg with this command:

    ffmpeg -i <inputfile.mov> -vf lut3d='OMSYSTEM_OM-Log400_BT2020_to_WDR_BT709_v10.cube' <outputfile.mp4>

getting a beautiful video file.

What am I doing wrong?

Sorry if this was asked before, but I was unable to find the answer.
Title: Re: Load Cube (3DLUT files) fails with Invalid file
Post by: szlldm on February 06, 2024, 06:43:45 AM
The issue caused by the cube file containing DOS/Windows newlines. This case should be already handled, but something is obviously wrong. Until it gets fixed in Avidemux, you can temporarily create a working cube file with
cat your-3dlut-file.cube | tr -d '\015' > temp.cube(this converts all DOS/Windows newlines to Unix newlines)
Title: Re: Load Cube (3DLUT files) fails with Invalid file
Post by: eumagga0x2a on February 18, 2024, 08:13:51 PM
A new appImage containing the code change by szlldm that allows 3D LUT video filter in Avidemux to handle .cube files with DOS line endings is available on the server.