Reputation: 815
I have a bunch of videos with various clips,stitched together. The clips are from moving cameras, although has the same subject and background for the duration of the clip, and often the transition between clips is fast and has no markers. I want to clip the videos as close as possible to the original state.
what algorithms/approaches work for detecting scene changes in videos? I am trying to use frame subtraction approaches, but surely there are more sophisticated approaches.
p.s. I am looking for more traditional machine vision approaches (vs. deep learning)
Upvotes: 4
Views: 3987
Reputation: 269
Mixpeek is a managed video embedding model that does scene detection
Here's an example payload you can store in your database then use the same mixpeek.embed
service for KNN
obj = {
"embedding": mixpeek.embed.video(chunk, "mixpeek/vuse-generic-v1"),
"tags": mixpeek.extract.video(chunk, ""),
"description": mixpeek.extract.video(chunk, ""),
"file_url": file_url,
"parent_id": FileTools.uuid(),
"metadata": {
"time_start": chunk.start_time,
"time_end": chunk.end_time,
"duration": chunk.duration,
"fps": chunk.fps,
"video_codec": chunk.video_codec,
"audio_codec": chunk.audio_codec
}
}
detailed writeup: https://learn.mixpeek.com/scene-detection/
Upvotes: 1
Reputation: 815
I ended up using the scene detection algorithm described here. https://www.scenedetect.com/
Hope this helps someone.
Upvotes: 6