I screwed up my ffmpeg thumbnail generation command line (video_ffmpeg_thumbnailer_options) and got zero-byte JPEG files as a result. This was annoying to debug because generate_thumbnails only checks file_exists() to test for failure. I think this should also report empty files as failures, so that debugging information is available in the watchdog log, since ffmpeg does create these under some circumstances.
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | video-1210986-2.patch | 1.41 KB | mvc |
| zero-byte-thumbnail-check.patch | 977 bytes | mvc |
Comments
Comment #1
Jorrit commentedI think there should be a separate error line because with your patch there will be an error saying that the file does not exist, while it exists but is zero bytes long. Users will be confused by that message. But besides that, catching this error is a good idea.
Comment #2
mvcfair enough. here's a patch with two different error messages.
Comment #3
Jorrit commentedThe patch has been committed to the 6.x-4.x branch. Thanks for your patience.
Comment #4
Jorrit commentedThis fix has been released in Video 6.x-4.3-rc1. Please take a look and test the release candidate.