miccunifi / TAPE

[WACV 2024] - Reference-based Restoration of Digitized Analog Videotapes
Other
40 stars 1 forks source link

"failed to read frame from video" #7

Closed Platorius closed 5 months ago

Platorius commented 5 months ago

I tried this, but i get always an error, that frames are failed to read. I tried different videos and i tried .mkv and .mp4 but it's always the same. I also tried to manually define the checkpoint.pth because i thought maybe it is wrong. But i still get the same error.

I got this error:

(TAPE) userr@USERRNAME:~/TAPE$  python real_world_inference.py --input-path /home/userr/Videos/vhstest/VHS-Kamera-Test.mp4 --output-path /home/userr/Videos/vhstest/output/VHS-Restauration1.mp4
Extracting frames from the video...
 99%|███████████████████████████████████████████████████████████████████████████████▌| 160/161 [00:01<00:00, 111.88it/s]
Traceback (most recent call last):
  File "/home/userr/TAPE/real_world_inference.py", line 235, in <module>
    real_world_test(args)
  File "/home/userr/TAPE/real_world_inference.py", line 52, in real_world_test
    raise Exception("Failed to read frame from video")
Exception: Failed to read frame from video

First it looks like it would work, but then it always stops on the second last frame.

Edit: It does run now with original (uncut) video. When i cut it to a short one with avidemux or virtualdub2 it does not work anymore. Dont know why. But it runs now.

LorenzoAgnolucci commented 5 months ago

Hi @Platorius!

Maybe try to cut the video using ffmpeg. I am not familiar with avidemux and virtualdub2 so I can't help you.