编码和流式传输动态生成的图像
我有一个应用程序,可以以大约 25 fps 的帧速率动态生成 jpg 文件。实际上它只生成一个持续更新的jpg 文件。我想提供此图像流作为编码器的输入,然后将视频流式传输到 Web 客户端。我希望在生成图像时实时进行流媒体传输。
I have an application that dynamically generates jpg files at a framerate of approximately 25 fps. Actually it generates only one jpg file which is continously updated. I would like to provide this image stream as an input to an encoder and then stream the video to a web client. I would like that the streaming is performed live, as the images are being generated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Javascript 和 jQuery,您可以以给定的速率刷新图像。
当浏览器加载图像时,您调用 reloadImage() ,它会等待 100 毫秒,然后将图像的源属性更改为唯一路径,这会阻止从浏览器缓存加载图像。
HTML
Javascript
Using Javascript and jQuery you could refresh the image at a given rate.
When the image is loaded by browser you call reloadImage() which waits 100ms and then changes the source attribute for the image to a unique path, which prevents loading the image from browser cache memory.
HTML
Javascript