Opened 9 years ago

Last modified 8 years 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

Description

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 9 years ago.
Video surrounded by motionless pictorial belt

Download all attachments as: .zip

Change History (3)

by pat284e, 9 years ago

Attachment: VideoWithPictorialBelt.mp4 added

Video surrounded by motionless pictorial belt

comment:1 by Carl Eugen Hoyos, 9 years ago

Component: undeterminedavfilter
Keywords: cropdetect added; "motionless pictorial belt" "pictorial outer frame" "pictorial outer rim" "motion-based cropdetect" "motionlessness-based cropdetect" removed
Priority: normalwish
Version: 2.7git-master

comment:2 by Elon Musk, 8 years ago

-vf tblend=all_mode=difference,cropdetect

Note: See TracTickets for help on using tickets.