[Libav-user] Problem writing AAC-LC to MP4 using libavformat

Bob Kirnum bkirnum at gmail.com
Fri Jun 8 01:08:36 EEST 2018


I am trying to use libavformat to write AAC-LC frames (libfdk-aac) to MP4
(or M4A) files.  While it mostly works, playing back using standard players
results in poor quality and slightly faster playback.  One observation from
ffprobe is the pkt_duration and nb_samples values are inconsistent for the
frame dump.  For a 16 kHz sample rate input to the encoder, the
pkt_duration indicates 1280 while the nb_samples is 1024.  The pts related
values are consistent with the pkt_duration values reflecting 80 msec
frames.  Does this make sense?  Would this result in the playback issues I
am experiencing?  Looking at a good file recorded using iTunes, the
pkt_duration and nb_samples are consistent.  The first frame contains 960
samples while the remaining ones contain 1024 (44.1 kHz sampling).

Thanks,
Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180607/c3617f23/attachment.html>


More information about the Libav-user mailing list