VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Using ffmpeg I add a video overlay successfully over an origin video (origin has audio, overlay doesn't). However the audio of the origin video doesn't appear in the result video.

    Code:
    ffmpeg  -i source.mp4 -i overlay.mp4 -filter_complex "[0:v]setpts=PTS-STARTPTS, scale=1280x720[top]; 
      [1:v]setpts=PTS-STARTPTS, scale=1280x720, format=yuva420p, 
      colorchannelmixer=aa=0.2[bottom]; [top][bottom]overlay=shortest=1" 
      -shortest -acodec copy -vcodec libx264 result1.mp4
    Even if I execute the following separate command on the result of the previous command - still no audio appears in the new result video.

    Code:
      ffmpeg -i result1.mp4 -i audio.mp3 -c:v copy -c:a aac result2.mp4
    Thanks
    Quote Quote  
  2. You should use map (https://trac.ffmpeg.org/wiki/Map) to specify which input provides the audio and which the video.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. For example, use the video from the first file, the audio from the second:
    Code:
    -map 0:v -map 1:a
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!