title: How to combine a .mp4 video with a .wav audio with an offset in ffmpeg from command line?
body: <p>I've got a TV clip in mp4 format containing audio and video, and an WAV audio_commentary track.</p>
  
  <p>I've been trying to combine them in ffmpeg and then play it online with a flash player (which can only take h264 format)</p>
  
  <p>What's the best ffmpeg command to accomplish this? My inputs are MP4 video, WAV audio, and an offset in seconds, the time the audio commentary starts relative to the start of the mp4 video.</p>
  
  <p>I tried</p>
  
  <pre><code>ffmpeg -i input_audio.wav -i input_vid.mp4 -vcodec copy output.mp4
  </code></pre>
  
  <p>and</p>
  
  <pre><code>ffmpeg -vcodec copy -ss offset -i input_audio.wav -i input_video.mp4 output.mp4
  </code></pre>
  
  <p>nether of these do what I want and output the video in the h264 format that is good for flash players- Is there a way to do this from command line in ffmpeg?</p>