[Libav-user] ffmpeg audio data for ploting wave form
Stephane Poirier
stephane.poirier at oifii.org
Sat Apr 2 21:03:33 CEST 2016
Hi Haris,
Here's a little program I did to draw audio waveform on various
backgrounds. It is C code however.
http://www.oifii.org/ns-org/nsd/ar/cp/audio_spi/spiffmpegmuxingspectrum_qt2016/spiffmpegmuxingspectrum-RGB24_qt2016.c
Steph
On 02/04/2016 2:34 PM, Haris PP wrote:
> Hi,
>
> I need to plot wave form of audio as explained here
> http://stackoverflow.com/questions/16509906/ffmpeg-can-i-draw-an-audio-channel-as-an-image,
> I found that some command line option for plotting to image, but my
> requirement is do from c++ code and draw live waveform on UI. I am
> able to decode the audio data successfully, but no idea how the data
> is stored in `AVFrame` `extended_data` pointer. The audio can be
> either stereo or mono.
>
> AVFrame *frame=av_frame_alloc();
> while(av_read_frame(container,&packet)>=0)
> {
>
> int len=avcodec_decode_audio4(ctx,frame,&frameFinished,&packet);
> frame->extended_data //how data stored inside the pointer
> ........................
> }
>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2016.0.7497 / Virus Database: 4545/11943 - Release Date: 04/02/16
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160402/51c1ce70/attachment.html>
More information about the Libav-user
mailing list