Feature #1608

make IOCipher version of android.media.MediaRecorder

Added by hans over 4 years ago. Updated almost 3 years ago.

Status:NewStart date:07/18/2013
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:0.3.1
Component:

Description

The MediaRecorder class is very useful for efficient capture from the camera. It writes to the file system using native code, so its not easy to use with IOCipher. Therefore, we should make an IOCipher subclass of it, that writes to libsqlfs rather than POSIX.

History

#2 Updated by der_die_das_jojo over 4 years ago

I am currently working on sth. like that.
i use IOCipher to encrypt a video recorded with the MediaRecorder.

So if you want i can contribute to this feature
it is a open source development and i can upload it in a few days to github,
but i need to cleanup the code a bit first.
der_die_das_jojo

#3 Updated by hans over 4 years ago

yes! We'd love to see that. We had some luck recording live audio input directly to IOCipher using this technique:

https://lists.mayfirst.org/pipermail/guardian-dev/2013-July/002031.html

It might be possible to do that with certain video formats too, like mp4/h264.

#4 Updated by der_die_das_jojo over 4 years ago

according to this:
http://developer.android.com/guide/appendix/media-formats.html

i think H.264 AVC with MPEG-TS would be the right choice.
unfortunately my current dev. smartphone doesn´t have android 3 and the CyanogenMod doesn´t support camera feature.

currently i am using H263 with 3GP which creates broken videos playable with vlc.
so i suppose it is a possible workaround for low-cost phones to offer something like recoring with h263 + 3gp and postprocessing with ffmpeg
after recording, but it´s not nice.

maybe one of you guys can try out H264 + MPEG-TS ?

#5 Updated by hans over 4 years ago

So there is a technique here that should be very useful for this problem. You can write out a standard mp4/h264 out to an unseekable file, then later correct the header information, and the mp4 will then be fully playable. I'm probing Shawn for the details.

#6 Updated by vitriolix over 4 years ago

That sounds promising, are you able to update the header through a stream too?

#7 Updated by hans over 4 years ago

I don't think you can update the header via the stream, it needs to happen in a different channel. So for your camera application, MediaRecorder would stream the video to IOCipher. Then when its complete, a separate class would working directly with IOCipher, reading the misplaced header in the newly recorded video, then writing the correct header.

#8 Updated by der_die_das_jojo over 4 years ago

thx a lot for the further information. i think some more research about the video format headers will be necessary. i can look this up. but i don´t have a lot of time the next 2-3 weeks. so if someone else is faster in contributing to this, i am also happy about it.

#9 Updated by hans almost 4 years ago

  • Target version changed from 61 to 0.2 - reliability and cacheword interop

#10 Updated by hans over 3 years ago

  • Target version deleted (0.2 - reliability and cacheword interop)

#11 Updated by hans over 3 years ago

  • Target version set to 0.3

#12 Updated by hans almost 3 years ago

  • Target version deleted (0.3)

#13 Updated by hans almost 3 years ago

  • Target version set to 0.3.1

Also available in: Atom PDF