Search code examples
androidwatermarkandroid-ffmpegvideo-watermarking

How can i add watermark to video in android studio with library


I want to add a watermark to a video. so that when user select a video from gallery in the android studio. then watermark will be added to the video automatically like this. Please check the image that how i want to add watermark logo to a video with auto adjust logo size according to the video.

enter image description here

Or when user will download a video then a watermark will be added to the videos. i have searched a lot but not found any library for adding watermark to a video. I have found something with FFMPEG but not working in android studio. so please provide me a library or a way to add watermark to a video.


Solution

  • There's a very easy solution for this, There's a precompiled library for android, as below https://github.com/WritingMinds/ffmpeg-android-java Simply include this as a gradle project in your code and add few methods as per their documentation and you are done with FFMPEG commands in android. This library is not very updated and have some missing features but still its good to use for many simple tasks.

    source: how to use latest FFMPEG in android studio project?

    you can find a tutorial about using this library at the following link:

    Integrate FFMpeg (Video Editor) Library using Android Studio Tutorial