<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>

CC BY-SA 4.0
2018-11-26T05:05:44.587Z
2018-11-26T05:05:44.587Z
Gyan
<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>

CC BY-SA 4.0
2018-11-25T05:49:34.433Z
Share full log.
Gyan
CC BY-SA 4.0
2018-11-26T02:18:55.863Z
Did smaller test and posted information in description.
kite
<ffmpeg>
Highest quality convert of wav to aac to fit in mp4 container?
kite
# 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.

**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.


---

