如何记录从IP摄像头的HTTP实时流 [英] How to record the http live streaming from an IP Cam

查看:622
本文介绍了如何记录从IP摄像头的HTTP实时流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了该客户端可以查看IP摄像头,是给应用
MJPEG使用此链接的HTTP实时流
的Andr​​oid ICS和MJPEG使用AsyncTask的

I have created the application in which the client can view the ip camera which is giving an http live stream of MJPEG using this link Android ICS and MJPEG using AsyncTask

现在我希望用户录制视频到其存储卡。
我用Google搜索了一会儿,里面传来在我的脑海里只有两种方法: -

Now i want the user to record the video into its memory card . I have googled for a while and the only two approaches which came in my mind :-


  1. 任我保持存储JPEG图像,当用户单击停止录制,然后我
    不知何故剪辑的所有图像,以提供一个3GP视频或一些其它的文件格式。
    但我不知道如何从所有图像创建视频,并将这是一个有效
    方法还是不行。

  1. Either i keep storing the jpeg images and when user clicks stop recording then i somehow clip all the images as to provide a 3GP video or some other file format. But i don't know how to create the video from all the images and will this be an efficient approach or not.

不然我ffmpeg的,在这种情况下,我将不得不面对NDK,它似乎是一个较长的
路径可能导致无处:P

Or i do ffmpeg and in this case i will have to deal with NDK and it seems to be a longer path which may lead to nowhere :P

所以FFmpeg的是一个更好的选择?如果是,请分享一些链接或者是第一个选择更好的。
在此先感谢

So is FFMPEG a better option? If yes please share some links or is the first option better. Thanks in advance

推荐答案

FFmpeg的是更好的选择,但你可能会卡住了pretty编码分辨率差/ COM pression。也许一些低质量的MPEG-4 XVID一样会工作,但即使这可能需要太高的从CPU的性能。

FFmpeg is the better option, but you'll probably get stuck with a pretty poor encoding resolution/compression. Maybe some low quality MPEG-4 like xvid will work, but even that might require too high of performance from the CPU.

Android的没有一个API来访问视频连接$ C $华润励致在SoC,所以本机实现是pretty多少你唯一的选择。如果是这样,FFmpeg的NDK通过大概是最容易的。

Android doesn't have an API to access the video encoder logic in the SoC, so a native implementation is pretty much your only choice. If so, FFmpeg through NDK is probably the easiest.

这篇关于如何记录从IP摄像头的HTTP实时流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆