Answers.Body: <p>You have to mix both audios, else ffmpeg will pick one from among the inputs.</p>
  
  <p><code>ffmpeg -y -threads 4 -loglevel quiet -ss 0 -t 220.162 -i left.webm 
  -ss 0 -t 220.162 -i right.webm -filter_complex "[0]scale=320:-1,pad=2*iw:2*ih:0:120[left];
  [1]scale=320:-1[right];[left][right]overlay=main_w/2:120,scale=640:480;[0][1]amix" -shortest output.mp4</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-07T07:50:25.173Z
Answers.LastActivityDate: 2019-08-07T07:50:25.173Z
Answers.UserDisplayName: Gyan
Body: <p>I was trying to combine two separate video into one side by side using ffmpeg using the following command in ubuntu server.</p>
  
  <pre><code>ffmpeg -y -threads 4 -loglevel quiet -ss 0 -t 220.162 -i left.webm 
  -ss 0 -t 220.162 -i right.webm -filter_complex "[0]scale=320:-1,pad=2*iw:2*ih:0:120[left];
  [1]scale=320:-1[right];[left][right]overlay=main_w/2:120,scale=640:480" -shortest output.mp4
  </code></pre>
  
  <p>The video is processed successfully as expected. But the audio is missing from right.webm. Audio from one video is missing from the output.mp4.
  How to fix this issue.</p>
  
Tags: <ffmpeg>
Title: FFMPEG - Audio missing after combining video
UserDisplayName: Shijin
ThreadText: # FFMPEG - Audio missing after combining video
  
  (Asked by: username_0 on 2019-08-07)
  
  I was trying to combine two separate video into one side by side using ffmpeg using the following command in ubuntu server.
  
  ```
  ffmpeg -y -threads 4 -loglevel quiet -ss 0 -t 220.162 -i left.webm 
  -ss 0 -t 220.162 -i right.webm -filter_complex "[0]scale=320:-1,pad=2*iw:2*ih:0:120[left];
  [1]scale=320:-1[right];[left][right]overlay=main_w/2:120,scale=640:480" -shortest output.mp4
  
  ```
  
  The video is processed successfully as expected. But the audio is missing from right.webm. Audio from one video is missing from the output.mp4.
  How to fix this issue.
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-08-07. Score: 1
  
  You have to mix both audios, else ffmpeg will pick one from among the inputs.
  
  `ffmpeg -y -threads 4 -loglevel quiet -ss 0 -t 220.162 -i left.webm
  -ss 0 -t 220.162 -i right.webm -filter_complex "[0]scale=320:-1,pad=2*iw:2*ih:0:120[left];
  [1]scale=320:-1[right];[left][right]overlay=main_w/2:120,scale=640:480;[0][1]amix" -shortest output.mp4`
  
  
  ---
  
  