Skip to content Skip to sidebar Skip to footer

Video Recording To A Circular Buffer On Android

I'm looking for the best way (if any...) to capture continuous video to a circular buffer on the SD card, allowing the user to capture events after they have happened. The standard

Solution 1:

In Android's MediaRecorder there is two way to specify the output. One is a filename and another is a FileDescriptor.

Using static method fromSocket of ParcelFileDescriptor you can create an instance of ParcelFileDescriptor pointing to a socket. Then, call getFileDescriptor to get the FileDescriptor to be passed to the MediaRecorder.

Since you can get the encoded video from the socket (as if you were creating a local web server), you will be able to access individual frames of the video, although not so directly, because you will need to decode it first.

Post a Comment for "Video Recording To A Circular Buffer On Android"