Recherche avancée

Médias (0)

Mot : - Tags -/alertes

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

Autres articles (74)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (12943)

  • Green screen writing FLV file libavformat

    5 mai 2013, par YYZ

    I've written a piece of C++ code that can capture webcam video frame, decode them, convert them to YUV420P, encode them and then write them to a file. If I use the mpeg2 codec and write to a .mpg file, everything works perfectly. But, if I use flv, then the output produced is just a green screen. I'm not sure if there are different encoder settings I need to set for encoding flv video ? Here's my code(the relevant parts) :

    Encoder settings :

    c->codec_id = codec_id;
    c->bit_rate = 400000;
    // Resolution must be a multiple of two.
    c->width    = 352;
    c->height   = 288;
    c->time_base.den = STREAM_FRAME_RATE;
    c->time_base.num = 1;
    //emit one intra frame every twelve frames at most
    c->gop_size      = 12;
    c->pix_fmt       = STREAM_PIX_FMT;

    Write the frames

    int ret;
    uint8_t *buffer = NULL;
    static struct SwsContext *sws_ctx;

    //Setup the codec context, and set its width and height to be equal to the input video width and height
    AVCodecContext *c = st->codec;
    c->width = pCodecCtx->width;
    c->height = pCodecCtx->height;

    av_init_packet(&packet);
    frameYUV = avcodec_alloc_frame();

    //Determine how big the buffer will need to be to store the captured frame
    numBytes = avpicture_get_size(STREAM_PIX_FMT,pCodecCtx->width,pCodecCtx->height);

    //Allocate the needed buffer size
    buffer = new uint8_t[numBytes];
    sws_ctx = sws_getContext(pCodecCtx->width,pCodecCtx->height,pCodecCtx->pix_fmt,
                           pCodecCtx->width,pCodecCtx->height,
                           STREAM_PIX_FMT,SWS_BICUBIC,NULL,NULL,NULL);

    //Fill the output frame
    avpicture_fill((AVPicture *)frameYUV,buffer,STREAM_PIX_FMT,pCodecCtx->width,pCodecCtx->height);

    //Read a video frame in
    av_read_frame(pFormatCtx,&packet);

    //Decode the contents of packet into pFrame
    avcodec_decode_video2(pCodecCtx,pFrame,&frameFinished,&packet);

    //Scale pFrame into frameYUV, and convert to PIXFMTYUV420P
    sws_scale
    (
       sws_ctx,
       (uint8_t const * const *)pFrame->data,
       pFrame->linesize,
       0,
       pCodecCtx->height,
       frameYUV->data,
       frameYUV->linesize
    );
    av_init_packet(&samsPacket);
    //Encode frameYUV
    avcodec_encode_video2(c, &samsPacket, frameYUV, &gotSamsPacket);

    AVPacket pkt = { 0 };
    int got_packet;
    av_init_packet(&pkt);
    // encode the image
    ret = avcodec_encode_video2(c, &pkt, frame, &got_packet);
    if (ret < 0){
       debugLogStreamSave->debug("Error encoding video frame");
       exit(1);
    }
    if (!ret && got_packet && pkt.size){
       pkt.stream_index = st->index;

       // Write the compressed frame to our output
       ret = av_interleaved_write_frame(oc, &pkt);

    Any help would be appreciated !

  • How to seek in FFmpeg C/C++

    2 août 2017, par DRiFTy

    Does anyone know how to implement seeking by seconds (or milliseconds) in FFmpeg. I currently have a loop running through the frames of a video using av_read_frame() and I want to determine what time this frame should be at in seconds. If it gets to a certain point then I want to seek to a later point in the video. By the way it is not a video player, just processing the frames. Ive heard I should be able to get the dts or pts from the packet but its always returning 0.

  • How to check if FFmpeg process is complete

    5 juillet 2017, par lllazo

    How can I check if ffmpeg process is complete.
    Like if I want to perform overlaying of image to video, I want to determine when the process is completed or if the output file is already complete.

    So from this command

     ffmpeg -i original.mp4 -i watermark.png -filter_complex "overlay=(W-w)/2:(H-h)/2" output.mp4

    How can I determine if output.mp4 is already complete.
    Because if I have another function to transfer the output file somewhere, the transferred file is still incomplete by the time transfer is executed.