0

What is the simplest way to add a watermark to a video in iOS?

This is my code do far:

NSURL *url = [NSURL URLWithString:@"http://scontent-a.cdninstagram.com/hphotos-xfa1/t50.2886-16/10619021_616434485141882_380154097_n.mp4"];
videoPlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
[videoPlayer.moviePlayer prepareToPlay];
[videoPlayer.moviePlayer play];
Julian E.
  • 4,687
  • 6
  • 32
  • 49
SpaceInvader
  • 87
  • 3
  • 8
  • 1
    https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=how%20to%20add%20watermark%20on%20video%20ios – sanjeet Sep 23 '14 at 13:29

1 Answers1

0

The easiest way I can think of, if a watermark during play is what you want, is to superinpose a semitransparent image to your video player.

  • create a UIImageView
  • make sure the UIImageView has the same size and layout constraints of your video
  • make sure that the UIImageView is semitransparent (not opaque and with an appropriate alpha, if required)
  • [MPMoviePlayerViewController addSubview:]

and you should be about done.

Hope it helps

EDIT and there is the correct way to do it:

Add watermark on Video [SO answer]

as pointed out by sanjeet in it's comment.

Community
  • 1
  • 1
Rick77
  • 3,121
  • 25
  • 43