Recherche avancée

Médias (0)

Mot : - Tags -/navigation

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

Autres articles (71)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (11300)

  • Revision a51e389b42 : Merge "Adjust full-pixel search method in real-time mode"

    9 juillet 2014, par Yunqing Wang

    Merge "Adjust full-pixel search method in real-time mode"

  • FFMPEG :Adjusting PTS and DTS of encoded packets with real timestamps information

    19 août 2020, par jackey balwani

    I am trying to record a video of activities in desktop using muxing in FFMPEG Library.
I referred following link for my implementation.
https://ffmpeg.org/doxygen/trunk/muxing_8c_source.html

    


    I observe that the encoded video plays too fast. Below is the code of encoding the frame and then writing it to output file.

    


    static int write_frame(AVFormatContext *fmt_ctx, AVCodecContext *c,
                        AVStream *st, AVFrame *frame)
{
    int ret;
 
    // send the frame to the encoder
    ret = avcodec_send_frame(c, frame);
    if (ret < 0) {
    fprintf(stderr, "Error sending a frame to the encoder: %s\n",av_err2str(ret));
    exit(1);
    }
    while (ret >= 0) {
        AVPacket pkt = { 0 };

        ret = avcodec_receive_packet(c, &pkt);
        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
           break;
        else if (ret < 0) {
           fprintf(stderr, "Error encoding a frame: %s\n", av_err2str(ret));
           exit(1);
        }

        /* rescale output packet timestamp values from codec to stream timebase(from 25 to 90000 this case) */
        av_packet_rescale_ts(&pkt, c->time_base, st->time_base);
        pkt.stream_index = st->index;

        /* Write the compressed frame to the media file. */
        log_packet(fmt_ctx, &pkt);
        ret = av_interleaved_write_frame(fmt_ctx, &pkt);
        av_packet_unref(&pkt);
        if (ret < 0) {
              fprintf(stderr, "Error while writing output packet: %s\n", av_err2str(ret));
              exit(1);
        }
    }
  
    return ret == AVERROR_EOF ? 1 : 0;
  }


    


    -> I am rescaling output packet timestamp values from codec to stream timebase (25 -> 90,000) before writing.
-> Since encoded video does plays very fast, so I have added temporary fix to multiply stream timebase by some factor just before av_packet_rescale_ts (in my case it is 5 -> 5*st->time_base.den which becomes 4,50,000) so that output video duration increases. This may not be the accurate solution as this would not give the real time shift between the frames.

    


    /**  rescale output packet timestamp values from codec to stream timebase  **/
st->time_base.den = 5*st->time_base.den;
av_packet_rescale_ts(pkt, *time_base, st->time_base);
pkt->stream_index = st->index;
/**  Write the compressed frame to the media file.  **/
return av_interleaved_write_frame(fmt_ctx, pkt);


    


    -> I want that output video duration should be similar to the input. I have heard of things like giving real timestamps to the PTS and DTS of frame and packets and encoding at variable or unknown frame rate.
Can we use these , If yes then How to implement ?
any suggestions or pseudo code of the approach would really help.

    


    Thanks

    


  • How to encode h264/hevc in real time with ffmpeg AMF, without delay ?

    26 septembre 2023, par 21pages

    amf encoding will delay one frame, I added the option but it doesn't work.
av_opt_set(codec_ctx->priv_data, "usage", "ultralowlatency", 0)

    


    doc of AMF Video Encode SDK says :

    


    In the Transcoding mode the encoder needs to accept at least 3 input frames before any output is produced. In low
latency modes output becomes available as soon as the first submitted frame is encoded.