Inconsistent frame reading behavior with VideoReader
Hello VideoReader Team,
I am encountering a peculiar behavior when using VideoReader in my project. Specifically, the program hangs when attempting to read a sequence of frames including frame number 4, but works fine if the sequence skips this frame.
Environment:
- VideoReader version: decord 0.6.0
- Operating System: linux
- Python version: 3.8.16
Problem Description: When I try to read a sequence of frames [1, 2, 3, 4, 5, 6] from a video, the read operation gets stuck on frame 4, and the program becomes unresponsive. However, when I read frames [1, 2, 3, 5, 6] without frame 4, everything works as expected, and all frames are read without any issues. No exceptions are thrown, and no error messages are displayed, leaving the program in a hanging state.
Steps to Reproduce:
- Load the video using VideoReader.
- Try to read the frames sequentially including frame 4, using get_batch([1, 2, 3, 4, 5, 6]).
- The program hangs when it reaches frame 4.
- Repeat the process with get_batch([1, 2, 3, 5, 6]), skipping frame 4, and observe that the operation completes successfully.
Expected Behavior: VideoReader should consistently read any given sequence of frames without hanging, including when frame 4 is part of the sequence.
Attempted Workarounds: I have tried the following steps to isolate the problem:
- Skipping frame 4 in the sequence, which prevents the hang, but is not a viable long-term solution.
Since I am unable to share the video file, I am providing this detailed description of the issue in hopes that it will be sufficient to identify a potential cause or solution.
I would greatly appreciate any assistance you can offer in resolving this issue or any suggestions for further troubleshooting steps.
Thank you for your time and attention.
Best regards,