Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Video encoding libraries for iOS

I really stucked with that problem, because I haven't seen enough information in the internet regarding video encoding in iOS, however we can observe plenty of apps that deal with the problem of video streaming successfully (skype, qik, justin.tv, etc.)
I'm going to develop an application, that should send video frames obtained from camera and encoded in h.263 (h.264 or MPEG-4 it is under decision) to a web-server. For this, I need some video encoding library. Obviously, ffmpeg can deal with that task, but it is under LGPL license, which could probably lead to some problems in submitting the app in the AppStore. On the other hand, there are some applications, which are seemed to use ffmpeg library, but only Timelapser clearly states this fact in app description. Does this mean, that other apps are not using ffmpeg or just hiding this information?

Please, share your thoughts and experience in this topic. I'm open for dicsussion.

like image 893
peetonn Avatar asked Nov 02 '11 11:11

peetonn


People also ask

What is Apple VideoToolbox?

Overview. VideoToolbox is a low-level framework that provides direct access to hardware encoders and decoders. It provides services for video compression and decompression, and for conversion between raster image formats stored in CoreVideo pixel buffers.

What is a video encoding software?

Encoding software is a tool that converts video files from one format to another. An encoder takes the RAW video files and converts them to digital files which is an essential step in of the process of streaming video.

Can you encode a video?

What is video encoding? In simple terms, encoding is the process of compressing and changing the format of raw video content to a digital file or format, which will in turn make the video content compatible for different devices and platforms. The main goal of encoding is to compress the content to take up less space.


1 Answers

After googling and making some research in this area, I found this one library http://www.foxitsolutions.com/iphone_h264_sdk.html. They really use hardware encoding. I've examined demo example with instruments, and they showed me that while encoding, ~12% cpu is used and syscall read() constantly called. From that I can conclude, that their library uses standard AVFoundation's AVAssetWriter to write into the temporary file, and (most probably) concurrent thread is used to read this temp file for retrieving encoded frames.

Also, take a look at http://www.videolan.org/developers/x264.html. It is under GPL, but still can be useful.

like image 166
peetonn Avatar answered Oct 16 '22 06:10

peetonn