来自个人图像的MP4直播流 [英] MP4 live stream from individual images

查看:140
本文介绍了来自个人图像的MP4直播流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个API,它提供来自不同来源(主要来自IP摄像头)的实时图像。所以我每秒都有几张jpg图像。

我的要求是制作一个H.264编码的MP4直播流,它将在浏览器中显示(在HTML5< video>元素中)。

因此,将单个图像的实时流转换为MP4实时流。

实现必须在C#中完成(作为前端,但C / C ++可以也可以在Windows上使用)。

我找到了一些很有前途的资源,但我不知道选择哪个,也不清楚我是否有能力做我想做的事:

1)ffmpeg

2)MS媒体基金会



另外,也许还有其他有用的资源可供使用?



请指教。

提前谢谢!

I'm using an API which gives live images from different sources (mainly from IP cameras). So I have few jpg images coming in each second.
My requirement is to produce a H.264 encoded MP4 live stream, that will be displayed in a browser (in HTML5 <video> element).
So, transform this live 'stream' of individual images, into a MP4 live stream.
The implementation must be done in C# (as frontend, but C/C++ can also be used), on Windows.
I have found some promising resources, but I don't know which to choose, nor it is clear to me if these have the capability to do what I want:
1) ffmpeg
2) MS Media Foundation

Also, maybe there is another useful resource to use?

Please advise.
Thank you in advance!

推荐答案

请参阅我对该问题的评论。我不能告诉你什么选择,不确定自己,但我可以给你一些赞成或FFMpeg。我没有使用Media Foundation,但我经常听到FFMpeg与Media Foundation相比提供更多功能的意见。



请参阅我的一些链接我过去的回答:

视频(mp4)到Mp3转换 [ ^ ],

如何在C#中将图像转换为视频 [ ^ ],

如何使用Directshow修剪视频!? [ ^ ],

如何让mp4文件在我的软件中播放 [ ^ ]。



FFMpeg是高度通用的,跨平台的,它不依赖于第三方产品。请注意,您可以通过启动进程将FFMpeg(或libav)用作转换实用程序,但您也可以使用其中一个可用的.NET包装器作为库使用;我在前3个答案中提供了一些链接。



-SA
Please see my comment to the question. I cannot tell you for sure what to choose, not sure myself, but I can give your some words in favor or FFMpeg. I did not use Media Foundation, but I often heard the opinions that FFMpeg offers a much broader set of features compared to Media Foundation.

Please see some of my links in my past answers:
video (mp4) to Mp3 convert[^],
how to convert image to video in C#[^],
How to trim the video using Directshow!?[^],
How can I allow mp4 files to play in my software[^].

FFMpeg is highly universal, cross-platform, and it does not depend on 3rd-party products. Note that you can use FFMpeg (or libav) as just conversion utility, via starting a process, but you also can use one of the available .NET wrappers to use as a library; I provided some links in first 3 answers.

—SA


这篇关于来自个人图像的MP4直播流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆