Recherche avancée

Médias (0)

Mot : - Tags -/configuration

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (30)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (4692)

  • Why does the official LibAV 12 video example not work properly ?

    11 avril 2021, par TheNeuronalCoder

    I would say the title is quite self-explanatory, but I nearly completely copied the example given by LibAV right here and yet the output video it produced was not playable. Why is it not playable ? Am I using the wrong file extension ? I do not understand what I could have possibly done wrong here and there's little to no documentation I could find for how to encode mp4 video in C++.

    


    #include &#xA;#include &#xA;#include &#xA;#include "libavcodec/avcodec.h"&#xA;#include "libavutil/frame.h"&#xA;#include "libavutil/imgutils.h"&#xA;&#xA;static void encode(AVCodecContext *enc_ctx, AVFrame *frame, AVPacket *pkt, FILE *outfile) {&#xA;    int ret;&#xA;    ret = avcodec_send_frame(enc_ctx, frame);&#xA;    if (ret &lt; 0) {&#xA;        fprintf(stderr, "error sending a frame for encoding\n");&#xA;        exit(1);&#xA;    }&#xA;    while (ret >= 0) {&#xA;        ret = avcodec_receive_packet(enc_ctx, pkt);&#xA;        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)&#xA;            return;&#xA;        else if (ret &lt; 0) {&#xA;            fprintf(stderr, "error during encoding\n");&#xA;            exit(1);&#xA;        }&#xA;        printf("encoded frame %3"PRId64" (size=%5d)\n", pkt->pts, pkt->size);&#xA;        fwrite(pkt->data, 1, pkt->size, outfile);&#xA;        av_packet_unref(pkt);&#xA;    }&#xA;}&#xA;&#xA;int main() {&#xA;    const char *filename = "animation.mp4";&#xA;    const AVCodec *codec;&#xA;    AVCodecContext *c = NULL;&#xA;    int i, ret, x, y;&#xA;    FILE *f;&#xA;    AVFrame *picture;&#xA;    AVPacket *pkt;&#xA;    uint8_t endcode[] = { 0, 0, 1, 0xb7 };&#xA;    if (argc &lt;= 1) {&#xA;        fprintf(stderr, "Usage: %s <output file="file">\n", argv[0]);&#xA;        exit(0);&#xA;    }&#xA;    avcodec_register_all();&#xA;    codec = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);&#xA;    if (!codec) {&#xA;        fprintf(stderr, "codec not found\n");&#xA;        exit(1);&#xA;    }&#xA;    c = avcodec_alloc_context3(codec);&#xA;    picture = av_frame_alloc();&#xA;    pkt = av_packet_alloc();&#xA;    if (!pkt)&#xA;        exit(1);&#xA;    c->bit_rate = 400000;&#xA;    c->width = 352;&#xA;    c->height = 288;&#xA;    c->time_base = (AVRational){1, 25};&#xA;    c->framerate = (AVRational){25, 1};&#xA;    c->gop_size = 10;&#xA;    c->max_b_frames=1;&#xA;    c->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;    if (avcodec_open2(c, codec, NULL) &lt; 0) {&#xA;        fprintf(stderr, "could not open codec\n");&#xA;        exit(1);&#xA;    }&#xA;    f = fopen(filename, "wb");&#xA;    if (!f) {&#xA;        fprintf(stderr, "could not open %s\n", filename);&#xA;        exit(1);&#xA;    }&#xA;    picture->format = c->pix_fmt;&#xA;    picture->width  = c->width;&#xA;    picture->height = c->height;&#xA;    ret = av_frame_get_buffer(picture, 32);&#xA;    if (ret &lt; 0) {&#xA;        fprintf(stderr, "could not alloc the frame data\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    for(i=0;i&lt;25;i&#x2B;&#x2B;) {&#xA;        fflush(stdout);&#xA;        ret = av_frame_make_writable(picture);&#xA;        if (ret &lt; 0)&#xA;            exit(1);&#xA;&#xA;        for(y=0;yheight;y&#x2B;&#x2B;) {&#xA;            for(x=0;xwidth;x&#x2B;&#x2B;) {&#xA;                picture->data[0][y * picture->linesize[0] &#x2B; x] = x &#x2B; y &#x2B; i * 3;&#xA;            }&#xA;        }&#xA;&#xA;        for(y=0;yheight/2;y&#x2B;&#x2B;) {&#xA;            for(x=0;xwidth/2;x&#x2B;&#x2B;) {&#xA;                picture->data[1][y * picture->linesize[1] &#x2B; x] = 128 &#x2B; y &#x2B; i * 2;&#xA;                picture->data[2][y * picture->linesize[2] &#x2B; x] = 64 &#x2B; x &#x2B; i * 5;&#xA;            }&#xA;        }&#xA;&#xA;        picture->pts = i;&#xA;        encode(c, picture, pkt, f);&#xA;    }&#xA;&#xA;    encode(c, NULL, pkt, f);&#xA;&#xA;    fwrite(endcode, 1, sizeof(endcode), f);&#xA;    fclose(f);&#xA;    avcodec_free_context(&amp;c);&#xA;    av_frame_free(&amp;picture);&#xA;    av_packet_free(&amp;pkt);&#xA;    return 0;&#xA;}&#xA;</output>

    &#xA;

  • Revision 15754 : Avoir un titre d’email propre (pas de multis ni de balises) dans le mail

    11 juin 2010, par kent1@… — Log

    Avoir un titre d’email propre (pas de multis ni de balises) dans le mail

  • Révision 19107 : eciter un warning : genie/mail necessite un argument

    16 mars 2012, par cedric -