Repository navigation
Conversation
Owner
|
I'm sorry, but it's not our job to report the reason for a backend in this manner - this heuristic would be better served by adding it to OpenCV itself. It also seems ill advised to reopen the file during an error path. I cannot accept this without substantial change in direction. If there is a way to "heal" these files then that's something I will consider but I cannot promise it will be added to PySceneDetect anyway - this does not seem like something that is a standard practice. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An MP4/MOV whose recording was cut off (camera battery died, card pulled) has no moov atom.
open_videofails with "Ensure file is valid video and system dependencies are up to date.", which sends people updating OpenCV; the real cause, "moov atom not found", only goes to OpenCV's log.When
cv2.VideoCapturecan't open a file,VideoStreamCv2now walks the file's top-level boxes and, if there is media data but no complete moov, raisesVideoOpenFailure("Video file has no index (moov atom): the recording was probably interrupted before it was saved, ..."). Everything else keeps the current message. It only runs after a failed open.Added
test_open_interrupted_recording(cutstestvideo.mp4before its moov): it fails before and passes after;tests/test_backend_opencv.pypasses and ruff is clean. Also checked on 15 cut-off and 15 healthy camera recordings (GoPro, DJI, Sony, Canon, iPhone, Android): every cut-off one gets the new message, every healthy one still opens.Written by an AI agent (Claude) on behalf of Tensorust. One yes/no: we run a repair for these files with a free preview in the browser. Would you want an optional link to it in this message or the docs, or keep it as is? Either is fine.