-
Notifications
You must be signed in to change notification settings - Fork 0
app-swt-detection (and also bake-swt-visaid) produces hundreds of lines of text output when encountering decode problems #307
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
Comments
This is probably a duplicate of clamsproject/app-swt-detection#67, which I just closed a couple days ago due to me being unable to reproduce the messages using the same file reported in that old issue. For video seeking operations, the app uses |
For a stopgap, since the video_document_helper uses opencv to handle video files, which in turn wraps ffmpeg for low-level operations, setting
should do that. For a long-term solution, I'm trying to redirect the ffmpeg error/warning messages to a python string so that we can record that as a part of output MMIF. |
An example output MMIF from experimental implementation: Not sure we want to keep all the messages from the ffmpeg, that can potentially be thousands of lines (or more), but at the same time, I don't want to deal with trimming or re-organizing ffmpeg errors into a more concise format (I just don't believe that should be our responsibility or discretion). One idea we can implement on the clams-python SDK side is to provide a global parameter (just like |
With current implementation in #308, error messages from ffmpeg/opencv during video frame extraction are captured but not thrown as python warnings (so that they can be written to a "warning" view), unless the client using frame extraction method tell so. |
For the reference, here's another MMIF output from the HEAD of #308. As shown in "{message : UserWarning('Frame #90098 (3006.272939606273s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}",
"{message : UserWarning('Frame #90105 (3006.5065065065064s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}",
"{message : UserWarning('Frame #90113 (3006.7734401067737s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}",
"{message : UserWarning('Frame #90120 (3007.007007007007s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}",
"{message : UserWarning('Frame #90128 (3007.273940607274s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}",
"{message : UserWarning('Frame #90135 (3007.5075075075074s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}",
"{message : UserWarning('Frame #90143 (3007.7744411077747s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}",
"{message : UserWarning('Frame #90150 (3008.0080080080083s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}",
"{message : UserWarning('Frame #90158 (3008.274941608275s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}",
"{message : UserWarning('Frame #90165 (3008.508508508509s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}",
"{message : UserWarning('Frame #90173 (3008.7754421087757s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}",
"{message : UserWarning('Frame #90180 (3009.0090090090093s) could not be read from the video d1 @ file:///home/krim/cpb-aacip-0b2dcf6b574.mp4 .'), category : 'UserWarning', filename : '/home/krim/Dropbox/Projects/clams/clamsproject/mmif-python/mmif/utils/video_document_helper.py', lineno : 103, line : None}", Also note that current release version of the SDK has a bug in that when it encounters an error while trying to pull out an image from a list of sampled frame numbers, it essentially stops processing the rest of the video. a12a17e in #308 fixes the problem. |
Notes from the meeting yesterday;
|
Several additional videos exhibiting the relevant kind of corruption are in this Google Drive folder. |
Bug Description
When I run app-swt-detection on cpb-aacip-0b2dcf6b574.mp4, it finishes successfully, but there are many hundreds (thousands?) of lines of error/diagnostic output.
I think this is due to encountering a decode error. I have encountered this problem only about 10 times (out of tens of thousands of runs). I can supply additional media files if necessary.
Reproduction steps
Run app-swt-detection on [cpb-aacip-0b2dcf6b574.mp4]. Look at output.
(It may be necessary to set the tp sampling interval to something low, like 250ms.)
Expected behavior
Ideally, it just logs a warning once and moves on.
Log output
Screenshots
No response
Additional context
For the same videos that cause this error, I have had problems with
visaid_builder
also. At first, they caused crashes, until I started handling decode errors. I also started supressing extra output.However, I think there's an additional factor. I think the amount of output depends on the version of PyAV being used. I think that maybe using PyAV 13 instead of 12 might quell most of this output.
The text was updated successfully, but these errors were encountered: