<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">This doesn’t direct;y answer your question, but look through the source code at this link:<div><br></div><div><a href="http://www.gamedev.net/topic/624876-how-to-read-an-audio-file-with-ffmpeg-in-c/">http://www.gamedev.net/topic/624876-how-to-read-an-audio-file-with-ffmpeg-in-c/</a></div><div><br></div><div>This code will take you through parsing an audiostream. A couple of calls are deprecated but you can replace them easily enough.</div><div><br><div><div>On Apr 2, 2016, at 11:34 AM, Haris PP <<a href="mailto:harispp786@gmail.com">harispp786@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi,<br><br>I need to plot wave form of audio as explained here <a href="http://stackoverflow.com/questions/16509906/ffmpeg-can-i-draw-an-audio-channel-as-an-image" target="_blank">http://stackoverflow.com/questions/16509906/ffmpeg-can-i-draw-an-audio-channel-as-an-image</a>,
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. <br><br> AVFrame *frame=av_frame_alloc();<br> while(av_read_frame(container,&packet)>=0)<br> {<br> <br> int len=avcodec_decode_audio4(ctx,frame,&frameFinished,&packet);<br> frame->extended_data //how data stored inside the pointer <br> ........................<br> }</div>
_______________________________________________<br>Libav-user mailing list<br><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br><a href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a><br></blockquote></div><br></div></body></html>