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.

CommentFileSizeAuthor
#2 video-1210986-2.patch1.41 KBmvc
zero-byte-thumbnail-check.patch977 bytesmvc

Comments

Jorrit’s picture

I 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.

mvc’s picture

Version: 6.x-4.2 » 6.x-4.x-dev
StatusFileSize
new1.41 KB

fair enough. here's a patch with two different error messages.

Jorrit’s picture

Status: Needs review » Fixed

The patch has been committed to the 6.x-4.x branch. Thanks for your patience.

Jorrit’s picture

This fix has been released in Video 6.x-4.3-rc1. Please take a look and test the release candidate.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.