<div dir="ltr">Hi everyone,<div><br></div><div>I would like to thank you in advance for your help.</div><div><br></div><div>I am new to ffmpeg/avlib and what I am trying to do is just decode and encode back again an aac file. I don't try to make any changes to the file although the avlib encoder is producing a file with more initial padding than expected and it is cropping the final frames of the audio clip.</div><div><br></div><div>I exported the avframes created by the decoder and all the file information is there. It is at the encoding step that I am doing something wrong.</div><div><br></div><div>I am using the libfdk-aac decoder and encoder with the latest version of ffmpeg in Visual Studio 2013.</div><div><br></div><div>I have attached a simplified version of my code and a link to a simple audio file I have created to test my application.</div><div><br></div><div>I would really appreciate it if you can guide me on how to correct the encoding step by retrieving the final samples and if possible remove the delay created by the encoder.</div><div><br></div><div>Input file: <a href="https://www.dropbox.com/s/camqvmttq9a9vks/sinestereo.m4a?dl=0">https://www.dropbox.com/s/camqvmttq9a9vks/sinestereo.m4a?dl=0</a></div><div>Output of my program: <a href="https://www.dropbox.com/s/liwfwr85v4g1ucx/audio.raw?dl=0">https://www.dropbox.com/s/liwfwr85v4g1ucx/audio.raw?dl=0</a></div><div><br></div><div>Looking forward to hearing from you.</div><div><br></div><div>Regards,</div><div><br></div><div>Panicos</div><div><br></div><div><br></div></div>