Recherche avancée

Médias (91)

Autres articles (40)

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (6340)

  • FFmpeg overwrite an AVPacket

    26 janvier 2019, par Alejandro Ramírez

    Hello guys I am working with video. I wan to encrypt the I-frames of one video compressed in H.264. So I get the AVPacket from the video and compare if (AVPacket.flags & AV_PKT_FLAG_KEY) to know if the packet has an I frame, but when I try to print the AVPacket.data I don’t have any information to encrypt.
    Where can I get the information regarding to I-frame. ahead a put my code, thank you.

    #include <iostream>
    extern "C" {
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libswscale></libswscale>swscale.h>
    #include <libavutil></libavutil>avutil.h>
    }
    #define INBUF_SIZE 4096
    //#define AV_INPUT_BUFFER_PADDING_SIZE 32
    int main (int argc, char * argv[])
    {
       //av_register_all();//omit
       //revisar el número de argumentos en el video
       AVFormatContext *pFormatCtx = NULL;
       AVCodec *dec = NULL;
       AVCodecContext *pCodecCtx = NULL;
       AVStream *st = NULL;
       AVDictionary *opts = NULL;
       AVFrame *frame;
       AVPacket avpkt;
       uint8_t inbuf [INBUF_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
       FILE *f;
       int frame_count;
       int video_stream_index = -1;

       //av_init_packet (&amp;avpkt);

       memset (inbuf + INBUF_SIZE, 0, AV_INPUT_BUFFER_PADDING_SIZE);
       if (avformat_open_input (&amp;pFormatCtx, argv[1], NULL, NULL) != 0)
           return -1;
       if (avformat_find_stream_info (pFormatCtx, NULL) &lt; 0)
           return -1;
       //video_stream_index = av_find_best_stream (pFormatCtx,AVMEDIA_TYPE_VIDEO, -1, -1, &amp;dec,0);
       video_stream_index = av_find_best_stream (pFormatCtx,AVMEDIA_TYPE_VIDEO, -1, -1, &amp;dec,0);
       if ( video_stream_index &lt; 0)
           return -1;
       std::cout &lt;&lt; "video_stream; " &lt;&lt; video_stream_index &lt;&lt; "\n";
       st = pFormatCtx -> streams [video_stream_index];
       std::cout &lt;&lt; "number of frames " &lt;&lt; st -> nb_frames &lt;&lt; "\n";
       std::cout &lt;&lt; "event_flags " &lt;&lt; st -> event_flags &lt;&lt; "\n";
       //pCodecCtx = st -> codec;//deprecated

       dec = avcodec_find_decoder (st -> codecpar -> codec_id);
       std::cout &lt;&lt; "codec_id: " &lt;&lt; st -> codecpar -> codec_id &lt;&lt; "\n";
       std::cout &lt;&lt; "AV_CODEC_ID_H264: " &lt;&lt; AV_CODEC_ID_H264 &lt;&lt; "\n";
       if (!dec)
           return -1;
       pCodecCtx = avcodec_alloc_context3 (dec);
       if (!pCodecCtx)
           return -1;
       //av_dict_set (&amp;opts, "refcounted_frames", "0", 0);
       avcodec_parameters_to_context (pCodecCtx, st -> codecpar);


       std::cout &lt;&lt; "todo bien \n";    
       if (avcodec_open2 (pCodecCtx, dec, &amp;opts) &lt; 0)
           return -1;
       /*************hasta aqui buen codigo*********************************************/
       frame = av_frame_alloc ();
       if (!frame)
           return -1;
       av_init_packet (&amp;avpkt);
       avpkt.data = NULL;
       avpkt.size = 0;
       f = fopen (argv[1], "r");
       int times = 1;
       while (av_read_frame (pFormatCtx, &amp;avpkt) >= 0){
           AVPacket oripkt = avpkt;
           if (oripkt.stream_index == video_stream_index){
               if (oripkt.flags &amp; AV_PKT_FLAG_KEY){
                   std::cout &lt;&lt; "times: " &lt;&lt; times ++ &lt;&lt; "\n";
                   std::cout &lt;&lt; "avpkt.flags: " &lt;&lt; oripkt.flags &lt;&lt; "\n";
                   std::cout &lt;&lt; "tam avpkt.data: " &lt;&lt; sizeof(oripkt.data) &lt;&lt; "\n";
                   std::cout &lt;&lt; "tam avpkt.data: " &lt;&lt; oripkt.data &lt;&lt; "\n";
                   std::cout &lt;&lt; "oripkt.size: " &lt;&lt; oripkt.size &lt;&lt; "\n";
                   std::cout &lt;&lt; "oripkt.side_date_eme: " &lt;&lt; oripkt.side_data_elems &lt;&lt; "\n";
                   if (!oripkt.data)
                       std::cout &lt;&lt; "no tengo dinero \n";
               }
           }
       }

       std::cout &lt;&lt; "Fin del programa " &lt;&lt; "\n";
    }
    </iostream>
  • combine three videos between specific time using ffmpeg

    9 décembre 2014, par Krisi

    I have a situation where I want to combine 3 videos

    The first video (guide.mp4) is the guide and the other 2 are small pieces that need to go inside the "guide"

    In a graphical manner, I have the following

    |         .---1.mp4---.                            .-----2.mp4-----.    |
    |---------+-----------+------------guide.mp4-------+---------------+----|
    0s        4s          9s                          18s             25s   28s

    the 1.mp4 and 2.mp4 will cover the guide between these times.
    the videos are of same size and all are .mp4 files

    I am pretty sure that this is covered, but I looked a lot, but since I myself am not good in english, I dont know how I could possibly look it up with success...

    Thanks in advance.

  • Programatically add a simple pause to a video

    8 mai 2020, par gota

    Say I have a 30s video. I want to produce a 40s video that is just the first video but with an extra "freezed" frame (for say 10s) somewhere in the middle of it. (think of it as wanting to comment the video at a specific point)

    &#xA;&#xA;

    I know I can do this easily with video editing software. However, I am looking for a command line tool that allows me to do this efficiently (I need to do this several times with variable points to freeze the video)

    &#xA;&#xA;

    I am using Python

    &#xA;&#xA;

    I thought of using ffmpeg, splitting the video into two, creating a third video composed of a given frame, and then concatenating the three videos.

    &#xA;&#xA;

    But maybe there is a much simpler technique ?

    &#xA;