I have been looking for a way to add a watermark, be it image or text, on a video. Something like "Property of XYZ", or how many seconds it's been since the video started recording "2:45." on the bottom right.
So far, I have only found solutions that involve using FFMPEG servers. That is not what I was looking for, and I was wondering if a simpler solution exists.
You can check the VideoLAN player. An Open Source player available with GPL License renders almost all type of video files. You can have the source code and modify as per your requirement. In this case you have to add a layer over the video for predefined time period or just leave the watermark 'ON' for entire video rendering period.
Project codes are available at GIT. See Mobile VLC for better vision on this.
For screen recording Android has provided methods for version Kitkat and above (>4.4). You can access screen recording through the adb tool included in the Android SDK, using the command adb shell screenrecord.
Sample code: (by default it records at 4Mbps)
adb shell screenrecord --bit-rate 8000000 /sdcard/yourfilename.mp4
This shall be of interest to you.
来源:https://stackoverflow.com/questions/20204033/android-video-watermark-w-o-server