[英]AForge.NET stream from PiCamera - AForge.NET don't receiving any bytes
I have stream in mjpeg
urled http://192.*.*.1:8000/stream.mjpg
Im trying to receive it with C# App with Aforge.Video
namespace. 我在
mjpeg
输入了http://192.*.*.1:8000/stream.mjpg
我试图用带有Aforge.Video
命名空间的C#App接收它。
internal class CameraManager
{
private MJPEGStream stream = new MJPEGStream("http://192.*.*.1:8000/stream.mjpg");
public CameraManager()
{
stream.NewFrame += new NewFrameEventHandler(video_NewFrame);
stream.Start();
while (true)
{
Console.WriteLine(stream.BytesReceived);
}
}
private void video_NewFrame(object sender,
NewFrameEventArgs eventArgs)
{
// get new frame
Bitmap bitmap = eventArgs.Frame;
Console.WriteLine(stream.IsRunning);
Console.WriteLine(bitmap.Height);
// process the frame
}
}
I try to receive data, and in future detect faces, motion etc. Now im only receiving "0 bytes". 我尝试接收数据,并在将来检测面部,动作等。现在我只接收“0字节”。
I used tutorial From this URL but i can see, that in sample it is "http://<axis_camera_ip>/axis-cgi/jpg/image.cgi"
. 我使用教程从这个URL,但我可以看到,在示例中它是
"http://<axis_camera_ip>/axis-cgi/jpg/image.cgi"
。 I can see my camera streaming in url http://192.*.*.1:8000/stream.mjpg
very clear. 我可以看到我的相机流在网址
http://192.*.*.1:8000/stream.mjpg
非常清楚。 I see that my stream has format mjpg
in sample .cgi
我看到我的流在样本
.cgi
有格式mjpg
What should i do to receive pics/bytes from this .mjpg stream and then manage it? 我该怎么做才能从这个.mjpg流中接收图片/字节然后进行管理呢?
My problem was that i was using .NET Core Console Application
instead .Net Core Framework Console Application
. 我的问题是我使用的是
.NET Core Console Application
而不是.Net Core Framework Console Application
。 Replacing project to new with .Net Framework with my classes and Entities included from .Net Core working now. 使用.Net Core中包含的类和实体将.Net Framework替换为new。 Learn more about AForge with .Net Core plans and progress.
通过.Net核心计划和进展了解有关AForge的更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.