6

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.

  • Do you want to to truly be on the video itself? Or do you want this as you are *presenting* the video on the screen? – CommonsWare Nov 25 '13 at 22:06
  • 1
    On the video itself, yes. Not just on the presenter. – Lucas Camargo de Carvalho Nov 25 '13 at 22:09
  • Then something like `ffmpeg` is going to be required. There appear to be ways to use it directly on the device, though this may well be hard on the battery, and it certainly is not simple. – CommonsWare Nov 25 '13 at 22:27
  • I'd think that if video cameras could add watermarks without servers could do it, I'd think it would be simple. What do you have in mind, even if it is hard on the battery? – Lucas Camargo de Carvalho Nov 25 '13 at 22:36
  • 4
    "Simple" to me means "it's in the Android SDK or an easy-to-use library". I am not aware that adding `ffmpeg` via the NDK is simple. In terms of what I have in mind, use a search engine for `linux add video watermark`. – CommonsWare Nov 25 '13 at 23:05
  • 1
    for transparent view overlay , u may look at this project 'Showcaseview' ... https://github.com/Espiandev/ShowcaseView/blob/master/library/src/com/espian/showcaseview/ShowcaseView.java – Robert Rowntree Dec 04 '13 at 15:52
  • @RobertRowntree Lucas clearly stated way back on November 25 that the watermark needs to be in the video itself, not added during playback by the presenting software. – Chris Stratton Dec 04 '13 at 18:02
  • Perhaps something like this? http://www.youtube.com/watch?v=udEwEKz149w – fadden Dec 11 '13 at 23:10

1 Answers1

1

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.

Aditya
  • 2,876
  • 4
  • 34
  • 30
  • The OP wants to embed an image or some piece of text permanently over a video, not just during presentation. – Geeky Guy Dec 04 '13 at 15:10
  • updated the answer text. :) – Aditya Dec 04 '13 at 15:35
  • This is still in not an answer to question asked, as you present a *playback* solution rather than a *recording* or *transcoding* one which could match the problem Lucas needs to solve. – Chris Stratton Dec 04 '13 at 15:57
  • @ChrisStratton Actually, if Lucas can just overlay an icon over the visualization of what's being recorded, then this does answer the question. – Geeky Guy Dec 04 '13 at 17:50
  • No, it doesn't - the display isn't what is recorded. It's frankly disgusting that this guesswork from someone who can't be bothered to read the question asked should earn a bounty. – Chris Stratton Dec 04 '13 at 17:51
  • @Cris i am offended now. Frankly this was not for your bounty. I am a learner and trying honestly to help. I am obliged of this site for the community help. – Aditya Dec 04 '13 at 17:57
  • The first thing you need to learn about this site is to answer the question which was asked, or if you cannot do that, then not to attempt unrelated guesses. – Chris Stratton Dec 04 '13 at 18:00
  • I will try to impress you as well sir. Just try to avoid humiliate someone else like you did to me. – Aditya Dec 04 '13 at 18:14
  • I am not supporting @ChrisStratton's statement as the bounty transfer is between the owner and the grantee. But Aditya, you should really understand the question before providing an answer. Your recently posted answer on question [How to change the default color of DatePicker and TimePicker dialog in Android?](http://stackoverflow.com/questions/11077530/how-to-change-the-default-color-of-datepicker-and-timepicker-dialog-in-android) has the same problem. If the answer was as straight-forward as the one you have given, _there wouldn't be a bounty on it_. – Vikram Dec 04 '13 at 20:03
  • Aditya made an effort (unlike you guys who are just picking on him). I granted him the bounty because the suggestion in his latest edit, if used in tandem with robert's suggestion (in the question comments), will solve Lucas's problem. You can overlay the watermark over the camera's display, and then record that. Not straightforward, but a solution for a problem that was hitherto seen as unsolvable. – Geeky Guy Dec 04 '13 at 21:13
  • @Renan - no, the problem already has a known solution, stated in the question, which Lucas is simply unwilling to implement. Using ADB is a **severe** restriction, and basically unworkable for anything but a developer's own personal use as users are generally advised to keep ADB disabled. – Chris Stratton Dec 04 '13 at 21:22
  • 3
    @Aditya Sorry if I came off as rude before. You did make an effort to answer, and if the bounty owner agrees on your solution, I don't see any problem. Good luck. – Vikram Dec 05 '13 at 07:36
  • 1
    @ChrisStratton if you look at the title of the question, it ends with, and I quote: `(...) W/O Server`. If you think that **using a FFMPEG server** does solve the problem of watermarking a video **without using a server**, well, then this discussion is never going to end and I am really sorry for you. I have the same problem as the OP and all the info I got here was way more useful than anything I could find elsewhere, so Aditya gets the credit. – Geeky Guy Dec 05 '13 at 12:36
  • 1
    @ChrisStratton also, I think you are assuming this is to be used in a mass marketeable app. Did you consider for a moment that we may want to use the solution in the link just to do exactly what it says in there - record a video of an app being used? Where does it say that an app with such a solution is going to be distributed, so that we would need to have people change the config in their devices? – Geeky Guy Dec 05 '13 at 12:37
  • No, run ffmpeg locally on the phone. If you are in a position to run adb, the obvious solution is to transcode and watermark on your adb host. This is not about recording an app, its about recording the camera or modifying an existing video file – Chris Stratton Dec 05 '13 at 12:44