Chrome+另一个过程:比较进程通信比HTTP / XHR请求更快?

发布于 2025-02-10 01:09:17 字数 1115 浏览 1 评论 0原文

我有一个过程#1在视频流上进行实时图像处理。

我需要在Chrome的HTML页面(同一台计算机上的进程#2)中渲染此视频,在Canvasimgvideo> video中HTML5元素。

由于我有1000x1000像素x 3字节RGB,在20 fps时,这是57 MB/sec,在过程#1和过程#2(Chrome)之间发送。

测试:

从一个进程#1到同一计算机上的进程#2(Chrome)的过程中,有哪些选项发送超过100 mb/sec(在将来的情况下为2000x2000 pixels视频20fps)?

可以Chrome直接访问过程#1的一些数据,而无需通过HTTP瓶颈发送/接收?在过程#1和Chrome之间,与共享内存之间的过程间通信是否可能?

可以在Chrome扩展层上完成吗?

NB:过程#1用C ++或Python编写

I have a process #1 doing realtime image processing on a video stream.

I need to render this video in a HTML page in Chrome (process #2 on the same computer), in a canvas or img or video HTML5 element.

Since I have 1000x1000 pixels x 3 bytes RGB, at 20 fps, this is 57 MB/sec to send between process #1 and process #2 (Chrome).

Tested:

What options are there to send more than 100 MB/sec (in the future case 2000x2000 pixels video 20fps) from a process #1 to process #2 (Chrome) on the same computer?

Can Chrome access some data of process #1 directly without having to send/receive via a HTTP bottleneck? Is inter-process-communication with shared memory possible between process #1 and Chrome?

Can this be done at a Chrome extension layer?

NB: Process #1 is written in C++ or Python

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

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

发布评论

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

评论(1

抹茶夏天i‖ 2025-02-17 01:09:17

可能您可以将Websocket连接用于此任务。它将仅开放一次,然后您可以通过它发送大量数据,而流量使用量的大幅减少(与HTTP请求进行了比较)。

您可以检查基本说明和示例在这里

Probably you can use websocket connection for this task. It will be opened only one time, and then you can send lots of data through it with huge reduction of traffic usage (in comparation with http requests).

You can check basic description and examples here.

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