Open szcf-weiya opened 2 years ago
geeqie
, which can show the pixel coordinate of the cursor, determine the start position (left corner) and the width and height of the region to be blurffmpeg -i test.mp4 -filter_complex "[0:v]crop=210:20:47:233,avgblur=20[fg];[0:v][fg]overlay=47:233[v]" -map "[v]" -map 0:a -c:v libx264 -c:a copy -movflags +faststart test2.mp4
where
210:20:47:233
indicates the start position is at (47, 233)
, and the (width, height)
are 210x20
overlay
means that we crop the region and blur it and finally overlay on the original figuresee also: https://superuser.com/questions/901099/ffmpeg-apply-blur-over-face
similarly, we add another mosaic region,
ffmpeg -i test2.mp4 -filter_complex "[0:v]crop=142:20:372:212,avgblur=20[fg];[0:v][fg]overlay=372:212[v]" -map "[v]" -map 0:a -c:v libx264 -c:a copy -movflags +faststart test3.mp4
since the right corner is empty, so crop them out
ffmpg -i test3.mp4 -filter:v "crop=680:630:1:1" -c:a copy test4.mp4
the resulting video is here
second way to speed up
https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
However, it might throw the following error,
refer to https://stackoverflow.com/questions/57903639/why-getting-and-how-to-fix-the-warning-error-on-ffmpeg-not-enough-frames-to-es
try
otherwise, it might behave like![Peek 2022-07-07 21-57](https://user-images.githubusercontent.com/13688320/177791561-0a2863f8-e437-4117-9d52-2719703869f4.gif)
but note that in this method, the size of the video would not decrease, i.e., no loss.
see also: https://zhuanlan.zhihu.com/p/142593316