Recherche avancée

Médias (1)

Mot : - Tags -/ipad

Autres articles (108)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

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

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

Sur d’autres sites (13241)

  • lavu/timestamp : Avoid C++-unfriendly code in user header

    31 août 2016, par Mark Thompson
    lavu/timestamp : Avoid C++-unfriendly code in user header
    

    Including this header in a C++11 program (inside extern "C") will
    throw an error because it looks like a user-defined literal. Add a
    space between the two tokens to avoid the problem.

    • [DH] libavutil/timestamp.h
  • Colors are not correct for FFMPEG videos

    23 août 2016, par Mohammad Abu Musa

    I am writing a screen recorder, I managed to record the videos and export them as webm but I have a color and timing issue(which I am working on).

    For coloring the video frames I get are formatted with FORMAT_I420 which I transfer them to YUV sources and encode them as the following code

    void EncoderInstance::OnGetFrame(int32_t result, pp::VideoFrame frame) {
       if (result != PP_OK)
           return;

       //const uint8_t* data = static_cast<const>(frame.GetDataBuffer());
       unsigned char* data = static_cast<unsigned>(frame.GetDataBuffer());
       pp::Size size;
       frame.GetSize(&amp;size);
       uint32_t buffersize = frame.GetDataBufferSize();
       //frame.GetFormat() == PP_VIDEOFRAME_FORMAT_BGRA);
       //Logger::Log("Format is :%d", frame.GetFormat());
       //PP_VIDEOFRAME_FORMAT_I420



       Logger::Log("stream received is: %02X", data);

       if (is_recording_) {
           vpx_codec_iter_t iter = NULL;
           const vpx_codec_cx_pkt_t *pkt;


           int iSizeY = out_width * out_height;
           int iSizeUV = (out_width * out_height)/4;
           unsigned char* pY = data;
           unsigned char* pU = data + iSizeY; // there are width * height Y components
           unsigned char* pV = data + iSizeUV;    // skip the U components

           Logger::Log("pY: %02X", pY);
           Logger::Log("pU: %02X", pU);
           Logger::Log("pV: %02X", pV);


           // copy the pixels into our "raw input" container.
           int bytes_filled = avpicture_fill(&amp;pic_raw, NULL, AV_PIX_FMT_YUV420P, out_width, out_height);
           pic_raw.data[0] = pY;
           pic_raw.data[1] = pU;
           pic_raw.data[2] = pU;

           Logger::Log("bytes filled: %d", bytes_filled);

           if(!bytes_filled) {
               Logger::Log("Cannot fill the raw input buffer");
               return;
           }

           // convert to i420 for vp8
           int h = sws_scale(sws, pic_raw.data, pic_raw.linesize, 0, out_height, raw.planes, raw.stride);

           if(h != out_height) {
               Logger::Log("scale failed: %d", h);
               return;
           }



           Logger::Log("Picture Raw data is: %d", pic_raw.data);

           if(vpx_codec_encode(&amp;codec, &amp;raw, frame_cnt, 1, flags, VPX_DL_REALTIME))
                 die_codec(&amp;codec, "Failed to encode frame");

           while( (pkt = vpx_codec_get_cx_data(&amp;codec, &amp;iter)) ) {
               switch(pkt->kind) {
                   case VPX_CODEC_CX_FRAME_PKT:
                       Logger::Log("Compressed buffer is %02X:",pkt->data.frame.buf);
                       Logger::Log("Compressed buffer size %02X:",pkt->data.frame.sz);

                       glb_app_thread.message_loop().PostWork(callback_factory_.NewCallback(&amp;EncoderInstance::write_ivf_frame_header, pkt));
                       glb_app_thread.message_loop().PostWork(callback_factory_.NewCallback(&amp;EncoderInstance::WriteFile, pkt));
                       break;
                   default:break;
               }
           }

           frame_cnt++;
       }

       video_track_.RecycleFrame(frame);
       if (need_config_) {
           ConfigureTrack();
           need_config_ = false;
       } else {
           video_track_.GetFrame(
                   callback_factory_.NewCallbackWithOutput(
                           &amp;EncoderInstance::OnGetFrame));
       }
    }
    </unsigned></const>

    Here is a screenshot of an image I got from the video generated Colors are not correct, this is what I want to fix

  • Video encoding green screen

    22 août 2016, par Mohammad Abu Musa

    I am building a screen recorder, the input stream is formatted with PP_VIDEOFRAME_FORMAT_I420 and the output is formatted with AV_PIX_FMT_YUV420P below is the code I use to do the conversion

    const uint8_t* data = static_cast<const>(frame.GetDataBuffer());
       pp::Size size;
       frame.GetSize(&amp;size);
       uint32_t buffersize = frame.GetDataBufferSize();


       if (is_recording_) {
           vpx_codec_iter_t iter = NULL;
           const vpx_codec_cx_pkt_t *pkt;
           // copy the pixels into our "raw input" container.
           int bytes_filled = avpicture_fill(&amp;pic_raw, data, AV_PIX_FMT_YUV420P, out_width, out_height);
           if(!bytes_filled) {
               Logger::Log("Cannot fill the raw input buffer");
               return;
           }

           if(vpx_codec_encode(&amp;codec, &amp;raw, frame_cnt, 1, flags, VPX_DL_REALTIME))
                 die_codec(&amp;codec, "Failed to encode frame");

           while( (pkt = vpx_codec_get_cx_data(&amp;codec, &amp;iter)) ) {
               switch(pkt->kind) {
                   case VPX_CODEC_CX_FRAME_PKT:
                       glb_app_thread.message_loop().PostWork(callback_factory_.NewCallback(&amp;EncoderInstance::write_ivf_frame_header, pkt));
                       glb_app_thread.message_loop().PostWork(callback_factory_.NewCallback(&amp;EncoderInstance::WriteFile, pkt));
                       break;
                   default:break;
               }
           }

           frame_cnt++;
    </const>

    I have three questions :

    1- Is the conversion is done correctly ? do I have to investigate image formats more ? are data channels mapped correctly.

    2- What causes the green screen to show ? what does it mean ?

    3- Is this a thread issue ? I mean is data passed correctly and the conversion is done correctly but the threads are racing