Opened 2 years ago

Last modified 22 months ago

#4719 new enhancement

ffmpeg feature request: new cropdetect based on motionlessness

Reported by: pat284e Owned by:
Priority: wish Component: avfilter
Version: git-master Keywords: cropdetect
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


The filter "cropdetect" is helpful to crop off black rectangular rim or black outer belt. However, I need to crop off a motionless pictorial belt that surrounds a motionful video content. A motionless pictorial belt that surrounds a motionful video content may be thought of as a big still picture into which a small video is overlaid. (Note that the size and location of the small video inside the big picture is steady and immutable.)

So, I need a new different kind of "cropdetect" that works based on motionlessness but not on blackness.

I will try to attach or upload an example video. Here is the code that composed the sample video.

ffmpeg -f image2 -loop 1 -t 6 -thread_queue_size 500 -i BigPicture?.png -i SmallVideo?.mp4 -filter_complex "overlay=140:50" -vcodec h264 VideoWithPictorialBelt?.mp4

What I need is to extract the small video by removing the surrounding motionless pictorial belt. I need some automatic detection of appropriate parameters for the crop, when I do not know the parameters or when it is difficult for me to find the parameters.

Key words: "motionless pictorial belt", "pictorial outer frame", "pictorial outer rim", "motion-based cropdetect", "motionlessness-based cropdetect"

Attachments (1)

VideoWithPictorialBelt.mp4 (771.1 KB) - added by pat284e 2 years ago.
Video surrounded by motionless pictorial belt

Download all attachments as: .zip

Change History (3)

Changed 2 years ago by pat284e

Video surrounded by motionless pictorial belt

comment:1 Changed 2 years ago by cehoyos

  • Component changed from undetermined to avfilter
  • Keywords cropdetect added; "motionless pictorial belt" "pictorial outer frame" "pictorial outer rim" "motion-based cropdetect" "motionlessness-based cropdetect" removed
  • Priority changed from normal to wish
  • Version changed from 2.7 to git-master

comment:2 Changed 22 months ago by richardpl

-vf tblend=all_mode=difference,cropdetect

Note: See TracTickets for help on using tickets.