Recherche avancée

Médias (1)

Mot : - Tags -/livre électronique

Autres articles (33)

  • 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

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • 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 (...)

Sur d’autres sites (3171)

  • Problems with paperclip and ffmpeg

    15 avril 2015, par proeo pre

    I have a problem with update a video for web cam.

    my model :

    has_attached_file :video_presentacion, :styles => {
       :original => { :geometry => "1280x720", :format => 'mp4',:convert_options => { :output => { :vcodec => 'libx264'}} },
       :thumb => { :geometry => "350x350#", :format => 'png', :time => 12}
    }, :processors => [:ffmpeg]



    validates_attachment_content_type :video_presentacion, :content_type => [ 'application/x-mp4','video/mp4',
                                                                         'video/mpeg',
                                                                         'video/quicktime',
                                                                         'video/x-la-asf',
                                                                         'video/x-ms-asf',
                                                                         'video/x-msvideo',
                                                                         'video/x-sgi-movie',
                                                                         'video/x-flv',
                                                                         'flv-application/octet-stream',
                                                                         'video/3gpp',
                                                                         'video/3gpp2',
                                                                         'video/3gpp-tt',
                                                                         'video/BMPEG',
                                                                         'video/BT656',
                                                                         'video/CelB',
                                                                         'video/DV',
                                                                         'video/H261',
                                                                         'video/H263',
                                                                         'video/H263-1998',
                                                                         'video/H263-2000',
                                                                         'video/H264',
                                                                         'video/JPEG',
                                                                         'video/MJ2',
                                                                         'video/MP1S',
                                                                         'video/MP2P',
                                                                         'video/MP2T',
                                                                         'video/mp4',
                                                                         'video/MP4V-ES',
                                                                         'video/MPV',
                                                                         'video/mpeg4',
                                                                         'video/mpeg4-generic',
                                                                         'video/nv',
                                                                         'video/parityfec',
                                                                         'video/pointer',
                                                                         'video/raw',
                                                                         'video/rtx']

    MY file name have WIN_20150415_103337.MP4

    file have codec h.264
    sonido have codec MPEG-4 AAC

    When I upload in development mode on my laptop, it work fines. When I update on test or production don’t work and log archive...

    [paperclip] An error was received while processing: #tmp/3f143e8fbebaf46e7103d8153e06f17920150415-11490-1buc2jr.MP4' -vcodec libx264 -s 1280x720 -acodec aac -strict experimental -y '/tmp/3f143e8fbebaf46e7103d8153e06f17920150415-11490-1buc2jr20150415-11490-1ww6qqc.mp4'' returned 1. Expected 0

    Here is the command output :

    [paperclip] [ffmpeg] ffprobe "/tmp/3f143e8fbebaf46e7103d8153e06f17920150415-11490-1buc2jr.MP4" 2>&1

    [paperclip] [ffmpeg] Command Success


    [paperclip] [ffmpeg] Making...
    [paperclip] [ffmpeg] Building Destination File: '3f143e8fbebaf46e7103d8153e06f17920150415-11490-1buc2jr' + 'png'

    [paperclip] [ffmpeg] Destination File Built
    [paperclip] [ffmpeg] Adding Geometry
    [paperclip] [ffmpeg] Extracting Target Dimensions
    [paperclip] [ffmpeg] Target Size is Available
    [paperclip] [ffmpeg] Keeping Aspect Ratio
    [paperclip] [ffmpeg] Pad Only
    [paperclip] [ffmpeg] Convert Options:
    [paperclip] [ffmpeg] Adding Format
    [paperclip] [ffmpeg] Adding Source
    [paperclip] [ffmpeg] Building Parameters
    [paperclip] [ffmpeg] -ss 12 -i :source -vf scale=350:-1,pad=350:350:0:77.0:black -vframes 1 -f image2 -y :dest
    Command :: PATH=/usr/local/bin/:$PATH; ffmpeg -ss 12 -i '/tmp/3f143e8fbebaf46e7103d8153e06f17920150415-11490-1buc2jr.MP4' -vf scale=350:-1,pad=350:350:0:77.0:black -vframes 1 -f image2 -y '/tmp/3f143e8fbebaf46e7103d8153e06f17920150415-11490-1buc2jr20150415-11490-txzcol.png'
    Command :: PATH=/usr/local/bin/:$PATH; file -b --mime '/tmp/3f143e8fbebaf46e7103d8153e06f17920150415-11490-1buc2jr20150415-11490-txzcol.png'

    Command :: PATH=/usr/local/bin/:$PATH; file -b --mime '/tmp/3f143e8fbebaf46e7103d8153e06f17920150415-11490-1kbatzu.MP4'
    [1m[35m (0.3ms)[0m  ROLLBACK
  • Revision bfc27bb614 : tx-skip experiment : improve entropy coding of coeff tokens This patch allows th

    31 mars 2015, par hui su

    Changed Paths :
     Modify /vp9/common/vp9_entropy.c


     Modify /vp9/common/vp9_entropy.h


     Modify /vp9/common/vp9_onyxc_int.h


     Modify /vp9/common/vp9_quant_common.c


     Modify /vp9/decoder/vp9_detokenize.c


     Modify /vp9/encoder/vp9_encodemb.c


     Modify /vp9/encoder/vp9_rdopt.c


     Modify /vp9/encoder/vp9_tokenize.c



    tx-skip experiment : improve entropy coding of coeff tokens

    This patch allows the prediction residues of tx-skipped blocks
    to use probs that are different from regular transfrom
    coefficients for token entropy coding. Prediction residues are
    assumed as in band 6.

    The initial value of probs is obtained with stats from limited
    tests. The statistic model for constrained token nodes has not
    been optimized. The probs for token extra bits have not been
    optimized. These can be future work.

    Certain coding improvment is observed :
    derflr with all experiments : +6.26% (+0.10%)
    screen_content with palette : +22.48% (+1.28%)

    Change-Id : I1c0d78178ee9f3655febb6f30cdaef8ee9f8e3cc

  • 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;
    }