-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Detection of VP9 Encoded Video #86
Comments
Hmm at first glance I don't think there's much I can do about this, using OpenCV currently for all video I/O. That being said, it may be worth trying to compile OpenCV yourself manually, but using a newer version of ffmpeg, and seeing if you get any different results after that. If anyone else runs into this issue, feel free to share your experiences here as well. And of course, if anyone has any suggestions on how to approach this issue, any ideas are most welcome. Thanks for the report, @wjs018. |
Added to the backlog for now. I'm especially interested to see if I can replicate what you're seeing, and if I can get that behavior to change with a different decoder or version (e.g. GStreamer vs ffmpeg). Thanks for the test script as well, that will indeed come in handy! |
TODO: |
I'm hoping that #213 will help to resolve this by allowing more video backends for input. That being said, I'll make sure to at least reproduce locally and make sure to add a script/test case to the repo, but this probably won't make the v0.5.6 release. Will at least post an update before bumping the target release though. |
Am able to reproduce locally, thanks for the script. One thing that I noticed is the returned value of CAP_PROP_FOURCC is zero for some reason, which should allow for printing a warning. Very strange, however, that it can't read all the frames using the same backend. Indeed this appears to be an OpenCV bug, however I wasn't able to find any bug reports for this in the OpenCV repo. Since OpenCV can't detect the right FourCC code, it makes me wonder if it might be due to how the While #213 will likely resolve this issue for most users, further investigation is still warranted to improve the error message. In the meantime, however, I'll add a warning whenever the FourCC code is detected to be zero, and indicate that the video may not be processed correctly. Thanks for the report! |
Added improved error messaging in this case before detection begins as per the commit referenced above. Thanks @wjs018! |
Marking as known issue, re-opening, and moving to v1.0, as this should also be resolved once #213 is completed. |
With the latest version of OpenCV, this seems to work ok now, but not with the one I have for the Windows build yet. With the latest v0.6 release, this should work at least by specifying |
Bug/Issue Description:
I have found that vp9 encoded videos are not analyzed correctly. Scenes are not detected at the right times and a portion of the video is not detected at all.
Required Information:
Provide the following information to assist with reporting the bug:
I have made a proof-of-concept script to reproduce the result on my system. It downloads and analyzes the same video from youtube in two different formats. One copy has vp9 encoded video and the other has avc encoded video.
Note:
youtube_dl
is needed to run the script.The relevant output is as follows:
-v debug -l BUG_REPORT.txt
to the beginning of the command, then re-run PySceneDetect and attach the generatedBUG_REPORT.txt
file.I am using the python interface, not the cli.
Expected Behavior:
A clear and concise description of what you expected to happen.
I expected the two copies of the same video with different encodings to result in the same detected scene breaks. Also, that the same number of frames are analyzed as both versions of the video are the same framerate.
Computing Environment:
Additional Information:
Add any other information you feel might be relevant to the bug/issue report but was not covered in one of the previous categories.
I am not sure whether this is a scenedetect issue or a larger OpenCV issue. Feel free to close this if it is out of your control. I have just been banging my head against this problem for a while until I finally figured out why some videos would work and some wouldn't.
The text was updated successfully, but these errors were encountered: