Adding an Image Frame or Watermark for Video in Android programmatically
Asked Answered
B

1

18

I am working on an Android Camera Application which have capability of Image and Video capturing. Later users can annotate on the image and add watermark to Video. All went fine when drawing Annotation on Image but failed to get no solution. In iPhone there AVComposition Library to draw watermark on Videos. I don't know whether such library exists for android or not but I would like to know if someone has come across such requirement and got any solution.

Can some one guide how to get it started for composing an image on Video. Atleast adding text to the Video somewhere

Benghazi answered 31/7, 2013 at 16:22 Comment(4)
have you found the solution ?Maggoty
any solution about this?Trumpet
No, i couldn't get any solution for that except showing TextView with Position set dynamically..if you get something then let me know here pleaseBenghazi
any update about it ?Drabbet
G
0

In case anyone is still looking for this - ffmpeg can be used on Android to add a watermark to a video, but you do need to be aware that video processing on a power and processing limited device like a mobile may be slow and may run down battery if used extensively.

An example of the ffmpeg command to add a watermark to a video using ffmpeg, from the ffmpeg documentation is:

ffmpeg -i video.mkv -i image.png -filter_complex '[0:v][1:v]overlay[out]' -map '[out]' out.mkv

See here for the official documentation: https://ffmpeg.org/ffmpeg.html and look at '-filter_complex filtergraph (global)'

ffmpeg can be used in Android projects using one of the wrapper libraries that exist to support this. Although, ffmpeg was designed as a command line tool, this approach does work reliably in my experience.

The library below is a good example of a well supported Android ffmpeg wrapper library and it includes a sample APK so you may be able to actually try out the ffmpeg command you need with that to ensure it works before adding to your own project.

Gravely answered 9/12, 2019 at 17:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.