简体   繁体   English

在C#中从视频获取帧

[英]Get Frames from Video in c#

I am working on uploading a video using file upload control in MVC view and I am uploading a video from this file upload control.On the server side I want to get the frames/Images of video.I have to get the frame in byte but I can do it for the a single file but I am not sure about video file. 我正在使用MVC视图中的文件上传控件来上传视频,并且正在从此文件上传控件中上传视频。在服务器端,我想获取视频的帧/图像。我必须以字节为单位获取帧,但是我可以为单个文件执行此操作,但是我不确定视频文件。 I have googled a lot but did not get any perfect solution even I tried with the Framegrabber but it is also not working. 我已经用谷歌搜索了很多,但是即使我尝试了Framegrabber也没有得到任何完美的解决方案,但是它也不起作用。

Can anyone help me how can i get frames from video. 谁能帮我从视频中获取帧。

Thanks 谢谢

You can use Process.Start on the server side to create thumbnails from the video using FFMPEG, commands here . 您可以在服务器端使用Process.Start通过FFMPEG从视频创建缩略图,命令此处

The command line looks like: 命令行如下所示:

ffmpeg -i input.flv -f image2 -vf "select='eq(pict_type,PICT_TYPE_I)'" -vsync vfr thumb%04d.png

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM