youtube thumbnail with start_offset
Hi Team,
I wanted to know, is it possible to provide start_offset for capturing a thumbnail for a youtube video.
The following is the node.js code snippet.
return cloudinary.image(`${youTubeId}.jpg`, {
type: "youtube",
start_offset: startOffset,
transformation: transformation
})
The above code does not put a start offset to the screenshot.
-
Official comment
Hi Pallav
Thanks for getting in touch with your question.
Unfortunately we don't support specifying what part of the video to pull the thumbnail from. We query YouTube's API to fetch the thumbnail and a start offset isn't a functionality they provide. The thumbnail you get will always be the one found when visiting
https://www.youtube.com/embed/<video_id>
You can apply transformations to thumbnail images to apply overlays, alter colours, change dimensions, etc, but I'm afraid specifying a start offset is not possible.
I hope this answers your query. If I've missed anything, please feel free to reply here.
Many thanks,
-Danny
Post is closed for comments.
Comments
1 comment