-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mp4 ending at ($duration % $interval == 0) causing issues. (Quick fix provided) #75
Comments
Also getting this: (will investigate later and create a separate issue) |
I only get those errors when using the interval and grid with "0" value ... i.e.: "--start-delay-percent 0 --end-delay-percent 0 -width 1920 --grid 10x0 --interval 1m --grid-spacing 0" ... I will investigate later. |
It only seems to happen with videos ending at a $duration % $interval == 0 situation ... i.e. ... there seems to be a "off by 1" error in terms of frames or something ... ... I am using an interval of 60 seconds ... i.e. generate a preview tile every minute ... and I get the mentioned error only with mp4 files ending at :00 seconds ... (i.e. $duration % 60 == 0) Using "--end-delay-percent 1" does fix the issue ... but it's not elegant ... there seems to be a check missing that checks whether there is enough mp4 "left" in order to create the preview tile? |
Fixed crash when duration is an exact multiple of interval
I love your tool and I am using it to generate previews for thousands of videos. Everything works perfectly and the videos are all from streamlink and the same source (twitch) but like ever 100th or so gives me an error like this:
Traceback (most recent call last):
File "/usr/local/bin/vcsi", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/vcsi/init.py", line 3, in main
vcsi.vcsi.main()
File "/usr/local/lib/python3.6/dist-packages/vcsi/vcsi.py", line 1518, in main
process_file(filename, args)
File "/usr/local/lib/python3.6/dist-packages/vcsi/vcsi.py", line 1646, in process_file
selected_frames, temp_frames = select_sharpest_images(media_info, media_capture, args)
File "/usr/local/lib/python3.6/dist-packages/vcsi/vcsi.py", line 658, in select_sharpest_images
frame = do_capture(timestamp_tuple, desired_size[0], desired_size[1], suffix, args)
File "/usr/local/lib/python3.6/dist-packages/vcsi/vcsi.py", line 618, in do_capture
blurriness = media_capture.compute_blurriness(filename)
File "/usr/local/lib/python3.6/dist-packages/vcsi/vcsi.py", line 514, in compute_blurriness
i = Image.open(image_path)
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2862, in open
"cannot identify image file %r" % (filename if filename else fp)
PIL.UnidentifiedImageError: cannot identify image file '/tmp/tmpwfyg0_s3.png'
The text was updated successfully, but these errors were encountered: