(old) using ffmpeg all 33 blend modes-I've made an updated version

  Рет қаралды 1,525

A Forum

A Forum

Күн бұрын

Пікірлер: 13
@Astroni800
@Astroni800 3 жыл бұрын
Try to convert both streams to gbrp color format, like: ffmpeg -i video.MOV -i imager.png -filter_complex "[0:v]format=gbrp[f0],[1:v]format=gbrp[f1],[f0][f1]blend=all_mode=addition" addition.MOV Then the modes work as expected.
@aforum4459
@aforum4459 3 жыл бұрын
thankyou very much :) yep it worked
@Astroni800
@Astroni800 3 жыл бұрын
@@aforum4459 Well, I've been looking for it for a few days, it's about time it finally worked
@SreenikethanI
@SreenikethanI 2 жыл бұрын
Hello, I tried something similar i.e. converting to rgb24 and then applying the blend filter, and it had worked for me too. Do you have any idea why is this the case? And why the original (here, yuv pixel format) doesn't suffice?
@aforum4459
@aforum4459 3 жыл бұрын
00:00 intro 00:35 ‘addition’ 00:46 ‘and’ 00:57 ‘average’ 01:08 ‘burn’ 01:19 ‘darken’ 01:30 ‘difference’ 01:41 ‘divide 01:52 ‘dodge’ 02:03 ‘exclusion’ 02:14 ‘extremity’ 02:25 ‘freeze’ 02:36 ‘glow’ 02:47 ‘grainextract’ 02:58 ‘grainmerge’ 03:09 ‘hardlight’ 03:20 ‘hardmix’ 03:31 ‘heat’ 03:42 ‘lighten’ 03:53 ‘linearlight’ 04:04 ‘multiply’ 04:15 ‘multiply128’ 04:26 ‘negation’ 04:37 ‘normal’ 04:48 ‘or’ 04:59 ‘overlay’ 05:10 ‘phoenix’ 05:21 ‘pinlight’ 05:32 ‘reflect’ 05:43 ‘screen’ 05:54 ‘softlight’ 06:05 ‘subtract’ 06:16 ‘vividlight’ 06:27 ‘xor’
@SreenikethanI
@SreenikethanI 2 жыл бұрын
Hello! I'd like to know why the *difference* filter at 1:30 creates a green tint to the output? I'm trying to experiment removing a static background from a video. Let's take the video's first frame as the reference static background, (and assume that the camera was being held still). When I just tried to blend=all_mode=difference alone without any format conversion, I ended up getting a green tint too, like you have shown at 1:30. Now, I tried this sequence of filters: 1) Convert input to rgb24, and *split* into two outputs [a] and [b] 2) Get *first frame* from [a] and store it as [first] 3) *blend* [b] and [first] with difference filter, then convert to *format=rgb24*, then again convert to *format=yuv420p* (yes, in that order, and yes rgb24 is done *again* even though it was done in step 1) 4) Save result as mp4 file This results in that green tint *NOT* appearing anymore! Do you have any idea why this fixes the issue? Is there a more proper way to achieve this rather than converting between pixel formats a buncha times? If possible you may try this yourself by recording a video with your camera held in a stationary position (in a tripod, for example) or with your laptop webcam, and run the command for the above sequence of filters: ffmpeg -i in.mp4 -filter_complex "[0:v]format=rgb24,split=2[a][b]; [a]trim=start_frame=0:end_frame=1[first]; [b][first]blend=all_mode=difference, format=rgb24, format=yuv420p[vf]" -map "[vf]" -y out.mp4 -hide_banner Please let me know your results! Thanks a lot!
@SreenikethanI
@SreenikethanI 2 жыл бұрын
Oh well, I just saw your second video at kzbin.info/www/bejne/aHS3aJtvnpd4p80 😃
@aforum4459
@aforum4459 2 жыл бұрын
Hi thanks for your message. I tried the command but I think my camera may have been moving so I didn't have a static background so it didn't work, I will try it again when I have a better video to try it on. This is something I've also been interested in. There is also this person that I found, hope this is helpful, www.arj.no/2020/02/21/image-masks/
@SreenikethanI
@SreenikethanI 2 жыл бұрын
@@aforum4459 thanks for the reply and the article link! the article seems to be pretty much what i was trying to do :D
@SreenikethanI
@SreenikethanI 2 жыл бұрын
I'm yet to be experienced with ImageMagick so I'll read some articles on it
@aforum4459
@aforum4459 2 жыл бұрын
@@SreenikethanI glad I could help. :)
@aforum4459
@aforum4459 3 жыл бұрын
I've made a github file with this and the newblend video code in one file. github.com/afrum/my_ffmpeg/blob/main/Blend
using ffmpeg to draw a grid on your video
6:13
A Forum
Рет қаралды 570
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 200 МЛН
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 61 МЛН
Disrespect or Respect 💔❤️
00:27
Thiago Productions
Рет қаралды 39 МЛН
FFmpeg in 100 Seconds
2:20
Fireship
Рет қаралды 610 М.
Has Google Created Sentient AI?
15:07
PowerfulJRE
Рет қаралды 4,1 МЛН
10 AI Animation Tools You Won’t Believe are Free
16:02
Futurepedia
Рет қаралды 368 М.
Virtual Production at Home with an iPhone and TV - Unreal Engine
11:17
Krita - 5 common reasons my brush doesn't work
9:34
A Forum
Рет қаралды 215
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 200 МЛН