philipjscott / simple-thumbnail

A library that produces thumbnails from images, videos and URLs :mag_right:
https://www.npmjs.com/package/simple-thumbnail
MIT License
25 stars 14 forks source link

Generate Thumbnail using invalid SEEK gives no error #56

Closed digitalmosaik closed 4 years ago

digitalmosaik commented 4 years ago

Generating a thumbnail with a seek larger than the video duration gives no error and generates no thumbnail

To Reproduce genThumbnail(${__dirname}/public/+path.basename(file), ${__dirname}/public/thumbnails/+path.basename(file)+'.thumb.png', '600x?', {path: ffmpeg.path}) .then(() => { win.send('files', JSON.stringify(getFilesFromHostedDirectory())); //send updated filelist to window so it refreshes the thumbnails console.log("Thumbnail Generated "+path.basename(file)+".thumb.png"); }) .catch(err => console.log("ERROR Generating thumbnail"+err))

// Do stuff that breaks things! Give it a video which is like 20 sec long

Expected behavior The promise should return and error saying that the seek was out of bounds.

Environment (please complete the following information):

philipjscott commented 4 years ago

Thanks for making the issue, currently looking into this :+1:

philipjscott commented 4 years ago

Fixed on version 1.5.7. Thank you for taking the time to make this issue! :smile: