[Libav-user] Adding AMR frames to audio stream of video file

adev dev androiddevmar11 at gmail.com
Wed Jul 1 16:43:16 CEST 2015


I have more debug output.  Now I am trying to read AMR frames and encode
them to AAC. AMR sample format after decoding frame is AV_SAMPLE_FMT_FLT.
Audio stream in video file has sample format set to AV_SAMPLE_FMT_FLT as
well. But these data is encoded as AAC. I see that AAC has AV_SAMPLE_FMT_FLTP
sample format. Do I have to resample AMR samples from
AV_SAMPLE_FMT_FLT to AV_SAMPLE_FMT_FLTP
before encoding to AAC?

On 1 July 2015 at 10:40, adev dev <androiddevmar11 at gmail.com> wrote:

> I am compressing movies from bitmaps and audio files. With AAC files it is
> working correctly. But when I have AMR_WB files sound is corrupted. I can
> recognise correct words in video file but it is delayed and with very bad
> quality.
>
> My AMR files are recorded with parameters:
> - sampling rate: 16000,
> - bitrate: 23000.
>
> I am setting this parameters in audio stream which is added to video.
> Sample format is set to AV_SAMPLE_FMT_FLT. When using other formats app
> crashes with "Unsupported sample format".
>
> What needs to be done to correctly add AMR stream to video file? Do I have
> to reencode it to AAC and add as AAC audio stream?? Thank you for all hints.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20150701/c7f37256/attachment.html>


More information about the Libav-user mailing list