[Libav-user] Incorrect compressed audio

gga ggarra13 at gmail.com
Wed Jan 29 23:55:53 EET 2020


On 28/1/20 06:49, Jonathan Noble wrote:
>
>
> On Tue, 28 Jan 2020 at 00:12, Leandro Moreira 
> <leandro.ribeiro.moreira at gmail.com 
> <mailto:leandro.ribeiro.moreira at gmail.com>> wrote:
>
>     Hi there,
>
>     I think that the transcoder example
>     <https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/transcoding.c>
>     provided by ffmpeg works as well as some community sample code
>     <https://github.com/leandromoreira/ffmpeg-libav-tutorial#chapter-3---transcoding>.
>
> Thanks. Those are the ones I've been referring to, amongst countless 
> others, so far. I'll have a read through them again or try my encoding 
> stage with a definite known input (create samples in code to replicate 
> a sinewave or silence).

You should start by using those examples *EXACTLY* as written. Your code 
shows some issues:  you don't have e_frame->channels set to anything, 
you don't call av_write_trailer(), etc.  With those two changes and 
loading/saving out .aac audio, I was able to write it out properly (but 
it would sometimes fail with a warning about Inf/Nan values, which means 
I did not fix all errors in your code -- and thus why I have not posted 
my changes).

-- 
Gonzalo Garramuño

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200129/9892e49b/attachment.html>


More information about the Libav-user mailing list