title: Overlaying jpg onto Mp4 using -VF
body: <p>I am using the following command to overlay a jpg:</p>
  
  <p>ffmpeg -i in.mp4 -vf "movie=bb.png [movie]; [in] [movie] overlay=0:0 [out]" -vcodec libx264 -acodec copy out.mp4</p>
  
  <p>This works as expected with the first file (listed below) but it doesnt work with the second file. There is no error when I try with the second file, rather is creates an unusually large file that would not open:</p>
  
  <p>File 1:</p>
  
  <pre><code>[me@me ~]$ ffmpeg -i 2013-02-08.mp4 
  ffmpeg version 1.0.git Copyright (c) 2000-2012 the FFmpeg developers
    built on Jan 11 2013 00:12:08 with gcc 4.7.2 (GCC) 20120921 (Red Hat 4.7.2-2)
    configuration: 
    libavutil      52.  8.100 / 52.  8.100
    libavcodec     54. 74.100 / 54. 74.100
    libavformat    54. 37.100 / 54. 37.100
    libavdevice    54.  3.100 / 54.  3.100
    libavfilter     3. 23.101 /  3. 23.101
    libswscale      2.  1.102 /  2.  1.102
    libswresample   0. 17.101 /  0. 17.101
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2013-02-08.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      creation_time   : 2013-02-08 20:31:49
      encoder         : Lavf53.24.0
    Duration: 00:00:03.20, start: 0.000000, bitrate: 1030 kb/s
      Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x576 [SAR 1:1 DAR 5:4], 1247 kb/s, 8.08 fps, 7.50 tbr, 15 tbn, 15 tbc
      Metadata:
        creation_time   : 2013-02-08 20:31:49
        handler_name    : VideoHandler
      Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 8000 Hz, mono, s16, 12 kb/s
      Metadata:
        creation_time   : 2013-02-08 20:31:49
        handler_name    : SoundHandler
  At least one output file must be specified
  </code></pre>
  
  <p>File 2</p>
  
  <pre><code>[me@me ~]$ ffmpeg -i aq.mp4 
  ffmpeg version 1.0.git Copyright (c) 2000-2012 the FFmpeg developers
    built on Jan 11 2013 00:12:08 with gcc 4.7.2 (GCC) 20120921 (Red Hat 4.7.2-2)
    configuration: 
    libavutil      52.  8.100 / 52.  8.100
    libavcodec     54. 74.100 / 54. 74.100
    libavformat    54. 37.100 / 54. 37.100
    libavdevice    54.  3.100 / 54.  3.100
    libavfilter     3. 23.101 /  3. 23.101
    libswscale      2.  1.102 /  2.  1.102
    libswresample   0. 17.101 /  0. 17.101
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'aq.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      creation_time   : 2013-02-19 20:33:16
      encoder         : Lavf53.24.0
    Duration: 00:00:03.20, start: 0.000000, bitrate: 1394 kb/s
      Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x576 [SAR 1:1 DAR 5:4], 1451 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
      Metadata:
        creation_time   : 2013-02-19 20:33:16
        handler_name    : VideoHandler
      Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 8000 Hz, mono, s16, 12 kb/s
      Metadata:
        creation_time   : 2013-02-19 20:33:16
        handler_name    : SoundHandler
  At least one output file must be specified
  </code></pre>
  
  <p>In case it is important I am capturing these videos with Android devices. The first mp4 file is created by a Nexus 7, the second (the file which wont overlay the image) is created using a HTC Desire. </p>