Answers.Body: <p><a href="http://www.ffmpeg.org/download.html" rel="noreferrer">ffmpeg</a> looks promising. Might be worth a shot.</p>
  
  <p>Specifically, the <a href="https://www.youtube.com/watch?v=eXfp4S1xZsw" rel="noreferrer">command</a></p>
  
  <pre><code>ffmpeg -i video.mp4 -i audio.m4a -acodec copy -vcodec copy output.mp4
  </code></pre>
  
  <p>should do the trick.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2016-09-02T13:06:22.327Z
Answers.LastActivityDate: 2018-12-20T20:26:36.457Z
Answers.LastEditDate: 2018-12-20T20:26:36.457Z
Answers.UserDisplayName: sgryzko
Answers.Body: <p><a href="http://www.videohelp.com/tools/MP4Muxer" rel="nofollow">MP4muxer</a> will do the job, it even takes raw h264 streams.</p>
  
  <p>This process is usually called "muxing" and can be done with virtually any container format.
  Of course audio and video has to have the exact same length to have synchronized audio and video.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-09T13:53:14.877Z
Answers.LastActivityDate: 2014-06-09T14:26:46.367Z
Answers.LastEditDate: 2014-06-09T14:26:46.367Z
Answers.UserDisplayName: timonsku
Answers.Body: <p>If your output container can handle the relevant codecs, then you can simply copy both audio and video streams using ffmpeg:</p>
  
  <pre><code>ffmpeg -i video.mp4 -i audio.m4a -c copy output.mp4
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-19T16:05:26.020Z
Answers.Text: Thanks, but how does it differs from the answer of the sgryzko?
Answers.UserDisplayName: Slava Fomin II
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-20T20:44:15.790Z
Answers.Text: It is simplified, yet provides the same resultant function.
Answers.UserDisplayName: ransur0t
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-19T13:37:19.040Z
Answers.LastActivityDate: 2018-07-19T13:37:19.040Z
Answers.UserDisplayName: ransur0t
Body: <p>I have two files, one is <strong>MP4</strong> file with video only and another is <strong>M4A</strong> audio file. What is the best and simpliest method of merging these two tracks in a single MP4 container? Is it possible to do this without transcoding (loosing quality)? Thanks!</p>
  
  <p>Open source and free software is my preference.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-09T13:28:35.513Z
Comments.Text: Do they actually line up correctly or do you also need to synchronize them?  If it is synced, this is effectively a duplicate of http://video.stackexchange.com/questions/10730/combine-video-and-audio-ts-segments-coming-from-hls-stream/.  Different source for the streams, but same solution should work.
Comments.UserDisplayName: AJ Henderson
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-09T13:48:44.327Z
Comments.Text: I wouldn't say its a 100% duplicate. While the answer works, there are also other tools specifically for MP4.
  The question might help people that search specifically for MP4 merging.
Comments.UserDisplayName: timonsku
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-09T14:25:43.920Z
Comments.Text: Scratch that, tsMuxer only allows MP4 as input not as output.
Comments.UserDisplayName: timonsku
Tags: <software-recommendation><mp4>
Title: Merge MP4 with M4A
UserDisplayName: Slava Fomin II
ThreadText: # Merge MP4 with M4A
  
  (Asked by: username_0 on 2014-06-09)
  
  I have two files, one is **MP4** file with video only and another is **M4A** audio file. What is the best and simpliest method of merging these two tracks in a single MP4 container? Is it possible to do this without transcoding (loosing quality)? Thanks!
  
  Open source and free software is my preference.
  
  **Tags:** software-recommendation, mp4
  
  > **Comments:**
  > **username_1**: Do they actually line up correctly or do you also need to synchronize them?  If it is synced, this is effectively a duplicate of http://video.stackexchange.com/questions/10730/combine-video-and-audio-ts-segments-coming-from-hls-stream/.  Different source for the streams, but same solution should work.  
  > **username_2**: I wouldn't say its a 100% duplicate. While the answer works, there are also other tools specifically for MP4. The question might help people that search specifically for MP4 merging.  
  > **username_2**: Scratch that, tsMuxer only allows MP4 as input not as output.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2016-09-02. Score: 17
  
  [ffmpeg](http://www.ffmpeg.org/download.html) looks promising. Might be worth a shot.
  
  Specifically, the [command](https://www.youtube.com/watch?v=eXfp4S1xZsw)
  
  ```
  ffmpeg -i video.mp4 -i audio.m4a -acodec copy -vcodec copy output.mp4
  
  ```
  
  should do the trick.
  
  
  ---
  
  ### Answer by username_2 on 2014-06-09. Score: 3
  
  [MP4muxer](http://www.videohelp.com/tools/MP4Muxer) will do the job, it even takes raw h264 streams.
  
  This process is usually called "muxing" and can be done with virtually any container format.
  Of course audio and video has to have the exact same length to have synchronized audio and video.
  
  
  ---
  
  ### Answer by username_4 on 2018-07-19. Score: 2
  
  If your output container can handle the relevant codecs, then you can simply copy both audio and video streams using ffmpeg:
  
  ```
  ffmpeg -i video.mp4 -i audio.m4a -c copy output.mp4
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks, but how does it differs from the answer of the username_3?  
  > **username_4**: It is simplified, yet provides the same resultant function.  
  
  ---
  
  