使用 HTML 5 的视频流
我对使用 html 5 视频属性的视频流有疑问,我想创建一个页面,让访问者可以观看电影(VoD),一切都很简单,但是......服务器上的原始视频格式是高分辨率的 MJPEG。 HTML 需求例如 ogg 或 H.264 格式,所以我需要转换我的视频,我不知道该怎么做。流媒体服务器是用 C++ 编写的,我想在服务器站点上动态转换视频。但这还不是最严重的问题 我还想做这样的事情:当用户停止视频播放器时,他可以看到原始分辨率的当前帧(MJPEG 就像服务器上的原始电影),所以也许有人面临类似的问题,我会很高兴收到每一个建议。
I have question about video streaming using html 5 video attribute, I want to create a page when visitor can watch movies (VoD) everything is easy but … original video format on server is MJPEG with high resolution. HTML demand for example ogg or H.264 format so I need to convert my video, I don’t know how to do it. A streaming server is written in c++, I want to convert video dynamically on server site. But this is not the worst problem,
I want also to do something like : When user stop the video player, he can see current frame with original resolution (MJPEG like original movie on a server), so maybe somebody face to similar problem, I will be glad for every advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来您正在寻找类似 ffmpeg 的东西。
It sounds like you're looking for something like ffmpeg.
libx264 应该能够提供最佳的视频质量。
您可以在不同的编码配置文件之间进行选择。有低
仅依赖于过去帧的延迟设置。这导致编码效率较低。
为了获得最佳性能和最低带宽,您应该使用高质量配置文件,该配置文件还考虑了未来的帧。
请注意,我仍然会缓存转换后的视频磁盘空间现在很便宜。
我想从 MJPEG 流中提取静止帧很容易(毕竟它是 JPEG 文件流)。
libx264 is supposed to deliver the best video quality.
You can choose between different encoding profiles. There are low
lattency settings which only rely on past frames. This gives lower encoding efficiency.
For best performance and lowest bandwidth you should use a high quality profile that also takes into account future frames.
Note that I would still cache the converted video disk space is cheap nowadays.
I guess its easy to extract the still frame from the MJPEG stream (its a stream of JPEG files after all).