- 问题现象:对于个别视频,单独读取该视频是正常,使用decord中的VideoReader读取会报如下的错误:
[06:56:29] /github/workspace/src/video/ffmpeg/threaded_decoder.cc:292: [06:56:29] /github/workspace/src/video/ffmpeg/threaded_decoder.cc:218: Check failed: avcodec_send_packet(dec_ctx_.get(), pkt.get()) >= 0 (-11 vs. 0) Thread worker: Error sending packet.
- 问题定位:
# vr = VideoReader(video_path, ctx=cpu(0), num_threads=4)
vr = VideoReader(video_path, ctx=cpu(0), num_threads=1)
将线程数量设为1即可解决。初步怀疑是decord库在多线程处理某些视频时存在问题。