Skip to content
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

Error getting frames #124

Open
mnicolas94 opened this issue Jan 6, 2021 · 9 comments
Open

Error getting frames #124

mnicolas94 opened this issue Jan 6, 2021 · 9 comments

Comments

@mnicolas94
Copy link

mnicolas94 commented Jan 6, 2021

Hi,
I have an issue with a video that plays fine, but when i try to get some frames it rises the following error:
decord._ffi.base.DECORDError: [10:27:30] C:\projects\decord-distro\decord\src\video\video_reader.cc:641: Error getting frame at: 0 with total frames: 199

I'm using decord version 0.4.2 installed from pypi, python 3.6.6 on Windows 10. I can't upload the video for confidenciality reasons, but this is ffprobe diagnose info:

Input #0, avi, from 'C:\file.avi':
  Metadata:
    software        : MEncoder SVN-r33883(20110719-gcc4.5.2)
  Duration: 00:00:20.10, start: 0.000000, bitrate: 3601 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 1280x1024 [SAR 1:1 DAR 5:4], 3652 kb/s, SAR 65536:65535 DAR 16384:13107, 10 fps, 10 tbr, 10 tbn, 10 tbc

I'm using VideoReader.get_batch() function when i get this error. Also, when i use VideoReader.next() function it returns None. And when i use VideoReader.seek(0) function i get: RuntimeError: Failed to seek to frame 0 and the same for VideoReader.seek_accurate(). When i open the video file with VideReader.open() function, i get a warning message: [11:52:27] C:\projects\decord-distro\decord\src\video\video_reader.cc:277: Failed to seek file to position: 0

I think is a similar problem to #83 issue, but i'm not getting the same error messages. How could i solve this?

Thanks in advance.

EDIT:
It seems to be the same problem as #100, however i dont understand how to solve it.

@ChristianEschen
Copy link

I got a similar error:

vr = VideoReader(path, ctx=cpu(0))
for i in range(len(vr)):
frame = vr[i]
[15:11:50] /io/decord/src/video/video_reader.cc:280: Failed to seek file to position: 0

I am on linux...

@YuqiHUO
Copy link

YuqiHUO commented Feb 18, 2021

hi,
have u tried to update the version to solve the bug? It worked for me in #100

@YuqiHUO
Copy link

YuqiHUO commented Feb 18, 2021

seems the author change the modification back...
b5b7ae5#diff-ddafbe9a39091de800c878a0bcff64fc77f265fe90f96a11ef1bf00fc88804c3

@mnicolas94
Copy link
Author

hi,
have u tried to update the version to solve the bug? It worked for me in #100

Hi, thanks for the answer. I upgraded to 0.5.2 and still getting the same errors.

@starsholic
Copy link

I got the same error on decord=0.5.2 on centos, I installed decord via pip

RuntimeError: Failed to seek_accurate to frame 0

Does the author fixed it? @zhreshold

1 similar comment
@starsholic
Copy link

I got the same error on decord=0.5.2 on centos, I installed decord via pip

RuntimeError: Failed to seek_accurate to frame 0

Does the author fixed it? @zhreshold

@snehamaheshwari07
Copy link

Any update on how to resolve this??

@KastanDay
Copy link

My issue was resolved by setting num_threads=1 in the VideoReader. This is unfortunate, but greatly increased the reliability.

@relh
Copy link

relh commented May 10, 2023

I also found that setting num_threads=1 also fixed my problem. My problem was related, where I was occasionally extracting all black frames for some reason.

I also found that this problem occurred when I was using GPU context, not sure if switching to CPU helped but I did that anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants