Recherche avancée

Médias (0)

Mot : - Tags -/masques

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

Autres articles (63)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (11970)

  • Revision b04d766800 : Use small transform size in non-rd real-time mode In non-rd real-time mode, cho

    30 mai 2014, par Yunqing Wang

    Changed Paths :
     Modify /vp9/encoder/vp9_encodeframe.c


     Modify /vp9/encoder/vp9_speed_features.c


     Modify /vp9/encoder/vp9_speed_features.h



    Use small transform size in non-rd real-time mode

    In non-rd real-time mode, choosing smaller transform size in
    encoding gives better video quality and good speed gain than
    choosing larger transform size. This patch set tx size search
    method to ALLOW_8X8, which is better than using 4x4 or other
    larger sizes.

    Borg tests on rtc set at speed 6 showed significant gain on quality.
    PSNR gain : 11.034% and SSIM gain : 15.466%.

    The speed gain is 5% - 12% for <720p clips, and 2% - 7% for
    720p clips.

    Change-Id : If4dc74ed2df359346b059f47fb73b4a0193ec548

  • ffmpeg : programmatically use libavcodec and encode and decode raw bitmap, all in just few milliseconds and small compressed size on Raspberry Pi 4

    15 mars 2023, par Jerry Switalski

    We need to compress the size of the 1024x2048 image we produce, to size of about jpeg (200-500kb) from raw 32bits RGBA (8Mb) on Raspberry Pi 4. All in c/c++ program.

    &#xA;

    The compression needs to be just in few milliseconds, otherwise it is pointless to us.

    &#xA;

    We decided to try supported encoding using ffmpeg dev library and c/c++ code.

    &#xA;

    The problem we are facing is that when we edited example of the encoding, provided by ffmpeg developers, the times we are dealing are unacceptable.

    &#xA;

    Here you can see the edited code where the frames are created :

    &#xA;

    for (i = 0; i &lt; 25; i&#x2B;&#x2B;)&#xA;{&#xA;#ifdef MEASURE_TIME&#xA;        auto start_time = std::chrono::high_resolution_clock::now();&#xA;        std::cout &lt;&lt; "START Encoding frame...\n";&#xA;#endif&#xA;    fflush(stdout);&#xA;&#xA;    ret = av_frame_make_writable(frame);&#xA;    if (ret &lt; 0)&#xA;        exit(1);&#xA;&#xA;    //I try here, to convert our 32 bits RGBA image to YUV pixel format:&#xA;&#xA;    for (y = 0; y &lt; c->height; y&#x2B;&#x2B;)&#xA;    {&#xA;        for (x = 0; x &lt; c->width; x&#x2B;&#x2B;)&#xA;        {&#xA;            int imageIndexY = y * frame->linesize[0] &#x2B; x;&#xA;&#xA;            uint32_t rgbPixel = ((uint32_t*)OutputDataImage)[imageIndexY];&#xA;&#xA;            double Y, U, V;&#xA;            uint8_t R = rgbPixel &lt;&lt; 24;&#xA;            uint8_t G = rgbPixel &lt;&lt; 16;&#xA;            uint8_t B = rgbPixel &lt;&lt; 8;&#xA;&#xA;            YUVfromRGB(Y, U, V, (double)R, (double)G, (double)B);&#xA;            frame->data[0][imageIndexY] = (uint8_t)Y;&#xA;&#xA;            if (y % 2 == 0 &amp;&amp; x % 2 == 0)&#xA;            {&#xA;                int imageIndexU = (y / 2) * frame->linesize[1] &#x2B; (x / 2);&#xA;                int imageIndexV = (y / 2) * frame->linesize[2] &#x2B; (x / 2);&#xA;&#xA;                frame->data[1][imageIndexU] = (uint8_t)U;&#xA;                frame->data[2][imageIndexV] = (uint8_t)Y;&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    frame->pts = i;&#xA;&#xA;    /* encode the image */&#xA;    encode(c, frame, pkt, f);&#xA;&#xA;#ifdef MEASURE_TIME&#xA;        auto end_time = std::chrono::high_resolution_clock::now();&#xA;        auto time = end_time - start_time;&#xA;        std::cout &lt;&lt; "FINISHED Encoding frame in: " &lt;&lt; time / std::chrono::milliseconds(1) &lt;&lt; "ms.\n";&#xA;&#xA;#endif&#xA;    }&#xA;

    &#xA;

    Here are some important parts of the previous parts of that function :

    &#xA;

    codec_name = "mpeg4";&#xA;&#xA;codec = avcodec_find_encoder_by_name(codec_name);&#xA;&#xA;c = avcodec_alloc_context3(codec);&#xA;    &#xA;c->bit_rate = 1000000;  &#xA;c->width = IMAGE_WIDTH;&#xA;c->height = IMAGE_HEIGHT;&#xA;c->gop_size = 1;&#xA;c->max_b_frames = 1;&#xA;c->pix_fmt = AV_PIX_FMT_YUV420P;   &#xA;

    &#xA;

    IMAGE_WIDTH and IMAGE_HEIGHT are 1024 and 2048 corresponding.

    &#xA;

    The result I have ran on Raspberry Pi 4 look like this :

    &#xA;

    START Encoding frame...&#xA;Send frame   0&#xA;FINISHED Encoding frame in: 40ms.&#xA;START Encoding frame...&#xA;Send frame   1&#xA;Write packet   0 (size=11329)&#xA;FINISHED Encoding frame in: 60ms.&#xA;START Encoding frame...&#xA;Send frame   2&#xA;Write packet   1 (size=11329)&#xA;FINISHED Encoding frame in: 58ms.&#xA;

    &#xA;

    Since I am completely green in encoding and using codecs, my question will be how to do it the best way and correct way, meaning the way which would reduce timing to few ms, and I am not sure the codec was chosen the best for the job, or the pixel format.

    &#xA;

    The rest of the meaningful code you can see here (the encode() function you can find in the ffmpeg developer example I gave link to above) :

    &#xA;

    void RGBfromYUV(double&amp; R, double&amp; G, double&amp; B, double Y, double U, double V)&#xA;{&#xA;    Y -= 16;&#xA;    U -= 128;&#xA;    V -= 128;&#xA;    R = 1.164 * Y &#x2B; 1.596 * V;&#xA;    G = 1.164 * Y - 0.392 * U - 0.813 * V;&#xA;    B = 1.164 * Y &#x2B; 2.017 * U;&#xA;}&#xA;

    &#xA;

  • Can I run a program from Command Prompt on only a numbered subset of files ?

    28 août 2020, par Andrew Shibata

    I have an experiment with 2 groups : English speakers and Mandarin-English bilinguals. I have a batch file that works for converting audio files (using ffmpeg) for the English monolingual group. The Mandarin speaker group also has a few additional trials where they record some more sentences in Mandarin and I'd like to either run ffmpeg separately on just those trials or move that subset to a different folder after the fact.

    &#xA;

    The file formats are [subject ID]-[trial #]-vowels_record.ogg. The English trials are trial #s 6-35 and the Mandarin trials are trial #s 36-50.

    &#xA;

    The following code WORKS for my English only dataset :

    &#xA;

    for %%a in ("*vowels_record.ogg") do ffmpeg -i "%%a" "vowel_wavs\%%~na.wav

    &#xA;

    This is my attempt at figuring out how to get just the relevant files into relevant folders :

    &#xA;

    for %%a in ("*{6..35}-vowels_record.ogg") do ffmpeg -i "%%a" "vowel_wavs\%%~na.wav"&#xA;for %%a in ("*{36..50}-vowels_record.ogg") do ffmpeg -i "%%a" "mandarin_wavs\%%~na.wav"&#xA;

    &#xA;

    I have some regex experience, but not as much with making .bat files and I'm unsure what the right way is to target the range of files I'm looking for.

    &#xA;