Taapo
Taapo

Reputation: 1987

FFMPEG - filter_complex lut file path giving problems on Windows

I'm applying a 3D to a Prores file - and when placed in the same directory as where I execute the ffmpeg command - all is working fine (multiline format for readability):

ffmpeg.exe -loglevel warning -i "E:\path\P1200226.MOV" 
-i "c:\path\watermark.png" -filter_complex 
"[0:v]scale="1280x720", 
overlay=W-w-5:H-h-5/2, 
lut3d=file=VLog_to_V709_forV35_ver100.cube,
format=pix_fmts=yuv420p" 
-codec:a copy -codec:v prores -profile:v 0 

But when I try to set a drive and pathname for the Lut file, things go wrong. I tried several formats:

lut3d=file=c:\path\VLog_to_V709_forV35_ver100.cube,
lut3d=file="c:\path\VLog_to_V709_forV35_ver100.cube",
lut3d=file='c:\path\VLog_to_V709_forV35_ver100.cube',
lut3d=file=""c:\path\VLog_to_V709_forV35_ver100.cube"",
lut3d=file="c:\\path\\VLog_to_V709_forV35_ver100.cube",

But none of them work. I get the following error:

[lut3d @ 0000021191ac0380] [Eval @ 000000bde47fe820] Undefined constant or missing '(' in 'pathVLog_to_V709_forV35_ver100.cube'
[lut3d @ 0000021191ac0380] Unable to parse option value "pathVLog_to_V709_forV35_ver100.cube"
[lut3d @ 0000021191ac0380] [Eval @ 000000bde47fe830] Undefined constant or missing '(' in 'pathVLog_to_V709_forV35_ver100.cube'
[lut3d @ 0000021191ac0380] Unable to parse option value "pathVLog_to_V709_forV35_ver100.cube"
[lut3d @ 0000021191ac0380] Error setting option interp to value pathVLog_to_V709_forV35_ver100.cube.
[Parsed_lut3d_2 @ 0000021191ac0280] Error applying options to the filter.
[AVFilterGraph @ 000002118e5751c0] Error initializing filter 'lut3d' with args 'file=c:pathVLog_to_V709_forV35_ver100.cube'
Error initializing complex filters.
Invalid argument

How do I form a correct path on Windows, so this can work?

Upvotes: 0

Views: 2080

Answers (2)

julianH
julianH

Reputation: 119

For those who found this answer but on trying it, it did not work - this worked for me

ffmpeg -i frames_1%03d.exr -vf lut3d="E\\:/Path/To/Lut/mylut.cube" ...

Note the DOUBLE forward slash after the drive

FFMpeg 4.2.3

Upvotes: 0

Taapo
Taapo

Reputation: 1987

So after testing some more, it seems that you need to modify your file path on windows to this:

lut3d=file='c\:/path/file.cube',

So basically use '', escape ":", and instead of using windows backslashes, use the linux forward slashes. A bit awkward, but it works.

Upvotes: 1

Related Questions