5

I know how to capture video on android device, but i would like to capture video and add some other information on it e.g. some funny timeclock and save it all to file so the person watching the video will see the exact time of capturing. I would also like to add some watermark. Do you know how can i do it or is it possible on android device? I read the API but couldnt find anything that could help me.

androdevo
  • 752
  • 1
  • 8
  • 17

2 Answers2

2

I was being asked this question a short time ago, and as a backup we came up with some sort of backup plan: send your stuff to a server and let that (using ffmpeg?) do the watermark, save the file, and send a link back to the phone.. Maybe that's a route to take?

edit: There seems to be an android port possible for FFMPEG. see for instance this link: http://gitorious.org/~olvaffe/ffmpeg/ffmpeg-android

I haven't had the time to compile it myself, but it seems you can either use the normal FFMPEG and the NDK, or use this version to compile for android. It's a bit more work, but looks do-able.

Nanne
  • 64,065
  • 16
  • 119
  • 163
  • Yeap, I thought about it... but it requires an external app. It would be nice to not include any externals in it... – androdevo Jan 12 '11 at 21:27
  • I've seen some links to "jffmpeg", which is supposed to be a java port of ffmpeg. Have not looked at that, but maybe you can use that, or port some encoder yourself, so you can use that? It would mean encode it as default, and then post-process it with your app... Maybe tricky, but not completely impossible? – Nanne Jan 13 '11 at 07:16
  • Just keep in mind how much data you would have to store in a non-movie format. It quickly grows. – Stefan H Singer Jan 13 '11 at 10:08
  • I will see if it help anyhow. Thanks:) – androdevo Jan 13 '11 at 10:21
  • If you find a solution to this, please keep me informed! – Nanne Jan 13 '11 at 10:23
  • added some info about android and ffmpeg – Nanne Mar 18 '11 at 17:07
1

I actually don't think that's possible. You can fetch video frames from a camera preview, but there's no good way to encode them to video. The standard video encoder (MediaRecorder) can only record the actual direct camera input into a video file.

Stefan H Singer
  • 5,469
  • 2
  • 25
  • 26
  • That's what API says.. I hoped that I missed something, because this functionality would be kind useful... – androdevo Jan 12 '11 at 21:29
  • Yeah, but I think it'd be quite a lot of data for the system to handle if the raw data would come from RAM. We'll have to wait a few years or so :) – Stefan H Singer Jan 13 '11 at 10:07