Recherche avancée

Médias (0)

Mot : - Tags -/page unique

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (64)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (4655)

  • Anomalie #4623 : Styles des fieldset dans l’espace privé

    17 avril 2021, par RastaPopoulos ♥

    mmh ya plus de h3 à la place de legend depuis un bon moment normalement, t’as vu ça dans quels forms ? (c’était l’ancienne méthode avec h3.legend car mieux stylables, mais nawak niveau accessibilité donc retour aux legend partout normalement)

  • How can fix CalledProcessError : in ffmpeg

    7 décembre 2020, par Mario

    I hope someone can help to troubleshoot this problem. I'm trying to save the loss plots out of Keras in the form of the following animation.

    



    img

    



    but I have been facing the following error, and ultimately I can't save the animation :

    



    MovieWriter stderr:&#xA;[h264_v4l2m2m @ 0x55a67176f430] Could not find a valid device&#xA;[h264_v4l2m2m @ 0x55a67176f430] can&#x27;t configure encoder&#xA;Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height&#xA;&#xA;---------------------------------------------------------------------------&#xA;BrokenPipeError                           Traceback (most recent call last)&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in saving(self, fig, outfile, dpi, *args, **kwargs)&#xA;    229         try:&#xA;--> 230             yield self&#xA;    231         finally:&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in save(self, filename, writer, fps, dpi, codec, bitrate, extra_args, metadata, extra_anim, savefig_kwargs, progress_callback)&#xA;   1155                             frame_number &#x2B;= 1&#xA;-> 1156                     writer.grab_frame(**savefig_kwargs)&#xA;   1157 &#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in grab_frame(self, **savefig_kwargs)&#xA;    383         self.fig.savefig(self._frame_sink(), format=self.frame_format,&#xA;--> 384                          dpi=self.dpi, **savefig_kwargs)&#xA;    385 &#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/figure.py in savefig(self, fname, transparent, **kwargs)&#xA;   2179 &#xA;-> 2180         self.canvas.print_figure(fname, **kwargs)&#xA;   2181 &#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, **kwargs)&#xA;   2081                     bbox_inches_restore=_bbox_inches_restore,&#xA;-> 2082                     **kwargs)&#xA;   2083             finally:&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py in print_raw(self, filename_or_obj, *args, **kwargs)&#xA;    445                 cbook.open_file_cm(filename_or_obj, "wb") as fh:&#xA;--> 446             fh.write(renderer._renderer.buffer_rgba())&#xA;    447 &#xA;&#xA;BrokenPipeError: [Errno 32] Broken pipe&#xA;&#xA;During handling of the above exception, another exception occurred:&#xA;&#xA;CalledProcessError                        Traceback (most recent call last)&#xA; in <module>&#xA;     17 print(f&#x27;{model_type.upper()} Train Time: {Timer} sec&#x27;)&#xA;     18 &#xA;---> 19 create_loss_animation(model_type, hist.history[&#x27;loss&#x27;], hist.history[&#x27;val_loss&#x27;], epoch)&#xA;     20 &#xA;     21 evaluate(model, trainX, trainY, testX, testY, scores_train, scores_test)&#xA;&#xA; in create_loss_animation(model_type, loss_hist, val_loss_hist, epoch)&#xA;     34 &#xA;     35     ani = matplotlib.animation.FuncAnimation(fig, animate, fargs=(l1, l2, loss, val_loss, title), repeat=True, interval=1000, repeat_delay=1000)&#xA;---> 36     ani.save(f&#x27;loss_animation_{model_type}_oneDataset.mp4&#x27;, writer=writer)&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in save(self, filename, writer, fps, dpi, codec, bitrate, extra_args, metadata, extra_anim, savefig_kwargs, progress_callback)&#xA;   1154                             progress_callback(frame_number, total_frames)&#xA;   1155                             frame_number &#x2B;= 1&#xA;-> 1156                     writer.grab_frame(**savefig_kwargs)&#xA;   1157 &#xA;   1158         # Reconnect signal for first draw if necessary&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/contextlib.py in __exit__(self, type, value, traceback)&#xA;     97                 value = type()&#xA;     98             try:&#xA;---> 99                 self.gen.throw(type, value, traceback)&#xA;    100             except StopIteration as exc:&#xA;    101                 # Suppress StopIteration *unless* it&#x27;s the same exception that&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in saving(self, fig, outfile, dpi, *args, **kwargs)&#xA;    230             yield self&#xA;    231         finally:&#xA;--> 232             self.finish()&#xA;    233 &#xA;    234 &#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in finish(self)&#xA;    365     def finish(self):&#xA;    366         &#x27;&#x27;&#x27;Finish any processing for writing the movie.&#x27;&#x27;&#x27;&#xA;--> 367         self.cleanup()&#xA;    368 &#xA;    369     def grab_frame(self, **savefig_kwargs):&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in cleanup(self)&#xA;    409         if self._proc.returncode:&#xA;    410             raise subprocess.CalledProcessError(&#xA;--> 411                 self._proc.returncode, self._proc.args, out, err)&#xA;    412 &#xA;    413     @classmethod&#xA;&#xA;CalledProcessError: Command &#x27;[&#x27;/usr/bin/ffmpeg&#x27;, &#x27;-f&#x27;, &#x27;rawvideo&#x27;, &#x27;-vcodec&#x27;, &#x27;rawvideo&#x27;, &#x27;-s&#x27;, &#x27;720x720&#x27;, &#x27;-pix_fmt&#x27;, &#xA;&#x27;rgba&#x27;, &#x27;-r&#x27;, &#x27;5&#x27;, &#x27;-loglevel&#x27;, &#x27;error&#x27;, &#x27;-i&#x27;, &#x27;pipe:&#x27;, &#x27;-vcodec&#x27;, &#x27;h264&#x27;, &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;, &#x27;-b&#x27;, &#x27;800k&#x27;, &#x27;-y&#x27;, &#xA;&#x27;loss_animation_CNN_oneDataset.mp4&#x27;]&#x27; returned non-zero exit status 1.&#xA;</module>

    &#xA;&#xA;

    I tried to ignore the error by this answer but it seems it's not the case. I also checked similar case but its answer for getting a static git binary is not my cas as well since not especial converting PNG to MP4 !

    &#xA;&#xA;

    My code is as follows :

    &#xA;&#xA;

    plt.rcParams[&#x27;animation.ffmpeg_path&#x27;] = &#x27;/usr/bin/ffmpeg&#x27;&#xA;&#xA;def animate(i, data1, data2, line1, line2):&#xA;    temp1 = data1.iloc[:int(i&#x2B;1)]&#xA;    temp2 = data2.iloc[:int(i&#x2B;1)]&#xA;&#xA;    line1.set_data(temp1.index, temp1.value)&#xA;    line2.set_data(temp2.index, temp2.value)&#xA;&#xA;    return (line1, line2)&#xA;&#xA;&#xA;def create_loss_animation(model_type, data1, data2):&#xA;    fig = plt.figure()&#xA;    plt.title(f&#x27;Loss on Train &amp; Test&#x27;, fontsize=25)&#xA;    plt.xlabel(&#x27;Epoch&#x27;, fontsize=20)&#xA;    plt.ylabel(&#x27;Loss MSE for Sx-Sy &amp; Sxy&#x27;, fontsize=20)&#xA;    plt.xlim(min(data1.index.min(), data2.index.min()), max(data1.index.max(), data2.index.max()))&#xA;    plt.ylim(min(data1.value.min(), data2.value.min()), max(data1.value.max(), data2.value.max()))&#xA;&#xA;    l1, = plt.plot([], [], &#x27;o-&#x27;, label=&#x27;Train Loss&#x27;, color=&#x27;b&#x27;, markevery=[-1])&#xA;    l2, = plt.plot([], [], &#x27;o-&#x27;, label=&#x27;Test Loss&#x27;, color=&#x27;r&#x27;, markevery=[-1])&#xA;    plt.legend(loc=&#x27;center right&#x27;, fontsize=&#x27;xx-large&#x27;)&#xA;&#xA;    Writer = animation.writers[&#x27;ffmpeg&#x27;]&#xA;    writer = Writer(fps=5, bitrate=1800)&#xA;&#xA;    ani = matplotlib.animation.FuncAnimation(fig, animate, fargs=(data1, data2, l1, l2), repeat=True, interval=1000, repeat_delay=1000)&#xA;    ani.save(f&#x27;{model_type}.mp4&#x27;, writer=writer)&#xA;&#xA;# create datasets&#xA;x = np.linspace(0,150,50)&#xA;y1 = 41*np.exp(-x/20)&#xA;y2 = 35*np.exp(-x/50)&#xA;&#xA;my_data_number_1 = pd.DataFrame({&#x27;x&#x27;:x, &#x27;value&#x27;:y1}).set_index(&#x27;x&#x27;)&#xA;my_data_number_2 = pd.DataFrame({&#x27;x&#x27;:x, &#x27;value&#x27;:y2}).set_index(&#x27;x&#x27;)&#xA;&#xA;create_loss_animation(&#x27;test&#x27;, my_data_number_1, my_data_number_2)&#xA;

    &#xA;

  • ffmpeg : Trying to access Ebur128Context->integrated_loudness but unsuccessful

    12 avril 2019, par Sourabh Jain

    [FFMPEG] Trying to access Ebur128Context->integrated_loudness but unsuccessful

    I am trying to run ebur128Filter on audio file . similar to be doing
    [http://ffmpeg.org/doxygen/2.6/f__ebur128_8c_source.html#l00135]

    ffmpeg -i sample.wav -filter_complex ebur128=peak=true -f null -

    result of which is :

    [Parsed_ebur128_0 @ 0x7f9d38403ec0] Summary:

    Integrated loudness:
    I: -15.5 LUFS
    Threshold: -25.6 LUFS

    Loudness range:
    LRA: 1.5 LU
    Threshold: -35.5 LUFS
    LRA low: -16.3 LUFS
    LRA high: -14.8 LUFS

    True peak:
    Peak: -0.4 dBFS
    /*
    * Copyright (c) 2010 Nicolas George
    * Copyright (c) 2011 Stefano Sabatini
    * Copyright (c) 2012 Clément Bœsch
    *
    * Permission is hereby granted, free of charge, to any person obtaining a copy
    * of this software and associated documentation files (the "Software"), to deal
    * in the Software without restriction, including without limitation the rights
    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    * copies of the Software, and to permit persons to whom the Software is
    * furnished to do so, subject to the following conditions:
    *
    * The above copyright notice and this permission notice shall be included in
    * all copies or substantial portions of the Software.
    *
    * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    * THE SOFTWARE.
    */

    /**
    * @file
    * API example for audio decoding and filtering
    * @example filtering_audio.c
    */

    #include

    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libavfilter></libavfilter>buffersink.h>
    #include <libavfilter></libavfilter>buffersrc.h>
    #include <libavutil></libavutil>opt.h>

    #define MAX_CHANNELS 63



    static const char *filter_descr = "ebur128=peak=true";

    static AVFormatContext *fmt_ctx;
    static AVCodecContext *dec_ctx;
    AVFilterContext *buffersink_ctx;
    AVFilterContext *buffersrc_ctx;
    AVFilterGraph *filter_graph;
    static int audio_stream_index = -1;

    struct rect { int x, y, w, h; };


    struct hist_entry {
       int count;                      ///&lt; how many times the corresponding value occurred
       double energy;                  ///&lt; E = 10^((L + 0.691) / 10)
       double loudness;                ///&lt; L = -0.691 + 10 * log10(E)
    };


    struct integrator {
       double *cache[MAX_CHANNELS];    ///&lt; window of filtered samples (N ms)
       int cache_pos;                  ///&lt; focus on the last added bin in the cache array
       double sum[MAX_CHANNELS];       ///&lt; sum of the last N ms filtered samples (cache content)
       int filled;                     ///&lt; 1 if the cache is completely filled, 0 otherwise
       double rel_threshold;           ///&lt; relative threshold
       double sum_kept_powers;         ///&lt; sum of the powers (weighted sums) above absolute threshold
       int nb_kept_powers;             ///&lt; number of sum above absolute threshold
       struct hist_entry *histogram;   ///&lt; histogram of the powers, used to compute LRA and I
    };

    typedef struct EBUR128Context {
       const AVClass *class;           ///&lt; AVClass context for log and options purpose

       /* peak metering */
       int peak_mode;                  ///&lt; enabled peak modes
       double *true_peaks;             ///&lt; true peaks per channel
       double *sample_peaks;           ///&lt; sample peaks per channel
       double *true_peaks_per_frame;   ///&lt; true peaks in a frame per channel
    #if CONFIG_SWRESAMPLE
       SwrContext *swr_ctx;            ///&lt; over-sampling context for true peak metering
       double *swr_buf;                ///&lt; resampled audio data for true peak metering
       int swr_linesize;
    #endif

       /* video  */
       int do_video;                   ///&lt; 1 if video output enabled, 0 otherwise
       int w, h;                       ///&lt; size of the video output
       struct rect text;               ///&lt; rectangle for the LU legend on the left
       struct rect graph;              ///&lt; rectangle for the main graph in the center
       struct rect gauge;              ///&lt; rectangle for the gauge on the right
       AVFrame *outpicref;             ///&lt; output picture reference, updated regularly
       int meter;                      ///&lt; select a EBU mode between +9 and +18
       int scale_range;                ///&lt; the range of LU values according to the meter
       int y_zero_lu;                  ///&lt; the y value (pixel position) for 0 LU
       int y_opt_max;                  ///&lt; the y value (pixel position) for 1 LU
       int y_opt_min;                  ///&lt; the y value (pixel position) for -1 LU
       int *y_line_ref;                ///&lt; y reference values for drawing the LU lines in the graph and the gauge

       /* audio */
       int nb_channels;                ///&lt; number of channels in the input
       double *ch_weighting;           ///&lt; channel weighting mapping
       int sample_count;               ///&lt; sample count used for refresh frequency, reset at refresh

       /* Filter caches.
        * The mult by 3 in the following is for X[i], X[i-1] and X[i-2] */
       double x[MAX_CHANNELS * 3];     ///&lt; 3 input samples cache for each channel
       double y[MAX_CHANNELS * 3];     ///&lt; 3 pre-filter samples cache for each channel
       double z[MAX_CHANNELS * 3];     ///&lt; 3 RLB-filter samples cache for each channel

    #define I400_BINS  (48000 * 4 / 10)
    #define I3000_BINS (48000 * 3)
       struct integrator i400;         ///&lt; 400ms integrator, used for Momentary loudness  (M), and Integrated loudness (I)
       struct integrator i3000;        ///&lt;    3s integrator, used for Short term loudness (S), and Loudness Range      (LRA)

       /* I and LRA specific */
       double integrated_loudness;     ///&lt; integrated loudness in LUFS (I)
       double loudness_range;          ///&lt; loudness range in LU (LRA)
       double lra_low, lra_high;       ///&lt; low and high LRA values

       /* misc */
       int loglevel;                   ///&lt; log level for frame logging
       int metadata;                   ///&lt; whether or not to inject loudness results in frames
       int dual_mono;                  ///&lt; whether or not to treat single channel input files as dual-mono
       double pan_law;                 ///&lt; pan law value used to calculate dual-mono measurements
       int target;                     ///&lt; target level in LUFS used to set relative zero LU in visualization
       int gauge_type;                 ///&lt; whether gauge shows momentary or short
       int scale;                      ///&lt; display scale type of statistics
    } EBUR128Context;

    void dump_ebur128_context(void *priv);

    static int open_input_file(const char *filename)
    {
       int ret;
       AVCodec *dec;

       if ((ret = avformat_open_input(&amp;fmt_ctx, filename, NULL, NULL)) &lt; 0) {
           av_log(NULL, AV_LOG_ERROR, "Cannot open input file\n");
           return ret;
       }

       if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) &lt; 0) {
           av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
           return ret;
       }

       /* select the audio stream */
       ret = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &amp;dec, 0);
       if (ret &lt; 0) {
           av_log(NULL, AV_LOG_ERROR, "Cannot find an audio stream in the input file\n");
           return ret;
       }
       audio_stream_index = ret;

       /* create decoding context */
       dec_ctx = avcodec_alloc_context3(dec);
       if (!dec_ctx)
           return AVERROR(ENOMEM);
       avcodec_parameters_to_context(dec_ctx, fmt_ctx->streams[audio_stream_index]->codecpar);

       /* init the audio decoder */
       if ((ret = avcodec_open2(dec_ctx, dec, NULL)) &lt; 0) {
           av_log(NULL, AV_LOG_ERROR, "Cannot open audio decoder\n");
           return ret;
       }

       return 0;
    }

    static int init_filters(const char *filters_descr)
    {
       char args[512];
       int ret = 0;
       const AVFilter *abuffersrc  = avfilter_get_by_name("abuffer");
       const AVFilter *abuffersink = avfilter_get_by_name("abuffersink");
       AVFilterInOut *outputs = avfilter_inout_alloc();
       AVFilterInOut *inputs  = avfilter_inout_alloc();
       static const enum AVSampleFormat out_sample_fmts[] = { AV_SAMPLE_FMT_S16, -1 };
       static const int64_t out_channel_layouts[] = { AV_CH_LAYOUT_MONO, -1 };
       static const int out_sample_rates[] = { 8000, -1 };
       const AVFilterLink *outlink;
       AVRational time_base = fmt_ctx->streams[audio_stream_index]->time_base;

       filter_graph = avfilter_graph_alloc();
       if (!outputs || !inputs || !filter_graph) {
           ret = AVERROR(ENOMEM);
           goto end;
       }

       /* buffer audio source: the decoded frames from the decoder will be inserted here. */
       if (!dec_ctx->channel_layout)
           dec_ctx->channel_layout = av_get_default_channel_layout(dec_ctx->channels);
       snprintf(args, sizeof(args),
               "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%"PRIx64,
                time_base.num, time_base.den, dec_ctx->sample_rate,
                av_get_sample_fmt_name(dec_ctx->sample_fmt), dec_ctx->channel_layout);
       ret = avfilter_graph_create_filter(&amp;buffersrc_ctx, abuffersrc, "in",
                                          args, NULL, filter_graph);
       if (ret &lt; 0) {
           av_log(NULL, AV_LOG_ERROR, "Cannot create audio buffer source\n");
           goto end;
       }

       /* buffer audio sink: to terminate the filter chain. */
       ret = avfilter_graph_create_filter(&amp;buffersink_ctx, abuffersink, "out",
                                          NULL, NULL, filter_graph);
       if (ret &lt; 0) {
           av_log(NULL, AV_LOG_ERROR, "Cannot create audio buffer sink\n");
           goto end;
       }

       ret = av_opt_set_int_list(buffersink_ctx, "sample_fmts", out_sample_fmts, -1,
                                 AV_OPT_SEARCH_CHILDREN);
       if (ret &lt; 0) {
           av_log(NULL, AV_LOG_ERROR, "Cannot set output sample format\n");
           goto end;
       }

       ret = av_opt_set_int_list(buffersink_ctx, "channel_layouts", out_channel_layouts, -1,
                                 AV_OPT_SEARCH_CHILDREN);
       if (ret &lt; 0) {
           av_log(NULL, AV_LOG_ERROR, "Cannot set output channel layout\n");
           goto end;
       }

       ret = av_opt_set_int_list(buffersink_ctx, "sample_rates", out_sample_rates, -1,
                                 AV_OPT_SEARCH_CHILDREN);
       if (ret &lt; 0) {
           av_log(NULL, AV_LOG_ERROR, "Cannot set output sample rate\n");
           goto end;
       }

       /*
        * Set the endpoints for the filter graph. The filter_graph will
        * be linked to the graph described by filters_descr.
        */

       /*
        * The buffer source output must be connected to the input pad of
        * the first filter described by filters_descr; since the first
        * filter input label is not specified, it is set to "in" by
        * default.
        */
       outputs->name       = av_strdup("in");
       outputs->filter_ctx = buffersrc_ctx;
       outputs->pad_idx    = 0;
       outputs->next       = NULL;

       /*
        * The buffer sink input must be connected to the output pad of
        * the last filter described by filters_descr; since the last
        * filter output label is not specified, it is set to "out" by
        * default.
        */
       inputs->name       = av_strdup("out");
       inputs->filter_ctx = buffersink_ctx;
       inputs->pad_idx    = 0;
       inputs->next       = NULL;

       if ((ret = avfilter_graph_parse_ptr(filter_graph, filters_descr,
                                           &amp;inputs, &amp;outputs, NULL)) &lt; 0)
           goto end;

       if ((ret = avfilter_graph_config(filter_graph, NULL)) &lt; 0)
           goto end;

       /* Print summary of the sink buffer
        * Note: args buffer is reused to store channel layout string */
       outlink = buffersink_ctx->inputs[0];
       av_get_channel_layout_string(args, sizeof(args), -1, outlink->channel_layout);
       av_log(NULL, AV_LOG_INFO, "Output: srate:%dHz fmt:%s chlayout:%s\n",
              (int)outlink->sample_rate,
              (char *)av_x_if_null(av_get_sample_fmt_name(outlink->format), "?"),
              args);

    end:
       avfilter_inout_free(&amp;inputs);
       avfilter_inout_free(&amp;outputs);

       return ret;
    }

    static void print_frame(const AVFrame *frame)
    {
    //    const int n = frame->nb_samples * av_get_channel_layout_nb_channels(frame->channel_layout);
    //    const uint16_t *p     = (uint16_t*)frame->data[0];
    //    const uint16_t *p_end = p + n;
    //
    //    while (p &lt; p_end) {
    //        fputc(*p    &amp; 0xff, stdout);
    //        fputc(*p>>8 &amp; 0xff, stdout);
    //        p++;
    //    }
    //    fflush(stdout);
    }

    int main(int argc, char **argv)
    {
       av_log_set_level(AV_LOG_DEBUG);
       int ret;
       AVPacket packet;
       AVFrame *frame = av_frame_alloc();
       AVFrame *filt_frame = av_frame_alloc();

       if (!frame || !filt_frame) {
           perror("Could not allocate frame");
           exit(1);
       }


       if ((ret = open_input_file(argv[1])) &lt; 0)
           goto end;
       if ((ret = init_filters(filter_descr)) &lt; 0)
           goto end;

       /* read all packets */
       while (1) {
           if ((ret = av_read_frame(fmt_ctx, &amp;packet)) &lt; 0)
               break;

           if (packet.stream_index == audio_stream_index) {
               ret = avcodec_send_packet(dec_ctx, &amp;packet);
               if (ret &lt; 0) {
                   av_log(NULL, AV_LOG_ERROR, "Error while sending a packet to the decoder\n");
                   break;
               }

               while (ret >= 0) {
                   ret = avcodec_receive_frame(dec_ctx, frame);
                   if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
                       break;
                   } else if (ret &lt; 0) {
                       av_log(NULL, AV_LOG_ERROR, "Error while receiving a frame from the decoder\n");
                       goto end;
                   }

                   if (ret >= 0) {
                       /* push the audio data from decoded frame into the filtergraph */
                       if (av_buffersrc_add_frame_flags(buffersrc_ctx, frame, AV_BUFFERSRC_FLAG_KEEP_REF) &lt; 0) {
                           av_log(NULL, AV_LOG_ERROR, "Error while feeding the audio filtergraph\n");
                           break;
                       }

                       /* pull filtered audio from the filtergraph */
                       while (1) {
                           ret = av_buffersink_get_frame(buffersink_ctx, filt_frame);
                           if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
                               break;
                           if (ret &lt; 0)
                               goto end;
                           print_frame(filt_frame);
                           av_frame_unref(filt_frame);
                       }
                       av_frame_unref(frame);
                   }
               }
           }
           av_packet_unref(&amp;packet);
       }
       if(filter_graph->nb_filters){
       av_log(filter_graph, AV_LOG_INFO, "hello : %d \n",
                   filter_graph->nb_filters);
       int i;
       for (int i = 0; i &lt; filter_graph->nb_filters; i++){
           av_log(filter_graph, AV_LOG_INFO, "name : %s \n",
                           filter_graph->filters[i]->name);
       }
       }

       av_log(filter_graph, AV_LOG_INFO, "name : %s \n",
                               filter_graph->filters[2]->name);
       void* priv = filter_graph->filters[2]->priv;

       dump_ebur128_context(&amp;priv);

    end:


       avfilter_graph_free(&amp;filter_graph);
       avcodec_free_context(&amp;dec_ctx);
       avformat_close_input(&amp;fmt_ctx);
       av_frame_free(&amp;frame);
       av_frame_free(&amp;filt_frame);

       if (ret &lt; 0 &amp;&amp; ret != AVERROR_EOF) {
           fprintf(stderr, "Error occurred: %s\n", av_err2str(ret));
           exit(1);
       }

       exit(0);
    }

    void dump_ebur128_context(void *priv){
       EBUR128Context *ebur128 = priv;

       av_log(ebur128, AV_LOG_INFO, "integrated_loudness : %5.1f \n",
                               ebur128->integrated_loudness);
       av_log(ebur128, AV_LOG_INFO, "lra_low : %5.1f \n",
                                   ebur128->lra_low);
       av_log(ebur128, AV_LOG_INFO, "lra_high : %5.1f \n",
                                   ebur128->lra_high);


    }
    program fails while accessing integrated loudness in dump_ebur128_context.

    can someone guide me about , how I should proceed in here.