Welcome to My Linux Toy box

Experiments in Programming
              and Graphics
Social Network: Send a FB Message
768px-Facebook_logo twitter-circle-512 Reddit Logo YouTube Logo Pinterest Logo


**  YouTube/My Linux Toy Box **

How to use FFmpeg to Create Circular Round Videos

Original Video 640 x 640

Here we see the original video the size is 640px by 640px. To make the video circular overlay it with the mask 640mask.png. green video inside away from the black border.

    slides video size 640x640    Mask Size 640x640

Round Video With Greenscreen Background

Here we see the original video vids/intro-on-black.mp4 size is 1280x720 px. lets try to crop the
green video inside away from the black border.

      ffmpeg -y -i slides.mp4 -loop 1 -t 1 -i 640mask.png \
-filter_complex " \
color=#00b140:d=1[c]; \
[c][0]scale2ref[cs][v]; \
[cs]setsar=1[ct]; \
[1:v]alphaextract,negate[m];\
[m][ct]scale2ref[ms][ol];\
[ms]setsar=1[alf]; \
[ol][alf]alphamerge[fin]; \
[v][fin]overlay[fv]" \
-map "[fv]" -map 0:a? -t 10 -y greenoutput1.mp4
    Different mask same size 640x640   





Flag Counter
Symptoma.ro