<p>Try the command:</p>

<pre><code>ffmpeg -i in.mp4 -loop 1 -i croppedframe.jpg -an -filter_complex "[0]crop=w:h:x:y[a];[1][a]blend=difference,blackframe=90:32" -f null - 
</code></pre>

<p>This will match a movie frame if at least 90% of the pixels have a difference in value of less than 32 with the image. Any such matching frames will have their timestamps shown</p>

CC BY-SA 3.0
2016-10-18T01:58:35.053Z
2016-10-18T02:19:16.260Z
2016-10-18T02:19:16.260Z
Gyan
<p>Is there an application or online service that is able to find a position (either as a frame number or time from film beginning) in a film by a frame from that film, represented as standalone picture (even if that picture was converted, resized, cropped, etc.)? </p>

CC BY-SA 3.0
2016-10-15T08:58:58.420Z
If you leave out the cropped scenario,  then ffmpeg could do this using a combination of the blend and blackdetect filters
Gyan
CC BY-SA 3.0
2016-10-15T11:51:59.117Z
What do you mean by 'leave out the cropped scenario'?
green
CC BY-SA 3.0
2016-10-15T18:14:20.230Z
Looks possible for uncropped images
Gyan
CC BY-SA 3.0
2016-10-15T19:31:49.053Z
But if I know position (X,Y) of the cropped image in the frame, then I can crop entire film, like the frame was cropped) and make the procedure?
green
CC BY-SA 3.0
2016-10-15T19:39:57.723Z
What maximum divergence between the image and actual frame in the film, with which the input data can be processed successfully?
green
CC BY-SA 3.0
2016-10-17T05:02:55.593Z
e.g. cmd `ffmpeg-in.mp4 -loop 1 -i croppedframe.jpg -an -filter_complex "[0]crop=w:h:x:y[a];[1][a]blend=difference,blackframe=90:32" -f null -` This will match a movie frame if at least 90% of the pixels have a difference in value of less than 32 with the image. Any such matching frames will have their timestamps shown.
Gyan
<video>
Find Position in a Film/Video by a Frame
green
# Find Position in a Film/Video by a Frame

(Asked by: username_0 on 2016-10-15)

Is there an application or online service that is able to find a position (either as a frame number or time from film beginning) in a film by a frame from that film, represented as standalone picture (even if that picture was converted, resized, cropped, etc.)?

**Tags:** video

> **Comments:**
> **username_1**: If you leave out the cropped scenario,  then ffmpeg could do this using a combination of the blend and blackdetect filters  
> **username_0**: What do you mean by 'leave out the cropped scenario'?  
> **username_1**: Looks possible for uncropped images  
> **username_0**: But if I know position (X,Y) of the cropped image in the frame, then I can crop entire film, like the frame was cropped) and make the procedure?  
> **username_0**: What maximum divergence between the image and actual frame in the film, with which the input data can be processed successfully?  
> **username_1**: e.g. cmd `ffmpeg-in.mp4 -loop 1 -i croppedframe.jpg -an -filter_complex "[0]crop=w:h:x:y[a];[1][a]blend=difference,blackframe=90:32" -f null -` This will match a movie frame if at least 90% of the pixels have a difference in value of less than 32 with the image. Any such matching frames will have their timestamps shown.  

---

## 1 answers

### Answer by username_1 on 2016-10-18. Score: 0 | Accepted answer

Try the command:
ffmpeg -i in.mp4 -loop 1 -i croppedframe.jpg -an -filter_complex "[0]crop=w:h:x:y[a];[1][a]blend=difference,blackframe=90:32" -f null - 

This will match a movie frame if at least 90% of the pixels have a difference in value of less than 32 with the image. Any such matching frames will have their timestamps shown


---

