Recherche avancée

Médias (91)

Autres articles (34)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

Sur d’autres sites (6657)

  • Correct Use Of avcodec_encode_video2() Flush

    5 février 2016, par mFeinstein

    I have a camera sending pictures to a callback function and I want to make a movie with this pictures using FFmpeg. I have followed the decoding_encoding example here but am not sure how to use the got_output for flushing the encoder and getting the delayed frames.

    1. Shoud I encode all my camera’s pictures when they arrive, and later when I want to stop capturing and close the video, I do the flush loop ?

    Or

    1. Should I do the flush periodically, let’s say, every 100 pictures received ?

    My video capture program could be running for hours, so I am worried about how this delayed frames work in memory consumption, if they stack up there until the flush, this could take all my memory.


    This is the encoding performed by the example, it makes 25 dummy Frames for 1 second of video, and later, in the end, it loop through avcodec_encode_video2() looking for got_output for delayed frames :

    /////  Prepare the Frame, CodecContext and some aditional logic.....

    /* encode 1 second of video */
    for (i = 0; i < 25; i++) {
       av_init_packet(&pkt);
       pkt.data = NULL;    // packet data will be allocated by the encoder
       pkt.size = 0;
       fflush(stdout);
       /* prepare a dummy image */
       /* Y */
       for (y = 0; y < c->height; y++) {
           for (x = 0; x < c->width; x++) {
               frame->data[0][y * frame->linesize[0] + x] = x + y + i * 3;
           }
       }
       /* Cb and Cr */
       for (y = 0; y < c->height/2; y++) {
           for (x = 0; x < c->width/2; x++) {
               frame->data[1][y * frame->linesize[1] + x] = 128 + y + i * 2;
               frame->data[2][y * frame->linesize[2] + x] = 64 + x + i * 5;
           }
       }
       frame->pts = i;
       /* encode the image */
       ret = avcodec_encode_video2(c, &pkt, frame, &got_output);
       if (ret < 0) {
           fprintf(stderr, "Error encoding frame\n");
           exit(1);
       }
       if (got_output) {
           printf("Write frame %3d (size=%5d)\n", i, pkt.size);
           fwrite(pkt.data, 1, pkt.size, f);
           av_free_packet(&pkt);
       }
    }
    /* get the delayed frames */
    for (got_output = 1; got_output; i++) {
       fflush(stdout);
       ret = avcodec_encode_video2(c, &pkt, NULL, &got_output);
       if (ret < 0) {
           fprintf(stderr, "Error encoding frame\n");
           exit(1);
       }
       if (got_output) {
           printf("Write frame %3d (size=%5d)\n", i, pkt.size);
           fwrite(pkt.data, 1, pkt.size, f);
           av_free_packet(&pkt);
       }
    }

    /////  Closes the file and finishes.....
  • Can I specify unique pts for each frame in commandline ? [closed]

    24 septembre 2024, par postscripter

    I have a bunch of jpeg pictures, say four : 01.jpg, 05jpg, 12.jpg and 13.jpg. Can I create an mjpeg/mp4 with variable framerate, consisting of exactly four frames with pts = 01 sec, 05 sec, 12 sec and 13 sec respectively ? Without duplicating or looping them ? I believe it can be done with ffmpeg API, but I'm limited to cmd only.

    


  • avformat/asfdec_o : Don't segfault with lots of attached pics

    12 novembre 2020, par Andreas Rheinhardt
    avformat/asfdec_o : Don't segfault with lots of attached pics
    

    The ASF file format has a limit of 127 streams and the "asf_o" demuxer
    (the ASF demuxer from Libav) has an array of pointers for a structure
    called ASFStream that is allocated on demand for every stream. Attached
    pictures are not streams in the sense of the ASF specification, yet the
    demuxer created an ASFStream for them ; and in one codepath it also
    forgot to check whether the array of ASFStreams is already full. The
    result is a write beyond the end of the array and a segfault lateron.

    Fixing this is easy : Don't create ASFStreams for attached picture
    streams.

    (Other results of the current state of affairs are unnecessary allocations
    (of ASFStreams structures), the misparsing of valid files (there might not
    be enough ASFStreams left for the valid streams if attached pictures take
    up too many) ; furthermore, the ASFStreams created for attached pictures all
    have the stream number 0, an invalid stream number (the valid range is
    1-127). This means that invalid data (packets for a stream with stream
    number 0) won't get rejected lateron.)

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavformat/asfdec_o.c