如何将视频流发送到肥皂网络服务

发布于 2024-12-07 14:40:02 字数 154 浏览 0 评论 0原文

我需要将录制的视频流发送到网络服务。

我正在使用 Base 64 对视频流进行编码,但出现内存不足异常。所以我正在考虑另一种方法来做到这一点。

我搜索了这个,但找不到任何参考链接。

我可以使用其他方式发送视频吗?

I need to send recorded video stream to web service.

I'm doing encoding video stream using Base 64 but im getting out of memory exception. So I'm thinking another way to do this.

I searched for this but I can't find any reference link.

Is there another way to send the video that I can use?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷雾森÷林ヴ 2024-12-14 14:40:02

仅 Byte64 编码即可将数据大小扩展至原始大小的 4/3。对于视频文件来说,这是一笔巨大的开销。由于无法在任何当前基础设施上使用此类解决方案,您很可能没有看到有关此主题的任何链接。

我强烈建议您开始研究适合您需求的预打包转码解决方案,直到您更好地了解这个问题领域。否则,你将很难找到愿意在堆栈溢出上解决你的问题的人,因为担心当他们必须向你解释你的整个前提是有缺陷的并且可以在数学上证明时被否决。

例如,假设您尝试以每秒 30 帧的速度推送标清视频 (640x480)。我们还假设视频采用标准 RGB 格式,每个色带 8 位,每个像素 24 位。计算公式为:

宽度 x 高度 x 每像素字节数 x 每秒帧数 x Byte64 开销 = 每秒字节数

640 x 480 x 3 x 30 x 4/3 = 36,864,000

35MB 每秒

请记住,大多数吞吐量测量单位都是兆位每秒而不是每秒兆字节,这转换为 281.25Mb/s。有了这些类型的带宽需求,您将很难找到可以满足您的数据需求的无线连接,并且面临着硬连线网络连接饱和的真正威胁。目前,您需要压缩视频文件,并且需要使用肥皂以外的其他东西,或者使用允许数据流的 MTOM 之类的 SOAP 扩展。

Byte64 encoding alone expands data sizes to 4/3 their original size. On a video file this is an exceptional amount of overhead. Most likely you haven't seen any links on this topic due to the inability to use such a solution on any current infrastructure.

I'd highly recommend that you start looking into prepackaged transcoding solutions for your needs until you have a better understanding of this problem domain. Otherwise you are going to have a hard time finding people who want to take up your questions on stack overflow for fear of being downvoted when they have to explain to you that your entire premise is flawed and can be proven so mathematically.

For example let's assume that you are trying to push standard definition video (640x480) at 30 frames per second. Let's also say that the video is in the standard RGB format with 8 bits per color band, 24 bits per pixel. The math for this would be:

width x height x bytes per pixel x frame per second x Byte64 overhead = bytes per second

640 x 480 x 3 x 30 x 4/3 = 36,864,000

35MB per second

Remembering that most throughput measurements are in mega bits per second rather than mega bytes per second this translates to 281.25Mb/s. With those kind of bandwidth needs you are going to have a hard time finding a wireless connection that can meet your data needs and face quite a real threat of saturating a hardwired network connection. At the present time you need to compress your video files and you need to use something other than soap or use SOAP extensions like MTOM which allow data streaming.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文