Recherche avancée

Médias (91)

Autres articles (62)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (8364)

  • doc/filters : Document missing options for scale in/out color matrix

    5 juillet 2019, par Jun Zhao
    doc/filters : Document missing options for scale in/out color matrix
    

    Document missing options for scale in/out color matrix

    Reviewed-by : Gyan Doshi <ffmpeg@gyani.pro>
    Signed-off-by : Jun Zhao <barryjzhao@tencent.com>

    • [DH] doc/filters.texi
  • ffmpeg library performance for decoding h.264 for embedded device

    2 avril 2015, par pasifus

    I have some confuse when tried to compile and run decode h.264 on ARM and MIPS architecture.

    I have two embedded devices. I tired to run simple code that read h264 format from file and decode it to h264 in loop in maximum speed (without sleep between frames)

    I found that it too slow in there devices.
    I tested HD video (720p/25fps)

    1. MIPS32® 1004K (700MHz) it was 4 fps average.
    2. Raspberry Pi Model B (700MHz) it also was 4 fps average. (i know that raspberry have GPU to decoding/encoding)

    A also check it on my virtual machine on ubuntu i686 (1300MHz) and it was 200 fps average.

    The question : why it so different preference ? Somebody know how to increase decoding preference on MIPS32® 1004K architecture ?

    #include
    #include
    #include
    #include

    #include <sys></sys>time.h>
    #include

    #include "libavcodec/avcodec.h"
    #include "libavutil/mathematics.h"

    #define INBUF_SIZE 80000


    static long get_time_diff(struct timeval time_now) {
      struct timeval time_now2;
      gettimeofday(&amp;time_now2,0);
      return time_now2.tv_sec*1.e6 - time_now.tv_sec*1.e6 + time_now2.tv_usec - time_now.tv_usec;
    }

    int main(int argc, char **argv)
    {
       AVCodec *codec;
       AVCodecContext *c= NULL;
       AVCodecParserContext *parser = NULL;
       int frame, got_picture, len2, len;
       const char *filename;
       FILE *f;
       AVFrame *picture;
       char *arghwtf = malloc(INBUF_SIZE);
       uint64_t in_len;
       int pts, dts;
       struct timeval t,t2;
       float inv_fps = 1e6/23.98;
       AVPacket avpkt;

       // register all the codecs
       avcodec_register_all();

       // log level
       av_log_set_level(AV_LOG_PANIC|AV_LOG_FATAL|AV_LOG_ERROR|AV_LOG_WARNING);

       filename = argv[1];

       av_init_packet(&amp;avpkt);

       printf("Decoding file %s...\n", filename);

       // find the H.264 video decoder
       codec = avcodec_find_decoder(CODEC_ID_H264);
       if (!codec)
       {
           fprintf(stderr, "codec not found\n");
           exit(1);
       }

       c = avcodec_alloc_context3(codec);
       picture = avcodec_alloc_frame();

       // skiploopfilter=all
       c->skip_loop_filter = 48;

       AVDictionary* dictionary = NULL;
       if (avcodec_open2(c, codec, &amp;dictionary) &lt; 0)
       {
           fprintf(stderr, "could not open codec\n");
           exit(1);
       }

       // the codec gives us the frame size, in samples
       parser = av_parser_init(c->codec_id);
       parser->flags |= PARSER_FLAG_ONCE;

       f = fopen(filename, "rb");
       if (!f)
       {
           fprintf(stderr, "could not open %s\n", filename);
           exit(1);
       }

       frame = 0;
       gettimeofday(&amp;t, 0);
       if(fread(arghwtf, 1, INBUF_SIZE, f) == 0)
       {
           exit(1);
       }

       in_len = 80000;
       gettimeofday(&amp;t2, 0);
       while (in_len > 0 &amp;&amp; !feof(f))
       {
           len = av_parser_parse2(parser, c, &amp;avpkt.data, &amp;avpkt.size, arghwtf, in_len, pts, dts, AV_NOPTS_VALUE);

           len2 = avcodec_decode_video2(c, picture, &amp;got_picture, &amp;avpkt);
           if (len2 &lt; 0) {
               fprintf(stderr, "Error while decoding frame %d\n", frame);
               exit(1);
           }

           if (got_picture)
           {
               fprintf(stderr, "\rDisplaying %c %dx%d :frame %3d (%02d:%03d)...", av_get_picture_type_char(picture->pict_type), c->width, c->height, frame, (int)(get_time_diff(t)/1000000), (int)((get_time_diff(t)/1000)%1000));
               fflush(stderr);

               frame++;
           }

           memcpy(arghwtf, arghwtf + len, 80000-len);
           fread(arghwtf + 80000 - len, 1, len, f);
       }

       fclose(f);
       avcodec_close(c);
       av_free(c);
       av_free(picture);
       printf("\n");
       printf("Avarage fps: %d\n", (int)(((double)frame)/(double)(get_time_diff(t)/1000)*1000));

       return 0;
    }
  • FFmpeg can't find AV_CODEC_ID_WMAV2

    17 novembre 2015, par chaoqi

    I want decode the wma type file use the FFmpeg,
    compiled it with options

    --enable-decoder=wmav1 --enable-decoder=wmav2, --enable-encoder=wmav1, --enable-encoder=wmav2 --enable-demuxer=xwma

    and the source code i use it like this :

           av_register_all();
           //avcodec_register_all();

           if ((ret = avformat_open_input(&amp;fmt_ctx, src_filename, 0, 0)) &lt; 0) {
               LOG("Could not open source file %s, ret:%d", src_filename, ret);
               return;
           }

           if ((ret = avformat_find_stream_info(fmt_ctx, 0)) &lt; 0) {
               LOG("Could not find stream information---ret:%d", ret);
               return;
           }

    and avformat_find_stream_info fail with ret:-541478725

    and add ffmpeg -i <inputfile></inputfile> commandline log :

    D:\Downloads\ffmpeg-static\bin>ffmpeg.exe -i ring.wma
    ffmpeg version N-76684-g1fe82ab Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 5.2.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
    enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
    ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
    le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
    able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
    ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
    --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
    e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --
    enable-lzma --enable-decklink --enable-zlib
     libavutil      55.  6.100 / 55.  6.100
     libavcodec     57. 15.100 / 57. 15.100
     libavformat    57. 14.100 / 57. 14.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 15.100 /  6. 15.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Guessed Channel Layout for  Input Stream #0.0 : stereo
    Input #0, asf, from 'ring.wma':
     Metadata:
       WMFSDKNeeded    : 0.0.0.0000
       DeviceConformanceTemplate: L3
       WMFSDKVersion   : 11.0.6001.7001
       IsVBR           : 0
       PeakValue       : 18081
       AverageLevel    : 1915
     Duration: 00:00:07.80, start: 0.000000, bitrate: 206 kb/s
       Stream #0:0: Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, fltp,
    192 kb/s

    any tips ?

    And which option must be include when i want to decode a special type file ?

    thank you.