Answers.Body: <p>The output is fine. Audacity uses an old version of ffmpeg, which does not skip the <a href="https://stackoverflow.com/a/42415886/5726027">priming sample</a>. Other players should skip it. AAC streams <strong>will</strong> be encoded with that sample, so it's all about the player's handling.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-26T05:05:44.587Z
Answers.LastActivityDate: 2018-11-26T05:05:44.587Z
Answers.UserDisplayName: Gyan
Body: <p>Edit: These should probably be merged as they both go back to the same issue now:
  <a href="https://sound.stackexchange.com/questions/45177/exporting-wav-as-m4a-creating-sync-issue-in-audacity">https://sound.stackexchange.com/questions/45177/exporting-wav-as-m4a-creating-sync-issue-in-audacity</a>  </p>
  
  <p>So I need to convert a .wav f32 track into the highest quality format possible that fits in a mp4 container.</p>
  
  <p>It says Mp4 will support: MP2, MP3, LC-AAC, HE-AAC, AC3</p>
  
  <p>From what I read online, LC-AAC is the highest quality of the bunch.</p>
  
  <p>Basic command seems to be:</p>
  
  <pre><code>ffmpeg -i input.wav output.m4a
  </code></pre>
  
  <p>But I get an out of sync issue where the m4a is playing about half a second later throughout than the original wav. And the bit rate of this output seems to be very low, 100's.</p>
  
  <p>"When compatibility with hardware players does matter then use libmp3lame or ac3 in a MP4/MKV container when libfdk_aac isn't available."</p>
  
  <p>Is this...what I'd want below? Or are there other things to improve quality I can specify? or maybe its just wrong syntax already.    </p>
  
  <pre><code>ffmpeg -i input.wav -c:a "something" -q:a 330 output.m4a
  </code></pre>
  
  <p><strong>LOG AND IMAGE TEST UPDATE:</strong>
  First picture is a wav audio file at the top. Then the aac created in ffmpeg, sync issue is present.</p>
  
  <p><a href="https://i.sstatic.net/pGoBC.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/pGoBC.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.sstatic.net/iIQal.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/iIQal.jpg" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-25T05:49:34.433Z
Comments.Text: Share full log.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-26T02:18:55.863Z
Comments.Text: Did smaller test and posted information in description.
Comments.UserDisplayName: kite
Tags: <ffmpeg>
Title: Highest quality convert of wav to aac to fit in mp4 container?
UserDisplayName: kite
ThreadText: # Highest quality convert of wav to aac to fit in mp4 container?
  
  (Asked by: username_0 on 2018-11-24)
  
  Edit: These should probably be merged as they both go back to the same issue now:
  <https://sound.stackexchange.com/questions/45177/exporting-wav-as-m4a-creating-sync-issue-in-audacity>
  
  So I need to convert a .wav f32 track into the highest quality format possible that fits in a mp4 container.
  
  It says Mp4 will support: MP2, MP3, LC-AAC, HE-AAC, AC3
  
  From what I read online, LC-AAC is the highest quality of the bunch.
  
  Basic command seems to be:
  
  ```
  ffmpeg -i input.wav output.m4a
  
  ```
  
  But I get an out of sync issue where the m4a is playing about half a second later throughout than the original wav. And the bit rate of this output seems to be very low, 100's.
  
  "When compatibility with hardware players does matter then use libmp3lame or ac3 in a MP4/MKV container when libfdk\_aac isn't available."
  
  Is this...what I'd want below? Or are there other things to improve quality I can specify? or maybe its just wrong syntax already.
  
  ```
  ffmpeg -i input.wav -c:a "something" -q:a 330 output.m4a
  
  ```
  
  **LOG AND IMAGE TEST UPDATE:**
  First picture is a wav audio file at the top. Then the aac created in ffmpeg, sync issue is present.
  
  [![enter image description here](https://i.sstatic.net/pGoBC.jpg)](https://i.sstatic.net/pGoBC.jpg)
  
  [![enter image description here](https://i.sstatic.net/iIQal.jpg)](https://i.sstatic.net/iIQal.jpg)
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: Share full log.  
  > **username_0**: Did smaller test and posted information in description.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-11-26. Score: 1 | Accepted answer
  
  The output is fine. Audacity uses an old version of ffmpeg, which does not skip the [priming sample](https://stackoverflow.com/a/42415886/5726027). Other players should skip it. AAC streams **will** be encoded with that sample, so it's all about the player's handling.
  
  
  ---
  
  