simplest ffmpeg audio encoder

Examples and samples for those who develop software with FFmpeg.
Post Reply
leixiaohua1020
Posts: 16
Joined: Tue Jan 07, 2014 4:16 am

simplest ffmpeg audio encoder

Post by leixiaohua1020 » Fri May 09, 2014 4:24 pm

I make a simplest audio encoder .It only uses about 100 lines of code.
And I want to share it to help new developer of FFmpeg to learn FFmpeg's API.
It is based on VC 2010, and use the latest ffmpeg's lib.
Everything is done and you only need to do is to run the project.
It encode PCM data to AAC streams:
https://sourceforge.net/projects/simple ... ioencoder/

ragdog86
Posts: 4
Joined: Tue May 13, 2014 9:52 am

Re: simplest ffmpeg audio encoder

Post by ragdog86 » Fri May 16, 2014 10:44 am

thanks for the posts leixiaohua1020 these help alot,
I try make ip multiviewer based your code , every things ok but i'm confusing volume meter,
I can not get value of volume that synchonize with video display
can you help me walk through this,
Anyway thanks alot and love your posts :)

leixiaohua1020
Posts: 16
Joined: Tue Jan 07, 2014 4:16 am

Re: simplest ffmpeg audio encoder

Post by leixiaohua1020 » Fri Jun 06, 2014 4:50 am

Hello, I'm not sure if volume is one of ffmpeg's parameter. Maybe it's belong to operating system but not belong to ffmpeg? I'm not sure about it.

ragdog86
Posts: 4
Joined: Tue May 13, 2014 9:52 am

Re: simplest ffmpeg audio encoder

Post by ragdog86 » Mon Jun 09, 2014 8:50 am

Hi thanks for reply, in your previous post , you retrieve audio data from packet by
avcodec_decode_audio4(is->audio_st->codec, pFrame, &frameFinished,packet)
and you write pFrame->data[0] array to ppm file so
i think i can take my volume bar by using some value of pFrame->data[0] array
is that right ??

leixiaohua1020
Posts: 16
Joined: Tue Jan 07, 2014 4:16 am

Re: simplest ffmpeg audio encoder

Post by leixiaohua1020 » Sun Oct 19, 2014 6:41 am

ragdog86 wrote:Hi thanks for reply, in your previous post , you retrieve audio data from packet by
avcodec_decode_audio4(is->audio_st->codec, pFrame, &frameFinished,packet)
and you write pFrame->data[0] array to ppm file so
i think i can take my volume bar by using some value of pFrame->data[0] array
is that right ??
Oh, sorry these days I haven't visit this forum. :)
Maybe you have already solved your problem~

Taha
Posts: 12
Joined: Mon Feb 29, 2016 2:49 pm

Re: simplest ffmpeg audio encoder

Post by Taha » Thu Mar 31, 2016 11:57 am

Hello Sir,
Thanks for this wonderful code, but this sample code is not running with Latest FFMpeg 3.0.
Kindly guide me how to make it works with latest FFMpeg.

Thank you

YJJ
Posts: 2
Joined: Thu Apr 14, 2016 12:36 am

Re: simplest ffmpeg audio encoder

Post by YJJ » Thu Apr 14, 2016 12:48 am

hi, leixiaohua1020

thanks for your wonderful code.

but there is one thing I want to ask you.

I actually downloaded your code and try to convert jpg files to a video file(MJPEG type).

how can I change to make it work based on your code.

I need your advice for it. would you help me please _?

Post Reply