html5 - video标签的poster封面图怎么从视频中截取?
PHPz
PHPz 2017-04-17 13:10:51
0
2
1547

一般视频的封面是怎么动态截取的?
有php的方案吗?或者js的方案

PHPz
PHPz

学习是最好的投资!

reply all(2)
迷茫

It is usually handled manually, which means you need to prepare a related video picture at the same time as the video.
Some browsers support automatically selecting the cover image from the video for display. The prerequisite is that the video must be loaded, so the recommended method is to handle it manually.

Of course, if you really want to capture pictures from the video, then you have to parse the video (this is related to the format, some videos may not be parsed), which is not worth the gain, and requires a back-end to process it. As for the front end, js provides some screenshot processing methods, which are not suitable for this.

刘奇

I intercepted dynamically, and it is recommended to use ffmpeg.
Just read the documentation for usage.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!