Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (82)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (5974)

  • libavcodec video decoding not working

    5 février 2013, par Imran

    I am trying to decode video encoded with H264. I am sending AVPacket's data and its size to decoder code. there I am trying to decode the frame and display it on a GUI. problem is when I am decoding the frame it is returning same number of frame byte as the size of packet means it is not decompressing the data. Can any one tell what will be the problem. My encoding program is working fine.

    here is code for encoding

     static struct SwsContext *img_convert_ctx;
     pkt.data = NULL;  
     pkt.size = 0;


     avpicture_fill((AVPicture *)srcFrame, frame,AV_PIX_FMT_BGR24, 640, 480);
    if(img_convert_ctx == NULL) {
     int w = 640;
     int h = 480;
     img_convert_ctx = sws_getContext(w, h,
         AV_PIX_FMT_BGR24, c->width, c->height, PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
      if(img_convert_ctx == NULL) {
       fprintf(stderr, "Cannot initialize the conversion context!\n");
     }
    }
     sws_scale(img_convert_ctx, srcFrame->data, srcFrame->linesize, 0,480,picture->data, picture->linesize);


     fflush(stdout);

     picture->pts=counter;


     ret = avcodec_encode_video2(c, &pkt, picture, &got_output);
       if (ret < 0) {
           fprintf(stderr, "Error encoding frame\n");
       }

       if (got_output) {

           vdec.decode_frame(pkt.data ,pkt.size);

           av_free_packet(&pkt);
       }

    decoder code...

       int len ,got_frame;

    avpkt.size = data_length;

    avpkt.data = frame_buffer;

    if(!frame_buffer){

    return "frame buffer empty\n";

    }

    len = avcodec_decode_video2(avctx ,frame ,&got_frame ,&avpkt);

    if( len < 0){

       return "error while decoding\n";

    }

    if( got_frame ){

    static struct SwsContext *img_convert_ctx;  

    if(img_convert_ctx == NULL) {

     img_convert_ctx = sws_getContext(w, h,
         PIX_FMT_YUV420P, avctx->width,
         avctx->height, PIX_FMT_BGR24,
         SWS_BICUBIC, NULL, NULL, NULL);

      if(img_convert_ctx == NULL) {

       return  "Cannot initialize the conversion context!\n";

     }

    }

    j=sws_scale(img_convert_ctx,
       frame->data , frame->linesize ,
       0, h ,picture->data,
       picture->linesize );

    if(j==0){

    exit(1);

    }

    I am initializing all other code like AVCodecContext and Codec into other method.

    Please help me to find the solution.

  • avcodec/mpegpicture : Don't copy unnecessarily, fix race

    8 août 2022, par Andreas Rheinhardt
    avcodec/mpegpicture : Don't copy unnecessarily, fix race
    

    mpegvideo uses an array of Pictures and when it is done with using
    them, it only unreferences them incompletely : Some buffers are kept
    so that they can be reused lateron if the same slot in the Picture
    array is reused, making this a sort of a bufferpool.
    (Basically, a Picture is considered used if the AVFrame's buf is set.)
    Yet given that other pieces of the decoder may have a reference to
    these buffers, they need not be writable and are made writable using
    av_buffer_make_writable() when preparing a new Picture. This involves
    reading the buffer's data, although the old content of the buffer
    need not be retained.

    Worse, this read can be racy, because the buffer can be used by another
    thread at the same time. This happens for Real Video 3 and 4.

    This commit fixes this race by no longer copying the data ;
    instead the old buffer is replaced by a new, zero-allocated buffer.

    (Here are the details of what happens with three or more decoding threads
    when decoding rv30.rm from the FATE-suite as happens in the rv30 test :
    The first decoding thread uses the first slot of its picture array
    to store its current pic ; update_thread_context copies this for the
    second thread that decodes a P-frame. It uses the second slot in its
    Picture array to store its P-frame. This arrangement is then copied
    to the third decode thread, which decodes a B-frame. It uses the third
    slot in its Picture array for its current frame.
    update_thread_context copies this to the next thread. It unreferences
    the third slot containing the other B-frame and then it reuses this
    slot for its current frame. Because the pic array slots are only
    incompletely unreferenced, the buffers of the previous B-frame are
    still in there and they are not writable ; in fact the previous
    thread is concurrently writing to them, causing races when making
    the buffer writable.)

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/mpegpicture.c
  • flac/metaflac : Limit the size of metadata blocks

    1er mai 2016, par Erik de Castro Lopo
    flac/metaflac : Limit the size of metadata blocks
    

    Limit allow image file size to slightly less than 2^24 bytes so that
    the file size plus extra house keeping data is strictly less that
    2^24 bytes in size.

    Patch-from : lvqcl <lvqcl.mail@gmail.com>

    • [DH] src/libFLAC/metadata_object.c
    • [DH] src/share/grabbag/picture.c