3 ms·
Glad that someone is doing this. The last time I looked at it, it was hard to do hardware encoded video (out)streaming well on the iphone. The open API only all
by srean 13y ago
Glad that someone is doing this. The last time I looked at it, it was hard to do hardware encoded video (out)streaming well on the iphone. The open API only allowed writing the compressed stream to a file. Pipelining or FIFO tricks did not work well because the file was not in a consistent state untill it had been closed. It appeared that the OS was not flushing key metadata until then. So the options seemed to be either have a quick cycle of starting and stopping recording on a ring buffer of files, this would drop frames; or parse and fix (with some second guessing) the compressed stream in the application. The first one was easier to implement but quality wasn't great, although software interpolation of the dropped frames might help some. The second seemed too much work.
Has the scenario on the open API changed ? I would guess not. Congrats for taking care of this.
- chrisballinger 13y agoUnfortunately Apple still doesn't expose the APIs that we need and are forced to use tricks to get the encoded frames. We based our hardware encoder wrapper on the technique described by Geraint Davies [1], but have modified and improved upon his method. The main trick is to encode only video frames in your temporary .mp4 file, and to make an additional 1 frame .mp4 file for extracting the avcC record. 1. http://www.gdcl.co.uk/2013/02/20/iOS-Video-Encoding.html http://www.gdcl.co.uk/2013/02/20/iOS-Video-Encoding.html