Recherche avancée

Médias (33)

Mot : - Tags -/creative commons

Autres articles (53)

  • 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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (11037)

  • 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;
    }
  • configure : add support for mips64r6 and i6400 cpu

    9 avril 2015, par Shivraj Patil
    configure : add support for mips64r6 and i6400 cpu
    

    This is a preparation patch to submit optimized code for MSA (MIPS-SIMD-Architecture)

    Signed-off-by : Shivraj Patil <shivraj.patil@imgtec.com>
    Reviewed-by : Nedeljko Babic <Nedeljko.Babic@imgtec.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] configure
  • configure : add support for mips32r5, p5600 cpu and msa

    9 avril 2015, par Shivraj Patil
    configure : add support for mips32r5, p5600 cpu and msa
    

    Imagination Technologies has come up with MIPS Warrior Processor Cores.
    More details can be found at-
    http://www.imgtec.com/mips/warrior/pclass.asp
    http://www.imgtec.com/mips/warrior/iclass.asp

    This is a preparation patch to submit optimized code for MSA (MIPS-SIMD-Architecture)
    This patch set is adding support for P5600 and I6400 CPUs.

    MIPS ’generic’ case is added, with mips32r2 arch as default (fpu and dsp opt enabled).

    Sample configurations for new MSA architectures-
    $ ./configure —enable-cross-compile —cross-prefix=<PATH> —arch=mips —target-os=linux —cpu=p5600
    $ ./configure —enable-cross-compile —cross-prefix=<PATH> —arch=mips —target-os=linux —cpu=i6400

    Signed-off-by : Shivraj Patil <shivraj.patil@imgtec.com>
    Reviewed-by : Nedeljko Babic <Nedeljko.Babic@imgtec.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] configure