开发者

how to insert the play button in the video thumbnail?

开发者 https://www.devze.com 2023-01-17 16:43 出处:网络
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'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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号