title: Inserting an image inside a video at particular position via PHP and a video extension
body: <p>What I am trying to do is, placing a small static image on inside a video clip at server side, by making use of PHP.</p>
  
  <p>For example, in TV news, you might see the culprit's photo at a corner when the anchor describes about a crime incident.</p>
  
  <p>I've tried doing some research. And found the <a href="http://ffmpeg-php.sourceforge.net/" rel="nofollow">ffmpeg-php extension</a> for PHP. When going through <a href="http://ffmpeg-php.sourceforge.net/doc/api/" rel="nofollow">the docs</a>, I couldn't find any ready made methods or classes that would insert a picture at a particular position if we pass the x and y positions like in GD.</p>
  
  <p>But there is a <a href="http://ffmpeg-php.sourceforge.net/doc/api/ffmpeg_frame.php" rel="nofollow">ffmpeg_frame</a> object available and I think it could be used to fetch frames one by one as an image. And we would do the insertion of our required image inside this using the GD functions. After insertion of the image in all the frames, we would generate the video using these frames. That's my idea. But that extension's docs doesn't reveal anything about creating the video from frames. Only talks about creating animate GIFs !</p>
  
  <p>Would it be a big load for PHP by using the above way of inserting image in each frame and then generating the video from it(if it is possible) ?</p>
  
  <p>Or are there any better ways available to do this insertion process. I mean any other better extensions or video libraries available ?</p>
  
  <p>The aim is to insert an image in a video, which would be at a particular position through out the video.</p>
  
  <p>Thanks in advance.</p>