I have a Node API that accepts video files uploaded via client-side FormData. The result is a req.file
object:
{
fieldname: 'media',
originalname: 'IMG_6288.MOV',
encoding: '7bit',
mimetype: 'video/quicktime',
buffer: <Buffer 00 00 00 14 66 74 79 70 71 74 20 20 00 00 00 00 71 74 20 20 00 00 00 08 77 69 64 65 01 ed db 13 6d 64 61 74 21 20 03 40 68 1c 21 4e e6 ff f9 80 e7 ff ... 32390609 more bytes>,
size: 32390659
}
I am trying to create a thumbnail image from a given frame in the video file. However, almost everything I find on thumbnail generation (i.e. ffmpeg) requires a path in order to process the video, which is not provided.
Is there a way to create a thumbnail image without the file path? Perhaps from the provided buffer, either directly or by converting it into a stream first?
TIA for your help