缩略图视频 C#
是否可以在 C# 中创建视频的缩略图(如第一帧)?
小更新:我需要 C# 中的 FLV 视频的缩略图,因为我使用 Flex 来显示视频。是的,一些库的链接会很有用。
Is it possible to create a thumbnail image of a video in C# (like the first frame)?
Little update: I'll need a thumbnail image of an FLV video in C# since I'm using Flex to show video's. And yes, links to some libraries would be useful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我立即想到了两个选项:
I can think of two options off the top of my head:
您可以使用一些开源库来执行此操作。查看 OpenCVDotNet,它是 OpenCV,一个“计算机视觉”库。 这是一个教程链接,您可能会觉得有用。
There are Open Source libraries you can use to do this. Check out OpenCVDotNet, a managed .NET wrapper for OpenCV, a "computer vision" library. Here's a link to a tutorial you may find useful.
这有效:
其中“videoThumb_??????” = ImageList(在其中控制要再次显示的图像的大小)。搜索不同的 MIME 格式时速度慢得要命,但搜索相同类型时却足够快。需求:
并且您可以从同名的nuget包中获取Microsoft.WindowsAPICodePack。至于 FFMpeg、Vlc.Dotnet 或 aXMediaPlayer(WMP),据我测试,它们都很糟糕(Vlc 甚至无法正常工作,FFmpeg 再次需要 5 亿行才能获得相同的结果,aXMediaPlayer 也很好,呵呵)除此之外,这是 Windows 原生的。
例如,如果您将 ListView 与子项之类的东西一起使用,则:
然后会从 ImageList 读取正确的索引号
This works:
where 'videoThumb_?????' = ImageList (where to control size of the image to display again). Slow as hell when searching different MIME formats, but fast enough with same types. Needs:
and you can get Microsoft.WindowsAPICodePack from nuget package with same name. As for FFMpeg, Vlc.Dotnet or aXMediaPlayer(WMP) they all suck as far I've tested(Vlc doesn't even work as it should, FFmpeg again needs 500 million lines before you get same result and aXMediaPlayer well, heh) them beside that's Windows native.
Example, if you're using ListView with something like subitems even:
Would then read the correct index number from ImageList