Error getting frames
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.
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...
hi, have u tried to update the version to solve the bug? It worked for me in #100
seems the author change the modification back... https://github.com/dmlc/decord/commit/b5b7ae5c9c6773a56aba9c0108fe38f890a26183#diff-ddafbe9a39091de800c878a0bcff64fc77f265fe90f96a11ef1bf00fc88804c3
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.
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
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
Any update on how to resolve this??
My issue was resolved by setting num_threads=1 in the VideoReader. This is unfortunate, but greatly increased the reliability.
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.