Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (34)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (5278)

  • Merge commit ’eae58428bd199f7d4670bf471f56ed204430878e’

    5 octobre 2015, par Hendrik Leppkes
    Merge commit ’eae58428bd199f7d4670bf471f56ed204430878e’
    

    * commit ’eae58428bd199f7d4670bf471f56ed204430878e’ :
    avcodec : Do not lock during open for codecs marked as having threadsafe init

    Merged-by : Hendrik Leppkes <h.leppkes@gmail.com>

  • FFmpeg - avcodec_receive_frame doesn't receive all frames and lose frames before receving frames

    22 mars 2019, par Jinx

    The vcodec_receive_frame function didn’t receive the rest of the frames. I tested that there were totally 132 frames of the video and it only received 125 frames losing 7 frames at the END of the video. How can I get the lost frames back ?

    But something weird happened. As you can see the output from my MyDecode::receiveFrame() function. The code inside the block if (ret != 0){} executed first, but the lost frames are at the end of the video. So how could they come out first ? What caused this happen ?

    MyDecode.cpp

    AVFrame* MyDecode::receiveFrame()
    {
       mux.lock();
       if (!codecCtx) {
           mux.unlock();
           return 0;
       }
       AVFrame* frame = av_frame_alloc();
       int ret = avcodec_receive_frame(codecCtx, frame);
       mux.unlock();
       if (ret != 0)
       {
           static int lost_frames = 1;
           std::cout &lt;&lt; "Lost frames: " &lt;&lt; lost_frames &lt;&lt; std::endl;
           lost_frames += 1;
           av_frame_free(&amp;frame);
           return nullptr;
       }
       std::cout &lt;&lt; "Received frames: " &lt;&lt; received_frame_num &lt;&lt; std::endl;
       received_frame_num += 1;
       return frame;
    }

    bool MyDecode::sendPacket(AVPacket* packet)
    {
       if (!packet || !packet->data || packet->size == 0)
           return false;
       mux.lock();
       if (!codecCtx) {
           mux.unlock();
           return false;
       }
       int ret = avcodec_send_packet(codecCtx, packet);
       mux.unlock();
       av_packet_free(&amp;packet);
       if (ret != 0) {
           return false;
       }
       return true;
    }

    Console output

    Total frames: 132
    Lost frames: 1
    Lost frames: 2
    Lost frames: 3
    Lost frames: 4
    Lost frames: 5
    Lost frames: 6
    Lost frames: 7
    Received frames: 1
    Received frames: 2
    Received frames: 3
    ................
    Received frames: 125

    UPDATE :

    MyDemux.cpp

    AVPacket* MyDemux::readFrame()
    {
       mux.lock();
       if (!formatCtx) {
           std::cout &lt;&lt; "formaetCtx is null" &lt;&lt; std::endl;
           mux.unlock();
           return nullptr;
       }
       AVPacket* packet = av_packet_alloc();
       if (!packet) {
           std::cout &lt;&lt; "packet is null" &lt;&lt; std::endl;
           mux.unlock();
           return nullptr;
       }

       int ret = av_read_frame(formatCtx, packet);
       if (ret != 0) {
           while (true) {
               av_read_frame(formatCtx, nullptr);
           }
           mux.unlock();
           av_packet_free(&amp;packet);
           av_packet_unref(packet);
           return nullptr;
       }
       media_type = packet->stream_index;
       mux.unlock();
       return packet;
    }

    main.cpp

    while (true) {
               AVPacket* pkt = demux.readFrame();
               if (demux.get_media_type() == 0) {
                   AVFrame* frame = video_decode.receiveFrame();
                   videoWidget->paintFrame(frame);
               }
               else if (demux.get_media_type() == 1) {
               }
               if (!pkt) {
                   std::cout &lt;&lt; "to break" &lt;&lt; std::endl;
                   break;
               }
           }
  • Why are the colors transposed in my webm thumbnails ?

    9 décembre 2022, par Peter Chaplin

    I have been using ffmpeg to generate webm files from png frames, and the webm files run ok in my video player, but the thumbnail colours appear transposed - blue replacing red, purple replacing orange, brown replacing green. I've also encountered issue uploading the webm to an image hosting site (which normally does support webms), though this might be an issue on their end.&#xA;I'm on Ubuntu 22.04.1 LTS

    &#xA;

    Does anyone know what might be causing this, and how to fix it ? Or how to check whether the webm files are ok or corrupted ?

    &#xA;

    *Edit : ok, here's a side-by-side comparison of the thumbnails that appear in my file explorer - mp4 on the left and webm on the right.&#xA;Both were generated from the same set of pngs, using the same command except with the filename extension changed.

    &#xA;

    screencap of thumbnails

    &#xA;

    Specifically,

    &#xA;

    ffmpeg -framerate 24 -i Panel2Humanized/frame%04d.png panel2humanskin.webm&#xA;

    &#xA;

    and

    &#xA;

    ffmpeg -framerate 24 -i Panel2Humanized/frame%04d.png panel2humanskin.mp4&#xA;

    &#xA;

    Both look the same when opened with a video player. It looks like the mp4 thumbnail grabbed the 1st frame while the webm grabbed the last, but the colors should be the same in each. (The text-bubble in the top-left is yellow in the mp4).

    &#xA;

    *Follow-up : Apparently my WebMs are being generated in GBRP (Green-Blue-Red Planar) pixel format, the site I was trying to upload to requires YUV420P (Luma/Chroma 4:2:0 Planar) format, maybe that's the issue ? I'm still not sure exactly what that means or how to fix it.

    &#xA;

    *Final follow-up : Looks like I needed to change the argument to :

    &#xA;

    ffmpeg -framerate 24 -i Panel2Humanized/frame%04d.png -pix_fmt yuv420p paned2humanskin.webm&#xA;

    &#xA;