decord icon indicating copy to clipboard operation
decord copied to clipboard

Failed to measure duration/frame-count due to broken metadata.

Open Iamlearn opened this issue 3 years ago • 2 comments
trafficstars

I have a video that opencv can read, but the record will report an error, the code is as follows: import time from decord import VideoReader, cpu path = r'X:\007\SaveImg\Cuda.mp4' start = time.time() vr = VideoReader(path, ctx=cpu(0)) startP = 0 imgs2 = vr.get_batch(range(startP, startP + 512)).asnumpy() print(imgs2.shape, time.time() - start) Error: decord._ffi.base.DECORDError: [20:11:48] D:\a\decord\decord\src\video\video_reader.cc:270: [X:\007\SaveImg\Cuda.mp4] Failed to measure duration/frame-count due to broken metadata. Process finished with exit code 1 The video is in the attachment,And Decord version==0.6.0

https://user-images.githubusercontent.com/46410827/182611605-4d9e3e6f-dd46-4d00-8938-e6f813e29476.mp4

Iamlearn avatar Aug 03 '22 12:08 Iamlearn

The format of the code just pasted is wrong, re-paste it as follows

import time from decord import VideoReader, cpu path = r'X:\007\SaveImg\Cuda.mp4' start = time.time() vr = VideoReader(path, ctx=cpu(0)) startP = 0 imgs2 = vr.get_batch(range(startP, startP + 512)).asnumpy() print(imgs2.shape, time.time() - start)

Iamlearn avatar Aug 03 '22 12:08 Iamlearn