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”

LeiHec
[email protected]<mailto:[email protected]>



在 2018年10月26日,下午4:34,강구철 <[email protected]<mailto:[email protected]>> 写道:

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
[email protected]<mailto:[email protected]>
http://ffmpeg.org/mailman/listinfo/libav-user

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to