锐英源软件
第一信赖

精通

英语

开源

擅长

开发

培训

胸怀四海 

第一信赖

当前位置::锐英源 / 英语翻译 / JPEG格式流媒体服务器 / 视频帧串流
服务方向
人工智能数据处理
人工智能培训
kaldi数据准备
小语种语音识别
语音识别标注
语音识别系统
语音识别转文字
kaldi开发技术服务
软件开发
运动控制卡上位机
机械加工软件
软件开发培训
Java 安卓移动开发
VC++
C#软件
汇编和破解
驱动开发
联系方式
固话:0371-63888850
手机:138-0381-0136
Q Q:396806883
微信:ryysoft

视频帧串流

Hello,

你好,

My name is Fabio, and i'm developing a c# app, where i need to stream mjpeg video from c# to a mobile device. I am having serious problems to do it but your snippet seems pretty promissor. I've been trying to stream sets of images, and that works fine, but i really cant change it to stream video frames because the IEnumerable don't accept it.

我的名字是法比奥,我开发一个c#应用程序,我需要从c#串流mjpeg视频到移动设备。 我有严重的问题,但你的片段代码似乎让我很有希望。 我一直试图串流一组图像,这没问题,但我真的不能串流视频帧,因为IEnumerable不接受它。

My question is, do you already change your functions to allow video streaming? If you didn't, how do o plan to do it? 我的问题是,你已经改变你的函数允许视频串流吗? 如果你没有,啊,打算怎么做?

Thanks for your help, and for your excellent work 谢谢你的帮助和你的出色工作


Hi, you may create a class to read video frames and output IEnumerable<Image> to the image streaming server. I appended a sample class where you can call AssignNewFrame function to update the image to current video frame. There is also an example of how to use the class ImageStreamSource with the mjpeg streaming server.

你好,你可以创建一个类来读取视频帧和输出到IEnumerable<Image>图像到流媒体服务器。 我附加一个示例类,您可以调用AssignNewFrame函数来更新当前视频帧图像。 还有一个例子,如何使用类ImageStreamSource mjpeg流媒体服务

public class ImageStreamSource : IEnumerable
{
bool IsActive = true;
Image latestImage = null;
ManualResetEvent newFrameMre = new ManualResetEvent(true);
public ImageStreamSource()
{
}
public void AssignNewFrame(Image item)
{
latestImage = item;
newFrameMre.Set();
}
// IEnumerable Member
public IEnumerator GetEnumerator()
{
yield break;
}
public IEnumerable<Image> GetImageEnumerator()
{
while (IsActive)
{
newFrameMre.WaitOne();
yield return latestImage;
}
yield break;
}
public void Stop()
{
IsActive = false;
}
}
//Initialization
ImageStreamSource imageStreamingSource = new ImageStreamSource();
ImageStreamingServer imageStreamingServer = new ImageStreamingServer(imageStreamingSource.GetImageEnumerator()); //Usage
Bitmap frame = new Bitmap("some video frame");
imageStreamingSource.AssignNewFrame(frame);

Hi Joshua,嗨,约书亚,

Thanks a lot for your help. In the mean time i kept working with your framework and had already done something like what you did, but your code is better Now it works almost fine, but once i have much to process in each frame after a few seconds the frames start arriving with delay to the mobile. It is possible to discard the old frames in memory and jump to the most recent ones?

非常感谢你的帮助。 同时我一直使用你的框架已经完成,但是您的代码更好 现在工作很好,但是一旦几秒钟后,我有许多帧处理前事务多时,在每一帧的帧到达移动端时有移动。 可以丢弃最近的旧帧,跳转到最新帧吗?

Thanks again for your help 再次感谢你的帮助

友情链接
版权所有 Copyright(c)2004-2021 锐英源软件
公司注册号:410105000449586 豫ICP备08007559号 最佳分辨率 1024*768
地址:郑州大学北校区院(文化路97号院)内