【发布时间】:2019-08-15 18:34:26
【问题描述】:
我想使用 ASP.NET Core 应用程序流式传输从网络摄像头捕获的视频。 我还需要对框架进行一些操作,这就是我使用 OpenCVSharp 的原因。
目前我有接下来的发展:
- html 在我看来-这里我不知道我应该使用什么类型
<video id="video" preload="auto">
<source src="LiveVideo" type="<< don't know the type >>"/>
</video>
- 我的控制器 - 这里我也不知道内容类型,主要问题是:我不知道如何流式传输 OpenCVSharp 捕获的视频
[ApiController]
[Route("[controller]")]
public class LiveVideoController : ControllerBase
{
[HttpGet]
public async Task<FileStreamResult> GetVideo()
{
// capture frames from webcam
// https://github.com/shimat/opencvsharp/wiki/Capturing-Video
var capture = new VideoCapture(0);
var stream = await << somehow get the stream >>;
return new FileStreamResult(stream, << don't know the content type >>);
}
}
【问题讨论】:
标签: opencv asp.net-core opencvsharp