Recherche avancée

Médias (91)

Autres articles (47)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (6701)

  • Remove white-xifish.png from makefile dependencies for spec ; it doesn’t appear to

    3 février 2012, par Monty
    Remove white-xifish.png from makefile dependencies for spec ; it doesn’t appear to
    reference it, and trying to install it twice is breaking make install.
    

    git-svn-id : http://svn.xiph.org/trunk/vorbis@18185 0101bb08-14d6-0310-b084-bc0e0c8e3800

    • [DH] doc/Makefile.am
    • [DH] doc/Vorbis_I_spec.html
    • [DH] doc/Vorbis_I_spec.pdf
  • avutil/film_grain_params : add metadata to common struct

    15 mars 2024, par Niklas Haas
    avutil/film_grain_params : add metadata to common struct
    

    This is needed for AV1 film grain as well, when using AFGS1 streams.
    Also add extra width/height and subsampling information, which AFGS1
    cares about, as part of the same API bump. (And in principle, H274
    should also expose this information, since it is needed downstream to
    correctly adjust the chroma grain frequency to the subsampling ratio)

    Deprecate the equivalent H274-exclusive fields. To avoid breaking ABI,
    add the new fields after the union ; but with enough of a paper trail to
    hopefully re-order them on the next bump.

    • [DH] doc/APIchanges
    • [DH] libavutil/film_grain_params.h
    • [DH] libavutil/version.h
  • How to accurately/precisely seek to a timestamp in media with ffmpeg API ?

    11 novembre 2024, par wangt13

    I am writing a simple audio player with ffmpeg ver.4.4.4, and I want to seek to specific timestamp of the audio media (a MP3 file).

    


    Here is my code.
I am using avformat_seek_file() with flags of AVSEEK_FLAG_ANY | AVSEEK_FLAG_BACKWARD, and when I set seek_pos to 10 second when it is playing frames of 3rd second, it seemed NOT jump to the 10th second, it only played the audios after 3rd second !

    


    Then I added the code skipping/discarding the packets whose pts is before the seek position. This time, it loops in the if (curr_s < seek_ts), not going to 10th seconds.

    


    It seemed NO keyframe at 10th second.

    


    void decode_func(...)
{
    while (1) {
        if (av_read_frame(pfmtctx, packet) < 0) {
            avcodec_flush_buffers(pcodectx);
            printf("Got end of media, breaking\n");
            break;
        }
        /**
         * Discard the packet of pts before seek position
         */
        curr_s = packet->pts * av_q2d(pfmtctx->streams[stream]->time_base);
        if (seek_ts) {
            if (curr_s < seek_ts) {
                avcodec_flush_buffers(pcodectx);
                av_frame_unref(pFrame);
                continue;
            } else {
                seek_ts = 0;
            }
        }
        if (seek_req) {
            int64_t seek_abs;
            seek_req = 0;
            seek_abs = (seek_pos)*AV_TIME_BASE;
            printf("Seek to %lld, pts: %lld\n", seek_abs, packet->pts;
            if (seek_abs < 0) {
                seek_abs = 0;
            }
            if (avformat_seek_file(pfmtctx, -1, INT64_MIN, seek_abs, INT64_MAX, AVSEEK_FLAG_ANY | AVSEEK_FLAG_BACKWARD) >= 0) {
                avcodec_flush_buffers(pcodectx);
                seek_ts = seek_abs;
                continue;
            } else {
                printf("Failed to seek to %lld\n", seek_abs);
                seek_ts = 0;
            }
        }

        res = avcodec_send_packet(pcodectx, packet);
        while (res >= 0) {
            res = avcodec_receive_frame(pcodectx, pFrame);
            if (res == AVERROR(EAGAIN)) {
                break;
            } else if (res == AVERROR_EOF) {
                break;
            } else if (res >= 0) {
             /// Processing decoded frame
            }
        av_frame_unref(frame);
    }
}


    


    So, how can I precisely (almost) seek to a timestamp with FFMPEG ?