简体   繁体   English

用于HTTP流服务器的实时视频流播放器

[英]Live video stream player for HTTP streaming server

I have a video streaming server that provides an HTTP API for live video streams. 我有一个视频流服务器,为实时视频流提供HTTP API。 A stream is sent as multipart/x-mixed-replace so each video frame is delimited with a certain boundary string like --DigifortBoundary for instance. 流以multipart/x-mixed-replace形式发送,因此每个视频帧都以某个边界字符串分隔,例如--DigifortBoundary Also each frame comes with its own Content-Type header which, according to this particular streaming server's documentation, can be one of these: 此外,每个帧都有自己的Content-Type标头,根据这个特定的流媒体服务器的文档,它可以是以下之一:

  • image/jpeg 图像/ JPEG
  • image/wavelet 图像/小波
  • video/mpeg 视频/ MPEG
  • video/h263 视频/ H263
  • video/h264 视频/ H264

Example of a stream: 流示例:

--DigifortBoundary
Content-Type: image/jpeg
Content-Length: 35463

JPEG_DATA
JPEG_DATA
..
..
..
JPEG_DATA
--DigifortBoundary
Content-Type: image/jpeg
Content-Length: 34236

JPEG_DATA
JPEG_DATA
..
..
.. JPEG_DATA

The problem is, I need to embed a video player in an HTML page but I could not find any player that supports the multipart/x-mixed-replace content type or even streaming via HTTP. 问题是,我需要在HTML页面中嵌入视频播放器,但我找不到任何支持multipart/x-mixed-replace内容类型甚至通过HTTP流式传输的播放器。 I know the flash video players out there usually support RTMP or RTSP , but I've never heard of a player that supports HTTP video streaming. 我知道那里的flash视频播放器通常支持RTMPRTSP ,但我从来没有听说过支持HTTP视频流的播放器。

Do you know any web video player that can do it? 你知道任何可以做到这一点的网络视频播放器吗?

on the client side VLC and Firefox can doit - probably lots more. 在客户端,VLC和Firefox可以做 - 可能还有更多。 On the server side: http://en.wikipedia.org/wiki/Motion_JPEG#M-JPEG_over_HTTP mentions three: 在服务器端: http//en.wikipedia.org/wiki/Motion_JPEG#M-JPEG_over_HTTP提到三:

  1. MJPG-Streamer: http://sourceforge.net/projects/mjpg-streamer/ MJPG-Streamer: http//sourceforge.net/projects/mjpg-streamer/
  2. ffmpeg-server as part of ffmpeg http://www.ffmpeg.org/ ffmpeg-server作为ffmpeg的一部分http://www.ffmpeg.org/
  3. cambozola http://www.charliemouse.com:8080/code/cambozola/ cambozola http://www.charliemouse.com:8080/code/cambozola/

This is what I personally found out: 这是我个人发现的:

  • MJPG-Streamer will only compile on linux flavors (does not compile eg on MacOS X) MJPG-Streamer只能在linux版本上编译(不能在MacOS X上编译)
  • ffmpeg-server on ubuntu if installed with apt-get install is likely outdated and buggy ubuntu上的ffmpeg-server如果与apt-get install一起安装可能已经过时且有问题
  • Cambozola seems to be more like a standalone client Cambozola似乎更像是一个独立的客户

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM