the methods used here work for VP9 but not H264 or H265 (thankyou @manyiceclimbers for your constructive criticism.)
#pixelated
#------------------------------------------------------
#two steps:
ffmpeg -i input.MOV -vf "scale='iw/10:-1'" scaled.MOV
ffmpeg -i scaled.MOV -vf "scale='iw*10:-1':flags=neighbor" pixeled.MOV
#-------------------------------------------------------
#https://stackoverflow.com/questions/9...
num=5
input=input.MOV
output=output.MOV
ffmpeg -i $input -filter_complex \
"[0:v] scale='iw/$num:-1', scale='iw*$num:-1:flags=neighbor'" $output
#------------------------------------------------------
to avoid errors, if your inputs have no sound remove the "-map 0:a" option
ffmpeg -i pixelated_input.MOV -i mask.png -i input.MOV -filter_complex "\
[0:v][1:v] alphamerge [tmp1];\
[2:v][tmp1] overlay [v]"\
-map "[v]" -map 0:a outpix.mp4
#------------------------------------------------
to avoid errors: make sure the division equation results in a whole number without remainders.
ffmpeg -i input.MOV -i mask.png -filter_complex \
"[0:v]split=2[out0][out1];\
[out0]scale='iw/10:-1'\
,scale='iw*10:-1:flags=neighbor'[tmp1];\
[tmp1][1:v] alphamerge [tmp2];\
[out1][tmp2] overlay [v]"\
-map "[v]" -map 0:a outpxs.mp4
#mask page:
https://superuser.com/questions/90109...
#alphamerge page:
https://hhsprings.bitbucket.io/docs/p...
#tutorial on filtergraphs:
/ ffmpeg-basic-filter-graphs
0:00 intro
0:42 pixelate using two commands
1:21 pixelate using one command and variables
2:14 3 inputs and alphamerge mask
4:14 2 inputs and alphamerge mask to pixelate area
Watch video ffmpeg pixelating and using alphamerge as a mask online without registration, duration hours minute second in high quality. This video was added by user A Forum 27 February 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 809 once and liked it 20 people.