title: FFMPEG - Adding a full-frame image to the beginning of a video
body: <p>I have tried many different ways to try to create a 10 second video file out of an image file and have used all the same switches and codecs as I used to encode my video file.  However, when I concat the two using anything but complex_filter (which forces the video through another round of transcoding), the resulting video file is corrupt.  I believe this is due to the inherent differences of the 10 second clip that ffmpeg created from the image, but there must be some way to get it to encode the exact same way as my video file.</p>
  
  <p>Here is the command I am using to turn the image into a 10s video clip (I added a silent mp3 because I thought that an audio stream starting partway through the video was messing things up):</p>
  
  <pre><code>ffmpeg -loop 1 -i splash.jpg -i silence.mp3 -c:v libx264 -preset slow -g 60 -r 29.97 -crf 16 -c:a libfdk_aac -b:a 256k -cutoff 18000 -t 5 tmpoutput1.mp4
  </code></pre>
  
  <p>Here is the command I am using to encode my video:</p>
  
  <pre><code>ffmpeg -i input.f4v -c:v libx264 -preset slow -g 60 -r 29.97 -crf 16 -c:a libfdk_aac -b:a 256k -cutoff 18000 tmpoutput2.mp4
  </code></pre>
  
  <p>Here is the command I use to convert both of them to .ts to get ready for concat:</p>
  
  <pre><code>ffmpeg -i tmpoutput1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts tmpoutput1.ts
  </code></pre>
  
  <p>And finally the concat (which is where I get crazy video corruption, everything along the way looks fine):</p>
  
  <pre><code>ffmpeg -i "concat:tmpoutput1.ts|tmpoutput2.ts" -c copy output.mp4
  </code></pre>
  
  <p>Again, the issue is that I'm already transcoding everything once and I should be able to get it to transcode in a similar enough structure so that it can be concatenated without another transcode tacked onto the end.  </p>
  
  <p>Has anyone successfully added a full-frame splash graphic to the front of a video with ffmpeg before?  I am using a brand new cross-compile of ffmpeg as I thought that might be the issue, but alas, the issue persists after the update.</p>
  
  <p>Thanks!</p>