<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Haris,<br>
    <br>
    Here's a little program I did to draw audio waveform on various
    backgrounds. It is C code however.<br>
    <br>
<a class="moz-txt-link-freetext" href="http://www.oifii.org/ns-org/nsd/ar/cp/audio_spi/spiffmpegmuxingspectrum_qt2016/spiffmpegmuxingspectrum-RGB24_qt2016.c">http://www.oifii.org/ns-org/nsd/ar/cp/audio_spi/spiffmpegmuxingspectrum_qt2016/spiffmpegmuxingspectrum-RGB24_qt2016.c</a><br>
    <br>
    Steph<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 02/04/2016 2:34 PM, Haris PP wrote:<br>
    </div>
    <blockquote
cite="mid:CAMBbMFrb4Emvh==mEeF4TNoOP_9gs7KEkoKbo8C-=cHyYdhrsg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi,<br>
        <br>
        I need to plot wave form of audio as explained here <a
          moz-do-not-send="true"
href="http://stackoverflow.com/questions/16509906/ffmpeg-can-i-draw-an-audio-channel-as-an-image"
          target="_blank"><a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/16509906/ffmpeg-can-i-draw-an-audio-channel-as-an-image">http://stackoverflow.com/questions/16509906/ffmpeg-can-i-draw-an-audio-channel-as-an-image</a></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>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Libav-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a>
<a class="moz-txt-link-freetext" href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a>
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <p class="" avgcert""="" color="#000000" align="left">No virus
        found in this message.<br>
        Checked by AVG - <a moz-do-not-send="true"
          href="http://www.avg.com">www.avg.com</a><br>
        Version: 2016.0.7497 / Virus Database: 4545/11943 - Release
        Date: 04/02/16</p>
    </blockquote>
    <br>
  </body>
</html>