首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从.flv中提取缩略图

从.flv中提取缩略图
EN

Stack Overflow用户
提问于 2010-04-21 19:38:11
回答 4查看 2.7K关注 0票数 0

我想知道,如何从flash-video文件中提取缩略图,然后将其显示在列表框中。

该列表框是假设有许多视频,我需要从actionscript程序中提取缩略图。

flash播放器将在web上,并且提取必须在加载swf文件时发生,因此,该方法不能太耗时。

我该如何继续这样做呢?这有可能吗?

提前使用tnx

EN

回答 4

Stack Overflow用户

发布于 2010-04-21 20:01:11

您可以使用ffmpeg。也许调用脚本将是最好的方法。

票数 1
EN

Stack Overflow用户

发布于 2010-04-22 08:40:10

你应该看看FFMpeg --有了它,你可以从视频中提取缩略图(还有其他很多很酷的东西)。将其安装到服务器上后,只需通过PHP的exec()函数传递命令即可。

例如:

代码语言:javascript
复制
$cmd = "ffmpeg -i you_video.flv -f image2 -vframes 1 -ss 00:00:01 -y -s 100x100 my_video_thumb.png";

exec($cmd, $output, $return);

Where:

-i is your specify the input file
-f is to force the output format, this case "image2" since we are generating an image
-vframes video frames we want to record in the snapshot, only one
-ss starting time of the snapshot
-y overwrite any existing file with the same name
-s size/dimensions of the output image

有一些关于如何在你的服务器上安装FFMpeg的很好的教程,如果你搜索它,你会发现大量的信息。通过http://vexxhost.com/blog/2007/03/03/installing-ffmpeg-ffmpeg-php-mplayer-mencoder-flv2tool-lame-mp3-encoder-libogg-%E2%80%93-the-easy-way/,这里是一个起点

干杯,M。

票数 1
EN

Stack Overflow用户

发布于 2010-04-21 19:59:41

最好的解决方案是generate the thumbnail server side,并将url发送到此图像。如果你想“在飞行中”做缩略图,你需要首先加载视频,至少直到你想要截图的时候,这不会特别快。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2682492

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档