How to record the http live streaming from an IP Cam

主宰稳场 提交于 2019-12-12 05:17:42

问题


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

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. 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.

  2. 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

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


回答1:


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 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.



来源:https://stackoverflow.com/questions/12110522/how-to-record-the-http-live-streaming-from-an-ip-cam

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!