TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

PySceneDetect – A tool for detecting scenes in movies

187 pointsby josefslerkaover 5 years ago

12 comments

spapas82over 5 years ago
My PhD (before 10+ years) was in video search and one of the proposed methods for video comparison was using the shot durations of the video. Notice that with <i>shots</i> I refer to cuts in the camera flow, IIRC hollywood movies have a such a shot cut every 4 seconds as an average (for example when two people talk the camera will move from one person to the other).<p>I remember that I used two techniques for extracting scene cuts:<p>* Difference in the brightness (Y) histogram of the YUV video between frames; when that difference is more than a threshold there&#x27;s a scene cut<p>* Counting the number of Intra macroblocks per frame on an H.264 encoded video; if that number was more than a threshold then there&#x27;s a scene cut
评论 #20853054 未加载
评论 #20852093 未加载
spepsover 5 years ago
Can the link be changed to the home page of the docs instead of the CLI params one? <a href="https:&#x2F;&#x2F;pyscenedetect.readthedocs.io&#x2F;en&#x2F;latest&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pyscenedetect.readthedocs.io&#x2F;en&#x2F;latest&#x2F;</a>
评论 #20852655 未加载
Breakthroughover 5 years ago
Author of PySceneDetect here: Thank you all for the thought-provoking discussions, and the attention you&#x27;ve given my side project. There are some specific cases where PySceneDetect achieves great accuracy (like fast cuts or fades), and some where it&#x27;s currently not so good at (like sudden flashes or large obstructions). That being said I do want to track these things and come up with solutions to improve the robustness of the content detection algorithm over time.<p>I&#x27;m most open to any feedback or feature requests&#x2F;ideas&#x2F;suggestions; feel free to checkout the issue tracker on Github, or create a new entry:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;Breakthrough&#x2F;PySceneDetect&#x2F;issues" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Breakthrough&#x2F;PySceneDetect&#x2F;issues</a><p>Some ideas being considered&#x2F;researched for future releases:<p>- looking at changes to image histograms<p>- using edge detection to improve robustness<p>- camera flash &#x2F; foreground object suppression<p>- automatic threshold detection using statistical methods (currently is just a heuristic)
评论 #20855209 未加载
Quarrelover 5 years ago
So I can look forward to a &quot;Next scene&quot; shortcut in my video player of choice soon? (Without needing embedded &quot;DVD&quot; chapters) While also getting nice thumbnails for them?<p>Pornhub et al often show scene markers, but I have assumed they&#x27;re manual or extracted in the same way as DVD chapters.
Hamukoover 5 years ago
Tested it out on an anime episode to see if it could detect accurately when the opening and closing credits play. It seemed to be able to detect the ending of both even with a high threshold, but it didn&#x27;t really detect the start. And with a low threshold, it gave me like 350 chapters for a 22 minute video, which seemed a bit excessive.
评论 #20853123 未加载
achowover 5 years ago
Little off topic..<p>I&#x27;m trying to help a friend in media industry. His requirement is ability to identify different voice in a movie and have the output time stamped - Ex. Voice A: 00.00.00sec - 00.05.30sec, Voice B: 00.05.31 - 00.06.30, etc.<p>It would be very helpful if anyone can point to any tools that exists that can do that (open source or otherwise).
评论 #20853207 未加载
评论 #20852131 未加载
genpover 5 years ago
I&#x27;ve used this tool for breaking up movie trailers and old Vines. I really didn&#x27;t like the output quality.<p>I ended up using optical flow and key frame information instead.
评论 #20852956 未加载
评论 #20854713 未加载
dariosalvi78over 5 years ago
This was my assignment in the &quot;artificial intelligence&quot; course I took at my University in Naples (Italy) in 2003. My NN could recognise scenes cuts with about 50% probability :)
Daubover 5 years ago
a Film is a collection of shots, scenes and sequences. Shots are fairly easy to detect. Most editing software comes with built in shot detection.<p>This approach promises to detect scenes. I’m not enough of a coder to know if it is valid, but I can certainly imagine that it is a solvable problem. Most scenes are defined by location, and movies makers like each locatation to be distinct from the preceding one.<p>To my mind, sequences are where the action is at. Sequences are defined by narrative development... These can usually be defined by a trained human, but are probably tough to computationly define.<p>There is also a huge difference between film genres. The scenes and sequences of Finding Nemo are pretty easy to define. But you try the same approach on an art house film like The Scent of Green Papaya, and see how far you get.<p><a href="https:&#x2F;&#x2F;www.helpingwritersbecomeauthors.com&#x2F;movie-storystructure&#x2F;finding-nemo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.helpingwritersbecomeauthors.com&#x2F;movie-storystruc...</a>
评论 #20851339 未加载
评论 #20851924 未加载
评论 #20851699 未加载
评论 #20851591 未加载
评论 #20851290 未加载
评论 #20851905 未加载
评论 #20851726 未加载
jimmaswellover 5 years ago
Odd, scene differentiations often seemed like arbitrary slices just meant for trying to get to a certain point in the movie, long ago when I&#x27;d look at them on DVD&#x27;s. Not something where you could objectively say &quot;this is where one scene ends and another begins&quot; and others would come to the same conclusion on their own.
natmakaover 5 years ago
Can it detect subliminal frames? Would an adequate threshold also lead to many false positives (triggering on any brutal massive change, for example a blast-inducing explosion)?
评论 #20851371 未加载
评论 #20853019 未加载
nabeardsover 5 years ago
Testing with some older black and white shows, results aren&#x27;t accurate to catch fades-to-black. Any options I should be playing with?
评论 #20857047 未加载