[Libav-user] OPUS transcoding to AAC but 960 sample increase to 1024 with a nomalized blank data.

He Lei helei0908 at hotmail.com
Fri Oct 26 12:15:47 EEST 2018

Using “audio_fifo” to cache samples, When the samples number in fifo is enough to 1024, and then encode it.
The last, If the number of samples  is less than 1024 in fifo, fill with mute

look at “doc/examples/transcode_aac.c”

helei0908 at hotmail.com<mailto:helei0908 at hotmail.com>

在 2018年10月26日,下午4:34,강구철 <kckang at skycom.ne.kr<mailto:kckang at skycom.ne.kr>> 写道:

Im transcode voice comming from WebRTC through by RTP with h264 video.
received sound unit is 20msec OPUS stereo 48000 2channel sample per second
its good decoded to PCM32 FLTP type and good play.
after decode I encode to AAC 48000 stereo frame nb_samples is 960. but encoding ffmpeg aac function
attach 64 samples every each decoded raw PCM samples. what should I do for it to improving final aac product quality ?

now I found AAC Context be able to control cypher block size 1024 to 960. some documents say aac encoder default block is 1024.

AACContext *ac = (AACContext*)aac_context->priv_data;
MPEG4AudioConfig *m4ac = &(ac->oc[0].m4ac);
m4ac->frame_length_short = 1;//1:960, 0:1024

is this right approching ? appriciate any kinds of oppinion of you guys!!

Libav-user mailing list
Libav-user at ffmpeg.org<mailto:Libav-user at ffmpeg.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20181026/3f6605e2/attachment.html>

More information about the Libav-user mailing list