k4yt3x / video2x

A machine learning-based video super resolution and frame interpolation framework. Est. Hack the Valley II, 2018.
https://video2x.org
GNU Affero General Public License v3.0
11k stars 1.02k forks source link

OSError: broken stream #489

Closed MrShotgun54 closed 2 years ago

MrShotgun54 commented 3 years ago

Component Versions

Symptom

Video project fails after OSError

Error Log or Screenshots

I am receiving a "OSError: broken data stream when reading image file" during the downsizing phase of the program. This happened to me multiple times and I reran the program, from the beginning after each time. It seems like some videos give this error while others don't. I currently have 2 completed videos in the same format but different episodes of the show. Thanks! *The last 2 logs were saved as files so I resaved them as txt files.

video2x_error.log video2x_error_2.txt video2x_error_3.txt

k4yt3x commented 3 years ago

I am not quite sure why PIL was unable to read the image data. If you ran it multiple times, I'll have to assume whether a) FFmpeg decoded the images incorrectly, b) PIL doesn't support the image format (which is unlikely given that all frames were extracted into the same codec), or c) some other aspects of your system was faulty.

I there isn't sufficient information in the log file for me to determine what the issue is, here are some of the things you can do.

MrShotgun54 commented 3 years ago

Thank you for your quick response. I will try your suggestions out and if I still run into issues I will send the video to you for further analysis. Again thank you for help with this!

MrShotgun54 commented 3 years ago

Update - I tried to run the program again with only using the upscale ratio, however that to did not work. I even tried on a previous video that worked with the current settings, it failed after only a few minutes. I decided to try another method and used handbrake to change the file from a MP4 (H.264 +acc) to a M4V H.265 (Nvidia NVEnc) and the problem files were able to be upscaled. Attached is the last of the error codes I have received. I did get a new code. I hope this information help you and I dont get another error in the future. Thanks again for your support!

subprocess.CalledProcessError: Command '['C:\Users\Angelo\Desktop\Ripping and Enhancing\video2x-4.8.1-win32-full\dependencies\anime4kcpp\CLI\Anime4KCPP_CLI\Anime4KCPP_CLI', '--passes', '2', '--pushColorCount', '2', '--strengthColor', '0.3', '--strengthGradient', '1.0', '--zoomFactor', '3.0', '--threads', '16', '--preprocessing', '--preFilters', '4', '--postFilters', '40', '--GPUMode', '--HDNLevel', '1', '--platformID', '0', '--deviceID', '0', '--codec', 'mp4v', '--forceFps', '0.0', '--input', 'C:\Users\Angelo\AppData\Local\Temp\video2x\tmp83478wic', '--output', 'C:\Users\Angelo\AppData\Local\Temp\video2x\tmp0dlj00bf']' returned non-zero exit status 3221226505.

video2x_error_8_new.txt

k4yt3x commented 3 years ago

I see that it succeeded at least once. Both the PIL and the CRC check error seems to indicate that:

I cannot determine which one it is, but I think you should try it on a different system.