Exiting frames loop with torchvision installed hangs foreve #1863
Unanswered
oliverdain
asked this question in
4. Bugs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I reported the following bug in #1849 which as closed as it was believed it was fixed with an upgrade to a newer version of ffmpeg. However, I just upgraded to 14.3.0, which uses that newer version of ffmpeg (per
av.ffmpeg_version_info
it is7.1.1
) and the bug described below is still present. I would have just re-opened the original bug, but since it was converted to a conversation that doesn't seem to be possible.Original bug:
Using torchvision with av with video threading mode of AUTO or FRAME causes a hang. Note, you don't even need to use torchvision, just importing it causes the issue.
Minimal reproducing example:
The keys here are (1) you have to import torchvision - if you don't it works fine (2) you have to specify thread_type = 'AUTO' or thread_type = 'FRAME' or it doesn't hang and (3) you have to stop decoding the video before you reach the end - if you decode all frames it's fine.
What happens is it hits the break line but doesn't actually break - it just hangs. I have also pytorch/vision#9010 as it's not clear whose bug it is.
I think this will happen on just about any video but, if not, I'm happy to provide the mp4 files that are exhibiting the bug for me.
Here is a requirements.txt file that reproduces the issue with Python 3.10.6
--extra-index-url https://download.pytorch.org/whl/cu118
av == 14.2.0
torch == 2.6.0
torchvision == 0.21.0
Beta Was this translation helpful? Give feedback.
All reactions