Recherche avancée

Médias (91)

Autres articles (11)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

Sur d’autres sites (4352)

  • Libav Transcoding to H264 : Frames being dropped

    21 juin 2014, par roman

    I’m sorry if my question isn’t too well formulated, I’m only now getting started with FFmpeg and Libav. I’m not too knowledgable about media formats either, I pretty much learned all I know about the topic this past month. I’ve been doing as much research as I can, and have gotten pretty far, but I’ve only now gotten to the point where I’m almost unsure what my question actually is ! These are more like observations, but hopefully some of the experts can help me out here.

    I’m trying to transcode Gifs into MP4s using FFmpeg’s libraries, but I’m running into a strange issue when using the H264 Codec. In my transcoding loop, I keep a count of the number of frames that I write out (by verifying the return value of av_write_frame). In a particular sample, I count a total of 166 frames written out. If I examine FFmpeg’s converted file using FFprobe (the functionality I’m wanting to emulate using my program, a conversion from Gif to MP4), FFmpeg’s output file also seems to have 166 frames, but when I examine my output with FFprobe, I seem to only have 144 frames. What I find a bit interesting is that if I simply change my codec from H264 to MPEG4, my output appears to have the 166 frames, matching FFmpeg’s output and my counter. I get very similar results with different Gif files, where my counter of frames written matches FFmpeg’s output’s frame count, but my output seems to drop some frames.

    Encoder settings :

    ostream_codec_context->codec_id = CODEC_IN_USE;  //CODEC_ID_H264 or CODEC_ID_MPEG4
    ostream_codec_context->pix_fmt = AV_PIX_FMT_YUV420P;
    ostream_codec_context->codec_type = AVMEDIA_TYPE_VIDEO;
    ostream_codec_context->flags = CODEC_FLAG_GLOBAL_HEADER;
    ostream_codec_context->profile = FF_PROFILE_MPEG4_SIMPLE;

    ostream_codec_context->gop_size = istream_codec_context->gop_size;
    ostream_codec_context->time_base = istream_codec_context->time_base;

    ostream_codec_context->width  = (istream_codec_context->width  / 2) * 2;
    ostream_codec_context->height = (istream_codec_context->height / 2) * 2;    

    Transcoding loop :

    I’ve omitted some error-checking code and debugging statements

    avformat_write_header(oformat_context, NULL);
    while (av_read_frame(iformat_context, &packet) == 0 )
    {
      if (packet.stream_index == istream_index)
      {  
         avcodec_decode_video2(istream_codec_context, ipicture, &full_frame, &packet);
         if (full_frame)
         {
            sws_scale(image_conversion_context,
                      (uint8_t const * const *) ipicture->data,
                      ipicture->linesize, 0, istream_codec_context->height,
                      opicture->data, opicture->linesize);

            opicture->pts = av_rescale_q(packet.pts, istream_codec_context->time_base,
                                         ostream->time_base);

            ret = avcodec_encode_video2(ostream_codec_context, &packet,
                                        opicture, &got_packet);
            if (!ret)
            {
               ret = av_write_frame(oformat_context, &packet);
               if (ret < 0)
                  num_frames_written++;
            }
         }
      }
      av_free_packet(&packet);
      av_init_packet(&packet);
    }

    I’m also having issues with my output’s bit-rate. I can try setting it with the rest of my encoder settings, but the bit-rate that FFprobe shows is not the same as what I give the codec context. I tried setting the bit-rate to constant values just to see how it affected my output, and although my output’s bit-rate isn’t the same as what I give it, I found that my input definitely seems to influence the output’s actual bit-rate. I found a post that seems to be dealing with my issue, but the solution listed there does not seem to fix my issue.

    http://ffmpeg.org/pipermail/libav-user/2012-July/002492.html

    Another thing worth mentioning is that my various time bases don’t seem to match up with those of FFmpeg’s output. Notably, my output’s TBC seems to be twice the inverse of my output codec context’s time base. I’m not too sure if this is an issue with the Gif file format, my output codec context’s always seems to be set to 1/100.

    Bit-rate calculation and setting

    int calculated_br = istream_codec_context->time_base.den *    
                       avpicture_get_size(AV_PIX_FMT_YUV420P, ostream_codec_context->width,
                                          ostream_codec_context->height);    

    ostream_codec_context->bit_rate = calculated_br;
    ostream_codec_context->rc_min_rate = calculated_br;
    ostream_codec_context->rc_max_rate = calculated_br;
    ostream_codec_context->rc_buffer_size = calculated_br;

    I’ve got a hunch that all these issues could be related to me not setting my PTS/DTS correctly, even though my output’s pts/dts values match those of FFmpeg’s output.

    I would appreciate some help,
    Thank you !

  • Anomalie #4782 (Nouveau) : Révisions pour un admin restreint

    11 mai 2021, par jluc -

    En spip4.0alpha, sur l’accueil du privé, un admin restreint voit le nombre total des révisions sur le site et une liste vide suivi d’une abondante pagination inutile. Cf copie d’écran sur spip.net

    Et sur la page d’un article, un admin restreint n’a aucun aperçu des révisions. Il me semble qu’un admin restreint devrait avoir un plein accès aux révisions des articles de sa zone d’administration.

  • how to specify a seqence of image file to ffmpeg

    5 juillet 2014, par steveh

    i’m trying to encode a sequence of raw rgb image files in ffmpeg

    i have created a list of test files named lmfd001.rgb to lmfd299.rgb (300 total)

    i/m attempting to compress like this

    ffmpeg.exe -s 450x450 -pix_fmt rgb8 -c h264 -i lmfd%03d.rgb out.mp4

    it says

    lmfd%03d.rgb: No such file or directory

    i’m in a cygwin shell. i’m in the .rgb files directory.

    i also tried -i lmfd%03.rgb. i- lmfd001.rgb works but 1 file isn’t much use.

    i’ve googled around and that seems to be the right format. any ideas anyone ?

    i read this
    Warning : ffmpeg command line arguments are position sensitive – make sure you don’t mix up the order. Good rule of thumb to prevent mistakes is to keep the order of

    ffmpeg [input options] -i [input filename] -codec:v [video options] -codec:a [audio options] [output file options] [output filename]

    so i tried that too but didn ;t help