Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (47)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (9125)

  • aarch64 : Use ret x instead of br x where possible

    28 septembre 2020, par Jonathan Wright
    aarch64 : Use ret x<n> instead of br x<n> where possible
    

    Change AArch64 assembly code to use :
    ret x<n>
    instead of :
    br x<n>

    "ret x<n>" is already used in a lot of places so this patch makes it
    consistent across the code base. This does not change behavior or
    performance.

    In addition, this change reduces the number of landing pads needed in
    a subsequent patch to support the Armv8.5-A Branch Target
    Identification (BTI) security feature.

    Signed-off-by : Jonathan Wright <jonathan.wright@arm.com>
    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libavcodec/aarch64/simple_idct_neon.S
    • [DH] libavcodec/aarch64/vp9itxfm_16bpp_neon.S
    • [DH] libavcodec/aarch64/vp9itxfm_neon.S
    • [DH] libavcodec/aarch64/vp9lpf_16bpp_neon.S
    • [DH] libavcodec/aarch64/vp9lpf_neon.S
  • Javascript sync images

    26 septembre 2021, par Ruan Matt

    I'm studying about FPS, animations, image processing in order to get into the game development world.

    &#xA;

    I took a video and extract each frame into a .jpg image, and I want to run these images, side by side, in the same sync as the original video

    &#xA;

    You can test at this link => https://jsfiddle.net/ruanmatt144/267erymL/2/

    &#xA;

    The problem : The video FPS is 30, but even if I put 1000/30, or any other value that refers to the original FPS, it doesn't work ! It doesn't stay in sync. setTimeout has a limit on decimal places that I don't know about ?

    &#xA;

    Video timestamp for each frame => https://unity-animation.ztech.gq/timestamp.txt

    &#xA;

    How can I sync those images following the original video timestamp ? Thank you.

    &#xA;

    var arr = Array();&#xA;var v = 0;&#xA;var v2 = 0;&#xA;var k = 0;&#xA;&#xA;(function getImages(i) {&#xA;  setTimeout(function() {&#xA;    v&#x2B;&#x2B;;&#xA;    var r = Math.random();&#xA;        loadImage("https://unity-animation.ztech.gq/frames/out-" &#x2B; v &#x2B; ".jpg?v=" &#x2B; r);&#xA;        arr.push("https://unity-animation.ztech.gq/frames/out-" &#x2B; v &#x2B; ".jpg?v=" &#x2B; r);&#xA;&#xA;        if (--i) getImages(i);&#xA;  }, 30)&#xA;})(20000);&#xA;&#xA;&#xA;&#xA;const loadImage = src =>&#xA;    new Promise((resolve, reject) => {&#xA;        const img = new Image();&#xA;        img.onload = () => resolve(img);&#xA;        img.src = src;&#xA;    })  &#xA;;&#xA;&#xA;var imgArray = new Array();&#xA;setTimeout(function() {&#xA;    (function runVideo(i) {&#xA;        setTimeout(function() {&#xA;            v2&#x2B;&#x2B;;&#xA;            imgArray[v2] = new Image();&#xA;            document.getElementById(&#x27;load&#x27;).appendChild(imgArray[v2]);&#xA;&#xA;            imgArray[v2].src = arr[v2];&#xA;            imgArray[v2].classList.add("overlayImage");&#xA;            imgArray.shift();&#xA;            var parent = document.querySelector("#load");&#xA;            [...parent.children].slice(0,-10).forEach(parent.removeChild.bind(parent));&#xA;            var last = document.querySelector(&#x27;#load img:last-child&#x27;).getAttribute("src");&#xA;            var _final = last.substring(&#xA;                last.indexOf("-") &#x2B; 1, &#xA;                last.lastIndexOf(".jpg")&#xA;            );&#xA;            arr.shift();&#xA;        if (--i) runVideo(i);&#xA;      }, 90) // &lt;== the problem is here, which value I must use?&#xA;    })(38194);&#xA;    document.getElementById("video").play();&#xA;}, 20000);&#xA;

    &#xA;

  • FFMPEG : Can not free AVPacket when decode H264 stream ?

    13 janvier 2016, par TTGroup

    I’m using FFMPEG to decode H264 stream, my code is below

    AVFormatContext *pFormatCtx = NULL;
    AVCodecContext  *pCodecCtx = NULL;
    AVFrame         *pFrame = NULL;
    AVPacket        packet;
    packet.data = NULL;

    pFormatCtx = avformat_alloc_context();  
    avformat_open_input(&amp;pFormatCtx, videoStreamPath, NULL, NULL);
    liveHeader.pCodecCtx = pFormatCtx->streams[videoStreamIndex]->codec;

    int  bytesDecoded = 0;
    int  frameFinished = 0;
    while (true)
    {
       while (packet.size > 0)
       {
           // Decode the next chunk of data
           bytesDecoded = avcodec_decode_video2(pCodecCtx, pFrame,
               &amp;frameFinished, &amp;packet);

           // Was there an error?
           if (bytesDecoded &lt; 0)
           {
               printf(strErr, "Error while decoding frame\n");
               commonGlobal->WriteRuntimeRecLogs(strErr);
               return RS_NOT_OK;
           }

           packet.size -= bytesDecoded;
           packet.data += bytesDecoded;
           if (frameFinished)
           {              
               //av_free_packet(&amp;packet); //(free 1)
               return RS_OK;
           }
           // Did we finish the current frame? Then we can return
       }
       do
       {
           try
           {
               int ret = av_read_frame(pFormatCtx, &amp;packet);
               if (ret &lt; 0)
               {
                   char strErr[STR_LENGTH_256];
                   if (ret == AVERROR_EOF || (pFormatCtx->pb &amp;&amp; pFormatCtx->pb->eof_reached))
                   {
                       sprintf(strErr, "Error end of file line %d", __LINE__);
                   }
                   if (pFormatCtx->pb &amp;&amp; pFormatCtx->pb->error)
                   {
                       sprintf(strErr, "Error end of file line %d", __LINE__);
                   }
                   packet.data = NULL;
                   return RS_NOT_OK;
               }
           }
           catch (...)
           {
               packet.data = NULL;
               return RS_NOT_OK;
           }
       } while (packet.stream_index != videoStreamIndex);
    }

    //av_free_packet(&amp;packet); //(free 2)

    The problem is I don’t know how to free memory of packet correctly.

    I have tried to delete packet’s data by calling one of two places av_free_packet(&amp;packet); (free 1) and av_free_packet(&amp;packet); (free 2). And the result is the application was crashed with the message "Heap Corruption..."

    If I do not free the packet, the memory leak is occur.

    Note that the above code is successful when decode H264 stream, the main problem is memory leak and crashed when I try to free the packet

    Someone can show me the problems in my code.

    Many thanks,

    T&T