Recherche avancée

Médias (91)

Autres articles (42)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (6503)

  • 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"

  • avfilter/af_silenceremove : add real peak detector

    25 mai 2023, par Paul B Mahol
    avfilter/af_silenceremove : add real peak detector
    

    Rename old peak detector to more correct name one.

    • [DH] doc/filters.texi
    • [DH] libavfilter/af_silenceremove.c
    • [DH] libavfilter/silenceremove_template.c
    • [DH] tests/fate/filter-audio.mak
  • 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