didi_X8
didi_X8

Reputation: 5068

render overlay graphics into camera video

I want to make an app which takes a video from the camera, adds additional visual info (overlays) and creates a video file from it which can later be uploaded to a server. How to do that?

Without prior experience with such tasks, I assume there are 2 options:

  1. screen-capture and encoding to video file. However the resulting framerate may not be sufficient.
  2. record the video to sdcard and reencode later with added overlays. Live encoding is not needed, thus it's ok for the encoding process to be slower then realtime.

Upvotes: 4

Views: 3556

Answers (2)

Stefan H Singer
Stefan H Singer

Reputation: 5504

You will have to resort to using for instance ffmpeg and the NDK to encode your own video. There's plenty of examples out there, but it's still somewhat cumbersome.

Upvotes: 2

Vicente Plata
Vicente Plata

Reputation: 3380

Hope this helps:

Use RelativeLayout. Put the camera preview as the first child of the RelativeLayout and the VideoView as the second child. The VideoView will appear to be "on top of" the SurfaceView for the camera preview.

BTW, VideoView really is a SurfaceView. Note that you may decide someday to use a SurfaceView and MediaPlayer, rather than a VideoView, so you can get more control on video playback

Source: http://osdir.com/ml/Android-Developers/2010-03/msg00077.html

Upvotes: 0

Related Questions