Recherche avancée

Médias (91)

Autres articles (10)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (2447)

  • ffmpeg drawtext surrounded by rounded rectangle

    7 juillet 2021, par andykais

    I want to use ffmpeg to recreate the text bubbles that appear in apps like tiktok. I created this example using imagemagick to illustrate what I mean :

    


    example speech bubble with rounded corners

    


    So far with ffmpeg, all I am able to create is text backgrounds with sharp corners :

    


    enter image description here

    


    This was done with the following command :

    


    ffmpeg -i 'live-wallpaper.mp4' -vf "drawtext=text='Hello World':x=(w-text_w)/2:y=(h-text_h)/2:fontsize=100:fontcolor=black:box=1:boxcolor=white: boxborderw=8:fontfile='fonts/proximanova-semibold.otf'" output.mp4


    


    How can I get the output of ffmpeg to look more similar to the first image ? The text isn't always going to be "Hello World" either, so I need a solution that works for text that is shorter, longer, wraps, etc.

    


  • How to synchronize audio and video in FFMPEG/C++

    4 juillet 2016, par rlnunes

    I’m receiving 2 streams (an audio and a video) with timestamps from other PCs in my network.
    I’m able to record the video and the audio to separated files (mp4 and aac) with no problems.
    Now I’m trying to put the 2 streams together into a mp4 file, I’ve created 2 queues, one for audio packets and another for video packets and trying to sync them like this :

    void * muxer(void * param) {
       QPair completePacketAudio;
       QPair completePacketVideo;
       AVPacket pkt;
       int vts = 0;
       int ats = 0;
       while(threadMuxRun) {
           contextMutex.lock();
           if(audioPacketQueue.isEmpty() && videoPacketQueue.isEmpty()) {
               contextMutex.unlock();
               Sleep(0);
               continue;
           } else if(audioPacketQueue.isEmpty()) {
               completePacketVideo = videoPacketQueue.head();
               pkt = videoPacketQueue.dequeue().first;
               pkt.pts = vts;
               vts++;
               std::cout << "video ts:" << pkt.pts << std::endl;
               av_packet_rescale_ts(&pkt, video_st.st->time_base, video_st.enc->time_base);            
           } else if(videoPacketQueue.isEmpty()) {
               completePacketAudio = audioPacketQueue.head();
               pkt = audioPacketQueue.dequeue().first;
               pkt.pts = ats;
               ats++;
               std::cout << "audio ts:" << pkt.pts << std::endl;
               av_packet_rescale_ts(&pkt, audio_st.st->time_base, audio_st.enc->time_base);
           } else {
               completePacketAudio = audioPacketQueue.head();
               completePacketVideo = videoPacketQueue.head();
               if(completePacketVideo.second < completePacketAudio.second)
               {
                   pkt = completePacketVideo.first;
                   pkt.pts = vts;
                   vts++;
                   videoPacketQueue.dequeue();
                   std::cout << "video ts:" << pkt.pts << std::endl;
                   av_packet_rescale_ts(&pkt, video_st.st->time_base, video_st.enc->time_base);
               } else {
                   audioPacketQueue.dequeue();
                   pkt = completePacketAudio.first;
                   pkt.pts = ats;
                   ats++;
                   std::cout << "audio ts:" << pkt.pts << std::endl;
                   av_packet_rescale_ts(&pkt, audio_st.st->time_base, audio_st.enc->time_base);
               }
           }
           av_interleaved_write_frame(outputContext, &pkt);
           av_free_packet(&pkt);
           contextMutex.unlock();

       }

       return NULL;
    }

    my videos is about 10% faster than the audio, and the audio timing is correct (it has 2 minutes when I record for 2 minutes, but the video has just 1:48).

    If someone can give a tip, thanks in advance.

  • Revision 32453 : on renomme xcache en memoization, puisque c’est de ca qu’il s’agit ...

    29 octobre 2009, par fil@… — Log

    on renomme xcache en memoization, puisque c’est de ca qu’il s’agit  http://fr.wikipedia.org/wiki/Memoization (merci a Thomas Sutton)
    le memo filecache.inc se limite a 164 fichiers, ce qui fait qu’il n’y a plus besoin de garbage collector