Handle thumbnail creation of video files correctly
See original GitHub issueOn the commit https://github.com/LibrePhotos/librephotos/commit/187cfa2da9c04330cbe3402ad4b2ebd3408aff23 is_valid_media is remove then all file are processed.
On my folder there is mp4 video are processed with the bellow error :
20200118_195052.mp4
reason: delegate failed `'ffmpeg' -nostdin -v -1 -i '%i' -vframes %S -vcodec pam -an -f rawvideo -y '%u.pam' 2> '%u'' @ error/delegate.c/InvokeDelegate/1966
Traceback (most recent call last):
File "/usr/lib/librephotos/backend/api/directory_watcher.py", line 90, in handle_new_image
photo._generate_thumbnail()
File "/usr/lib/librephotos/backend/api/models/photo.py", line 132, in _generate_thumbnail
with Image(filename=self.image_path) as img:
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/wand/image.py", line 9110, in __init__
self.read(filename=filename)
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/wand/image.py", line 9705, in read
self.raise_exception()
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
raise e
wand.exceptions.DelegateError: delegate failed `'ffmpeg' -nostdin -v -1 -i '%i' -vframes %S -vcodec pam -an -f rawvideo -y '%u.pam' 2> '%u'' @ error/delegate.c/InvokeDelegate/1966
After install ffmpeg
20200118_195052.mp4
reason: cache resources exhausted `/tmp/magick-RKvHmvmInW9R3NWGXP6FveysIVHoWR56.pam' @ error/cache.c/OpenPixelCache/4095
Traceback (most recent call last):
File "/usr/lib/librephotos/backend/api/directory_watcher.py", line 134, in rescan_image
photo._generate_thumbnail()
File "/usr/lib/librephotos/backend/api/models/photo.py", line 132, in _generate_thumbnail
with Image(filename=self.image_path) as img:
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/wand/image.py", line 9110, in __init__
self.read(filename=filename)
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/wand/image.py", line 9705, in read
self.raise_exception()
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
raise e
wand.exceptions.CacheError: cache resources exhausted `/tmp/magick-RKvHmvmInW9R3NWGXP6FveysIVHoWR56.pam' @ error/cache.c/OpenPixelCache/4095
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13 (11 by maintainers)
Top Results From Across the Web
Capture or change a video thumbnail - Microsoft Support
Click Change thumbnail, and then choose one of the following options: Capture a thumbnail from video.
Read more >Video Thumbnail Guide: How to Make a Great Video Thumbnail
Learn how to make great video thumbnails for all your social network that capture your audience's attention and promtp them to watch!
Read more >What Are Video Thumbnails and Why Do They Matter?
A video thumbnail is a still image that acts as the preview image for your video. It's kind of like a book cover....
Read more >Video Thumbnail Guide - Tips for Design, Layout & Dimensions
Custom video thumbnails are essential if you want your content to get clicked. Step 1. Accurately portray your content in your thumbnail ......
Read more >4 Ways To Display Thumbnail Previews For All Video Files
Click the preset drop down at the top right and change from Default to Common or Most Known for the program to recognize...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Maybe we should catch video files and use ffmpeg directly to create thumbnails for videos? https://github.com/kkroening/ffmpeg-python
We now use ffmpeg to create thumbnails for videos 😃