decord icon indicating copy to clipboard operation
decord copied to clipboard

get_batch() returns mmco: unref short failure, even for a valid frame

Open ffahmed opened this issue 3 years ago • 12 comments

get_batch returns " [h264 @ 0x561c38325ac0] mmco: unref short failure ", for some frames in the middle of the video. Video plays fine and there is no other issue.

To recreate the problem for one of the many videos do the following:

  1. download this https://www.rocq.inria.fr/cluster-willow/amiech/Youcook2_val.zip
  2. extract and download Youcook2_val/validation/201/mZwK0TBI1iY.mkv
  3. Load the video using vr=VideoReader(..)
  4. Do a vr.get_batch([257]).shape
  5. Although it has 7939 frames, it throws error while getting frame 257.

Could you please help me debug this?

Thanks

ffahmed avatar Aug 10 '21 08:08 ffahmed

Any update on this, pleaes?

dxli94 avatar Oct 28 '21 10:10 dxli94

I meet this, too. It seems to be neither a bug or warning.😭

frelwx avatar Nov 30 '21 04:11 frelwx

I have the same issue, but it didn't crash the program. Also I visualized the extracted tensor, it actually looks fine despite the very serious-looking warning message? Do you guys also see a normal execution and output? I can't figure out how to suppress that warning though. It's spamming my training loop constantly. @ffahmed @dxli94 @frelwx

DrJimFan avatar Apr 08 '22 02:04 DrJimFan

I have the same issue, but it didn't crash the program. Also I visualized the extracted tensor, it actually looks fine despite the very serious-looking warning message? Do you guys also see a normal execution and output? I can't figure out how to suppress that warning though. It's spamming my training loop constantly. @ffahmed @dxli94 @frelwx

Same observation. Training was not interrupted. It might be due to corrupt video files but I can't be sure.

dxli94 avatar Apr 08 '22 10:04 dxli94

Any update?

cecilia930426 avatar May 12 '22 14:05 cecilia930426

Same issue here. Different video, different dataset, but basically the exact same problem as @ffahmed. Doesn't affect runtime - despite the ominous error the reading/loading appears to work just fine. But it does raise concerns about potential problems underneath the hood with unexpected behavior/results downstream. Happy to provide more details if it would be helpful, but if you can reproduce the OP's issue, I'm fairly certain it would be the same for me.

scottfleming avatar Aug 09 '22 18:08 scottfleming

Same dataset, same issue.

I've tried to re-encode the original *.mkv files into *.mp4 files, but the message still keeps going out.

SCZwangxiao avatar Apr 16 '23 14:04 SCZwangxiao

I'm facing the same issue - any updates?

kahnchana avatar Nov 02 '23 02:11 kahnchana

I get 4x [h264 @ 0x5651802bc400] mmco: unref short failure when I process v_UvPUywSVy1k.mp4 from ActivityNet using cpu, but it hangs with gpu. This is the code in question:

def load_video(vis_path, device, num_frm=100):
    with open(vis_path, 'rb') as file_in:
        # vr = VideoReader(file_in, ctx=gpu(0), num_threads=0)
        vr = VideoReader(file_in, ctx=cpu(0), num_threads=0)
    total_frame_num = len(vr)
    total_num_frm = min(total_frame_num, num_frm)
    frame_idx = get_seq_frames(total_frame_num, total_num_frm)
    # img_array = vr.get_batch(frame_idx).asnumpy()  # (n_clips*num_frm, H, W, 3)
    img_array = vr.get_batch(frame_idx) # (n_clips*num_frm, H, W, 3)
    del vr

zhanwenchen avatar Nov 05 '23 02:11 zhanwenchen

same question

patrick-tssn avatar Dec 15 '23 07:12 patrick-tssn

I met the same issue, during processing ActivityNet dataset.

zealota avatar Dec 18 '23 10:12 zealota