question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not read frame

See original GitHub issue

Hi @arunponnusamy

I am trying to run object_detection_webcam.py.

[ WARN:0] videoio(MSMF): OnReadSample() is called with error status: -1072875772 [ WARN:0] videoio(MSMF): async ReadSample() call is failed with error status: -1072875772 [ WARN:1] videoio(MSMF): can't grab frame. Error: -1072875772 Could not read frame

It is unable to read the frame. Could you help me understand what went wrong?

Thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:31 (13 by maintainers)

github_iconTop GitHub Comments

6reactions
arunponnusamycommented, Oct 3, 2018

Hello @shrybht ,

object_detection.py accepts an input image to apply object detection. Usage is mentioned at the top of the file as comment.

# object detection example
# usage: python object_detection.py <input_image> 

Regarding object_detection_webcam.py, I guess the issue is in accessing webcam at platform level. Are you working with Windows ?

Have a look at this issue on OpenCV forum.

Try replacing cv2.VideoCapture(0) with cv2.VideoCapture(cv2.CAP_DSHOW). Let me know if it works.

1reaction
OmkarVedakcommented, Jan 28, 2019

Hello @shrybht and @bogdan245 , I have fixed an issue in the config file. I think now it should work as expected. Delete .cvlib folder in the home directory(~) and try now. Let me know if you still face issue.

Where can I find .cvlib folder in windows?

Read more comments on GitHub >

github_iconTop Results From Across the Web

RuntimeError: Could not read frame: · Issue #168 - GitHub
Trying to run: imageio.mimread('http://techslides.com/demos/sample-videos/small.mp4') I get: Traceback (most recent call last): File " " ...
Read more >
RuntimeError: Frame is 0 bytes, but expected 691200
Try to reupload the file and then try it again. If this doesn't solve the issue try changing the video fps and bitrate...
Read more >
Frame reading errors with ffmpeg - Google Groups
mimread(*args) but it returned a "CannotReadFrameError", reading 0 bytes against an expected n bytes. I've noticed that it was always the 1400th frame...
Read more >
Error: could not read video frame (-101) - DCP-o-matic
Hi, I'm trying to transcode an encrypted 4K DCP to an open 4K DCP, but I keep getting the error message mentioned in...
Read more >
imageio.plugins.ffmpeg
Default None (i.e. read at the file's own fps). One can use this for files with a variable fps, or in cases where...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found