<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 28/1/20 06:49, Jonathan Noble wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAC9dhgjQNGP7QaLrak7CUsKHYwe0hbre4pVzat_QxHkGaq4QwA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, 28 Jan 2020 at
00:12, Leandro Moreira <<a
href="mailto:leandro.ribeiro.moreira@gmail.com"
moz-do-not-send="true">leandro.ribeiro.moreira@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>Hi there,</div>
<div><br>
</div>
<div>I think that the <a
href="https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/transcoding.c"
target="_blank" moz-do-not-send="true">transcoder
example</a> provided by ffmpeg works as well as some <a
href="https://github.com/leandromoreira/ffmpeg-libav-tutorial#chapter-3---transcoding"
target="_blank" moz-do-not-send="true">community
sample code</a>.<br>
</div>
<div><br>
</div>
</div>
</blockquote>
<div>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).</div>
</div>
</div>
</blockquote>
<p>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).<br>
</p>
<pre class="moz-signature" cols="72">--
Gonzalo Garramuño</pre>
</body>
</html>