Change poster image time in cloudinaryClient.video() method
Hi,
I use this method to get the video poster and signed URL. The poster image seems random from the video. How can I get the first second of the video as my poster image?
constsignedUrl = cloudinaryClient.video(publicId, {
auth_token: { key:cloudinarySecrets.encryption_key, duration:3600 },
sign_url:true,
});
Thanks
-
Hi Vahid,
The thumbnail selected for the poster is not random but rather it uses the middle frame of the video.
When generating an image from a video the
start_offset
(so
in URLs) transformation parameter is used to tell Cloudinary from where in the video it should grab the frame from.
For example, if you want to get the frame at 3 seconds into the video then you can add theso_3
transformation like so:
https://res.cloudinary.com/demo/video/upload/so_3/dog.jpg
This part of our documentation provides more details on the process of generating thumbnails for videos, including setting the offset parameter toauto
and using percentages:
https://cloudinary.com/documentation/video_manipulation_and_delivery#generating_video_thumbnailsPlease try this out and let us know how it goes or if there's anything else we can help with
Please sign in to leave a comment.
Comments
1 comment