I need to create a thumbnail from video while uploading it to CDN.
I have been searching for this found this but I am not able to get the screen shot even after followin
I do not know a way to make a screenshot WHILE uploading, but I do know how to do it after.
The simplest code is:
ffmpeg -i input.mp4 -ss 00:00:01.000 -vframes 1 output.png
Run this script after you have uploaded the file. It should take only a short amount of time if the screenshot is taken in the beginning of the video. (first minute e.g.).
I do not think it is possible to take a screenshot while the file is still being uploaded.
Edit:
removed -f image2
as it is guessed correct by ffmpeg