英文:
Video stream optimization
问题
我正在构建一个用于学习目的的视频监控应用程序。
目前,我有一个非常基本的原型正在工作。
我正在捕获并通过websocket将网络摄像头的帧发送到浏览器。
为了提供一些基本实现的背景,客户端上我有以下代码:
<img id="frame" src="">
我正在使用JavaScript将帧添加到其中。
该应用程序和服务器都是使用Golang编写的。
虽然我目前的实现可以工作,但我知道如果我想从家庭网络之外查看流媒体,单独发送帧到浏览器是不够的。
我必须优化这个过程。
到目前为止,我只考虑了在将帧发送到客户端之前对摄像头帧进行压缩。
还有将帧编码为视频,并在客户端实现视频播放器。
还有什么其他的方法可以做到优化?
我知道这个问题很广泛,但我认为在视频流传输方面可能有一种标准的优化模式。
英文:
I am building a video surveillance app, for learning purposes.
At the moment I have a very basic prototype working.
I am capturing and sending webcam frames to a browser over a websocket.
Just for some context on how basic the implementation is, on the client side I have:
<img id="frame" src="">
I am appending the frames via javascript.
The app and the server are written in Golang
Although what I have works, I know sending individual frames to a browser is never going to cut it if I want to view the stream from outside my home network.
I have to optimize the process.
So far I have only thought of compressing the cam frames before sending them to the client.
Also encoding the frames to video and implementing a video player on the client side.
What else can be done?
I know the question is broad, but I assume there must be a standard optimization pattern for video streaming.
答案1
得分: 2
视频压缩非常高效,你永远不会得到比这更好的东西。以H.264为例,https://sidbala.com/h-264-is-magic/
英文:
Video compression is amazingly efficient, you will never get anything better than that. Look at H.264 for instance https://sidbala.com/h-264-is-magic/
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论