how to insert the play button in the video thumbnail?
I'm creating thumbnails from videos using ffmpeg and it's working fine.
But now I want to add a play button image at the center of the thumbnail image and store them.
I've used CSS to get th开发者_如何学Pythonat, but I want to know whether there is any method to create thumbnails with the given image at the center.
Yes, you can use a library such as GD or ImageMagick.
But, why don't you continue to do it with CSS? You can keep the play button separate for maintainability, use JPEG for thumbnails (play buttons generally don't look good when encoded as JPEGs).
I would only recommend combining them if there was some need to have them always there (exposing them via an API, for one).
Unfortunately in my case you need the play button to be added by GD or ImageMagick. For adding thumbnails to an html email for example. Email clients will not reliably support absolute positioning or background images, either css or html based.
精彩评论