title: Video Overlay from Android
body: <p>I have been trying to add image overlay on video, so that overlay image gets displayed for particular timeframe only.</p>
  
  <p>By following the instructions from following link I am able to do overlay video with image such overlaid image is displayed for entire video running length.
  <em><a href="http://ffmpeg.gusari.org/viewtopic.php?f=8&amp;t=1181" rel="nofollow">http://ffmpeg.gusari.org/viewtopic.php?f=8&amp;t=1181</a></em></p>
  
  <p><strong>FFMPEG Command Used:</strong>    </p>
  
  <pre><code>/data/data/com.example.test/lib/libffmpeg.so -i /storage/sdcard0/e.mp4 -i /storage/sdcard0/a.png -filter_complex [0:v][1:v]overlay=10:10 -codec:a copy /storage/sdcard0/testFFmpeg/cle3far.3gp 
  </code></pre>
  
  <p>However I need to overlay image for particular time interval of video. So I tried following command but it didn’t work.</p>
  
  <p><strong>FFMPEG Command that didn’t work:</strong>    </p>
  
  <pre><code>/data/data/com.example.test/lib/libffmpeg.so -i /storage/sdcard0/e.mp4 -i /storage/sdcard0/a.png -filter_complex [0:v][1:v]overlay=10:10:enable=between(t\,0\,30) -codec:a copy /storage/sdcard0/testFFmpeg/cle3far.3gp 
  </code></pre>
  
  <p><strong>Error Message:</strong></p>
  
  <blockquote>
    <p>Key ‘enable’ not found. ShelloutError initializing
    filter 'overlay' with args '10:10:enable=between(t,0,30)' 
    ShelloutError configuring filters.</p>
  </blockquote>
  
  <p>By googling, I was able to find that I need FFMPEG 2.0, so I tried creating new ffmpeg library by following <em><a href="http://vec.io/posts/how-to-build-ffmpeg-with-android-ndk" rel="nofollow">http://vec.io/posts/how-to-build-ffmpeg-with-android-ndk</a></em>, but it didn’t work either.</p>
  
  <p>It would be great if someone can get me anything from following:</p>
  
  <ol>
  <li>an Android precompiled library for FFMPEG 2.0+ (libffmpeg.so) </li>
  <li>or a way to do image overlay without FFMPEG</li>
  </ol>