Blending Frames Individually with one Effect


I’m stuck trying to blend an effect to a mp4 file in GMIC. I created some scanlines to a blank image the same size of the frames in the video and I would like to blend those lines to each frame.

gmic file.mp4 +mul[-1] 0 -scanlines[-1] 60,4,0,0,0 blend[^-2] dodge o output.mp4

Reading the commands afterwards shows that the blend command blends all the frames together. How could I blend each frame to that last one individually. As usual I bet its a simple keystroke that I just cannot find on the website. Figures…

Thanks for the help!

Blend has two modes. See: Use

[layer],blending_mode,_opacity[%],_selection_is={ 0=base-layers | 1=top-layers } 

Thanks you afre!

I’m having a hard time figuring out how to write this in the terminal.

Just now playing around I finally got the opacity to change. I’m still stuck on that last part.

blend[-1] dodge,[50],???

And studying it a little more, is the selection_is an equation? Man it’s a slow learning process.

Thanks again! I’ll be at work today so I won’t be able to play around with it till later.

Something like this.

gmic file.mp4 +mul 0 scanlines. 60,4,0,0,0 blend.. .,dodge rm. o output.mp4

About selections, you may omit the first one because there is only one item in the list. Dot notation is a shortcut for selections up to 3 dots ... = [-3].

G’MIC moved away from dash command syntax (scanlines).

_selection_is is a convenience function for the GUI plugin, where you don’t have to reorder the layers manually in the host app.

I figured it out!

blend.. .,dodge got only the second to last image to blend with the last one. But I saw adding that dot and comma before dodge got it to select the base layer. So I tried

blend .,dodge

Which successfully returned this:

Blend images [0,1,2,(...),1676,1677,1678] with base layer

Thanks @afre! Now to figure out how to animate these effects. Wish me luck!

Force of habit treating the input as an image, but you are quite right.

Good luck. :smile_cat:
And if it goes well, perhaps share a snippet of what you are up to.