FFMpeg video thumbnail image generation

Just wanted to share with anyone who has run into the same issue of video thumbnails being all black (or a solid color for that matter) because of the first frame of the video. In v1.7, changing the below lines will fix this issue and leverage FFMPeg’s ability to pick a thumbnail based on “context”. Or, replacing “-vf thumbnail” with something like “-ss 5” will generate a thumbnail that is 5 seconds into the video. “-vf thumbnail” is a better option as not all videos may necessarily be > 5 seconds long.

Hope this helps!

Razuna 1.7
folder: razuna\global\cfc

assets.cfc : Line 5418:

<cfset var theargs = "#theffmpeg# -i #arguments.thestruct.filepath##arguments.thestruct.qry_existing.orgname# -vframes 1 -f image2 -vcodec mjpeg #arguments.thestruct.thumbpath#">

Change to: <cfset var theargs = "#theffmpeg# -i #arguments.thestruct.filepath##arguments.thestruct.qry_existing.orgname# -vf thumbnail -frames:v 1 -f image2 -vcodec mjpeg #arguments.thestruct.thumbpath#">

videos.cfc: Line 572:

<cffile action="write" file="#arguments.thestruct.thesh#" output="#theexe# -i #theasset# -vframes 1 -f image2 -vcodec mjpeg #theorg#" mode="777">

Change to: <cffile action="write" file="#arguments.thestruct.thesh#" output="#theexe# -i #theasset# -vf thumbnail -frames:v 1 -f image2 -vcodec mjpeg #theorg#" mode="777">

This is great. We will make sure to add it to 1.7.1 as well.

Thank you for reporting this and making Razuna better.

Thanks for sharing this! I made the change this week and it works BEAUTIFULLY!! Love it. :smiley: