Hi,can you give me the correct arg for ffmpeg 6.0 this one has errors: ffmpeg -i "input.mkv" -filter_complex "
color=black:d=3006.57:scale=2560:1440:r=24000/1001,
geq=lum_expr=random(1)256:cb=128:cr=128,
deflate=threshold0=15,
dilation=threshold0=10,
eq=contrast=3,
scale=2560x1440 [n];
[0] eq=saturation=0,geq=lum='0.15(182-abs(75-lum(X,Y)))':cb=128:cr=128 [o];
[n][o] blend=c0_mode=multiply,negate [a];
color=c=black:d=3006.57:s=2560x1440:r=24000/1001 [b];
[1][a] alphamerge [c]" -c:v libx264 -tune grain -preset veryslow -crf 12 -y Output-1080p-Grain.mkv : give your best guess ,thanks very much.
Assistant
It looks like the ffmpeg command you've provided has multiple issues with the filter_complex syntax and potentially mismatched stream references. Let me help clarify and reconstruct the ffmpeg command based on the effects described in your filter_complex.
Here's a broken-down and corrected version of your ffmpeg command:
Start by defining the input and pointing out that the entire output uses color and scale filters to match the source.
Since your command also involves blending effects, we need to make sure all overlays and streams properly align in resolutions and frame rates.
Clarify the use of the blend, alpha merge, and additional video effects like eq (equalizer), geq (generic equation) filters.
Correct stream references which might be mismatched. ffmpeg uses stream specifiers like [0:v] to refer to the video stream of the first input, and any custom labels [tag] assigned in filter_complex to manage multiple video streams/effects.
Based on the command you posted, improved and clarified version might look like this:
Input Stream Handling & EQ: Your first part in filter_complex adjusts the initial video saturation and luminance, then scales to 2560x1440.
Duplication: split filter is used to create two identical streams for further processing.
Effect Application: The first half goes through a geq for random luminance, then deflate, dilation, and eq filters for contrast adjustments.
Blending: The two processed streams [v1b] and [v2] are then blended together.
Color and Alphamerge: A solid black color input is generated, against which the blend output is then alpha-merged.
Notes:
The frame rate (r=24000/1001) and duration d should coincide with your intentions for output duration and preciseness.
Ensure that your pixel formats do not clash; certain operations might change the format unexpectedly.
Adjust parameters as per the actual effect intentions, and ensure to check if any syntax error shows up during execution due to ffmpeg version compatibility or other issues.
Always consider testing parts of the filter_complex separately to make debugging easier and more manageable.