来自我的廉价中国 IP 网络摄像头的 JPEG 流是什么格式?
我有一个便宜的中国 IP 网络摄像头,它有一个显示实时视频的网络界面。该视频似乎是输入浏览器的一系列 jpeg 图像。如果我将 wget 指向 URL http://my-ip-camera/video.cgi 我接收以下格式的大量流数据:
--ipcamera
Content-Type: image/jpeg
Content-Length: 46056
JFIF header data
... lots of data ...
此模式对每个“帧”重复。
这是我可以播放/转码的某种“标准”流格式,还是强行输入我的浏览器的一些 JPEG 集合,只是尽可能快地呈现它们?
我尝试使用 VLC,但它无法处理该 URL。
我的 IP 摄像头中的软件非常糟糕,所以我想捕获这个流并在我的 Linux 机器上处理它。我可以使用一些 ffmpeg/mplayer 工具来执行此操作吗?
I've got a cheap Chinese IP webcam that has a web interface showing live video. The video appears to be a sequence of jpeg images fed into the browser. If I point wget at the URL http://my-ip-camera/video.cgi I receive a big chunk of streamed data in the following format:
--ipcamera
Content-Type: image/jpeg
Content-Length: 46056
JFIF header data
... lots of data ...
this pattern repeats for every "frame".
Is this some "standard" streaming format I can play/transcode with something, or is it some made up collection of JPEGs forced into my browser that just renders them as quick as it can?
I tried using VLC but it couldn't process the URL.
The software in my IP cam is pretty terrible, so I want to capture this stream and process it on my Linux machine instead. Is there some collection of ffmpeg/mplayer tools I can use to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来像 MIME 多部分,以“ipcamera”作为边界。
http://en.wikipedia.org/wiki/MIME#Multipart_messages
你能发布数据的最开始?
有很多库可以使用 MIME 多部分。我认为,你应该找到JS库来解析MIME-multipart并将其传递到浏览器的动态DOM中。或者您可以使用 perl 或其他支持 MIME 的脚本并从此流中获取 jpeg。
更新:
实际上,这是“M-JPEG over HTTP” http://en.wikipedia.org/wiki/Motion_JPEG#M-JPEG_over_HTTP
以下是此格式生成的示例 http://nakkaya.com/2011/03/23/streaming-opencv-video-over-the-network-using-mjpeg/ - 这就是你所拥有的。
这是一个 python 客户端: http://code.google.com/ p/python-mjpeg-over-http-client/
Looks like MIME multipart with "ipcamera" as boundary.
http://en.wikipedia.org/wiki/MIME#Multipart_messages
Can you post the very beginning of data?
There are a lot of libraries to work with MIME multipart. I think, you should find JS library to parse MIME-multipart and pass it into dynamic DOM of browser. Or you can use perl or other scripting with MIME support and get jpegs from this stream.
UPDATE:
actually, this is the "M-JPEG over HTTP" http://en.wikipedia.org/wiki/Motion_JPEG#M-JPEG_over_HTTP
Here is an example of this format generation http://nakkaya.com/2011/03/23/streaming-opencv-video-over-the-network-using-mjpeg/ - it is exaclty what you have.
Here is a python client: http://code.google.com/p/python-mjpeg-over-http-client/
听起来像 Motion JPEG,或者至少是其中的一些变体。
Sounds like Motion JPEG, or at least some variant thereof.