Advanced search

Medias (91)

Other articles (60)

  • MediaSPIP v0.2

    21 June 2013, by

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 April 2011, by

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Publier sur MédiaSpip

    13 June 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

On other websites (6815)

  • How do I set the framerate/FPS in an FFmpeg code (C)?

    2 June 2020, by Tobias v. Brevern

    I try to encode single pictures to a .avi video. The goal is to have every picture displayed for a set amount of seconds to create a slide show. I tried my script with 10 pictures and a delay of 1/5 of a second but the output file was not even half a second long (but displayed every picture). For setting the framerate I use the time_base option of the AVCodeContext:

    



    ctx->time_base = (AVRational) {1, 5};

    



    When I use the command ffmpeg -framerate 1/3 -i img%03d.png -codec png output.avi everything works fine and I get the file I want. I use the png codec because it was the only one i tried that is playable with Windows Media Player.

    



    Am I missing anything here? Is there another option that has impact on the framerate?

    



    This is my code so far:

    



    Note: I use a couple of self made data structures and methodes from other classes. They are the ones written in Caps Lock. They basicly do what the name suggests but are necessary for my project. The Input Array contains the pictures that i want to encode.

    



    include <libavutil></libavutil>opt.h>&#xA;include <libavutil></libavutil>imgutils.h>&#xA;include <libavutil></libavutil>error.h>&#xA;&#xA;void PixmapsToAVI (ARRAY* arr, String outfile, double secs)&#xA;{&#xA;     if (arr!=nil &amp;&amp; outfile!="" &amp;&amp; secs!=0) {&#xA;         AVCodec* codec = avcodec_find_encoder(AV_CODEC_ID_PNG);&#xA;         if (codec) {&#xA;             int width  = -1;&#xA;             int height = -1;&#xA;             int ret = 0;&#xA;&#xA;             AVCodecContext* ctx = NULL;&#xA;             ctx = avcodec_alloc_context3(codec);&#xA;             AVFrame* frame = av_frame_alloc();&#xA;             AVPacket* pkt  = av_packet_alloc();&#xA;&#xA;             FILE* file = fopen(outfile, "wb");&#xA;&#xA;             ARRAYELEMENT* e;&#xA;             int count = 0;&#xA;             forall (e, *arr) {&#xA;                 BITMAP bitmap (e->value, false);&#xA;                 if (width &lt; 0) {&#xA;                     width  = bitmap.Width();&#xA;                     height = bitmap.Height();&#xA;&#xA;                     ctx->width = width;&#xA;                     ctx->height = height;&#xA;                     ctx->time_base = (AVRational){1, 5};&#xA;                     ctx->framerate = (AVRational){5, 1};&#xA;                     ctx->pix_fmt = AV_PIX_FMT_RGB24;&#xA;                     ret = avcodec_open2(ctx, codec, NULL);&#xA;&#xA;                     frame->width  = width;&#xA;                     frame->height = height;&#xA;                     frame->format = ctx->pix_fmt;&#xA;                     av_opt_set(ctx->priv_data, "preset", "slow", 1);&#xA;&#xA;                 }&#xA;                 ret  = av_frame_get_buffer(frame, 1);&#xA;                 frame->linesize[0] = width*3;&#xA;&#xA;                 bitmap.Convert32();&#xA;                 byte* pixels = bitmap.PixelsRGB();      &#xA;&#xA;//The two methodes above convert the Pixmap into the RGB structure we need&#xA;//They are not needed to get an output file but are needed to get one that makes sense&#xA;&#xA;                     fflush(stdout);&#xA;                     int writeable = av_frame_make_writable(frame);&#xA;                     if (writeable>=0) {&#xA;                         for(int i=0; i&lt;(height*width*3); i&#x2B;&#x2B;){&#xA;                             frame->data[0][i] = pixels[i];&#xA;                         }&#xA;                     }&#xA;                     ret = avcodec_send_frame(ctx, frame);&#xA;                     for(int i=0; i= 0) {&#xA;                       ret = avcodec_receive_packet(ctx, pkt);&#xA;                     }&#xA;                     count&#x2B;&#x2B;;&#xA;                 avcodec_receive_packet(ctx, pkt);&#xA;                 fwrite(pkt->data, 1, pkt->size, file);&#xA;                 fflush(stdout);&#xA;                 av_packet_unref(pkt);&#xA;             }&#xA;             fclose(file);&#xA;             avcodec_free_context(&amp;ctx);&#xA;             av_frame_free(&amp;frame);&#xA;             av_packet_free(&amp;pkt);&#xA;&#xA;         }&#xA;     }&#xA;} &#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;

    &#xA;

  • How to let fluent-ffmpeg complete rendering before executing next line of code?

    12 April 2020, by wongz

    The .forEach() loop cuts ffmpeg short so it doesn't fully finish rendering any single video. How can I allow ffmpeg to finish rendering before the next loop occurs?

    &#xA;&#xA;

    let videos = [vid1.mp4, vid2.mp4, vid3.mp4];&#xA;&#xA;videos.forEach((vid, i) => {&#xA;  ffmpeg(vid)&#xA;    .size(&#x27;1280x720&#x27;)&#xA;    .save(vid);&#xA;}&#xA;

    &#xA;

  • lavc/vdpau_vp9: Do not mix declarations and code.

    6 January 2020, by Carl Eugen Hoyos
    lavc/vdpau_vp9: Do not mix declarations and code.
    

    Fixes the following gcc warning:
    libavcodec/vdpau_vp9.c:45:5: warning: ISO C90 forbids mixed declarations and code

    • [DH] libavcodec/vdpau_vp9.c