Recherche avancée

Médias (1)

Mot : - Tags -/sintel

Autres articles (77)

  • 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 (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (5547)

  • Compiling c++ program for ffmpeg, error give undefined reference to [duplicate]

    6 août 2020, par leonardltk1

    I have a code read_mp3.cpp, which uses ffmpeg to decode an mp3 file into an array.

    


    Code for read_mp3.cpp is as follows :

    


        #include &#xA;    #include &#xA;&#xA;    // I use extern "C" as recommended here: https://blog.csdn.net/qq_18144521/article/details/79608355&#xA;    extern "C"&#xA;    {&#xA;    #include <libavutil></libavutil>opt.h>&#xA;    #include <libavcodec></libavcodec>avcodec.h>&#xA;    #include <libavformat></libavformat>avformat.h>&#xA;    #include <libswresample></libswresample>swresample.h>&#xA;    }&#xA;    using namespace std;&#xA;&#xA;&#xA;    int decode_audio_file(const char* path, const int sample_rate, double** data, int* size) {&#xA;        // initialize all muxers, demuxers and protocols for libavformat&#xA;        // (does nothing if called twice during the course of one program execution)&#xA;        av_register_all();&#xA;&#xA;        /*&#xA;        Code for the rest of this function is found here :&#xA;        https://rodic.fr/blog/libavcodec-tutorial-decode-audio-file/&#xA;        */&#xA;&#xA;        return 0;&#xA;    }&#xA;&#xA;    int main (int argc, char ** argv) {&#xA;        // decode data&#xA;        int sample_rate = 44100;&#xA;        double* data;&#xA;        int size;&#xA;        if (decode_audio_file(argv[1], sample_rate, &amp;data, &amp;size) != 0) {&#xA;            return -1;&#xA;        }&#xA;&#xA;        /*&#xA;        Do something with data ...&#xA;        */&#xA;&#xA;        return 0;&#xA;    }&#xA;

    &#xA;

    I tried different ways to compilations, but to no avail :

    &#xA;

        g&#x2B;&#x2B; -o ./read_mp3.out -Ofast -Wall -Wextra \&#xA;      -lavformat-ffmpeg -lavdevice-ffmpeg -lavcodec-ffmpeg -lavutil -lswresample \&#xA;    -std=c&#x2B;&#x2B;11 "./read_mp3.cpp"&#xA;    &#xA;    g&#x2B;&#x2B; -o ./read_mp3.out -Ofast -Wall -Wextra \&#xA;      -lavformat -lavdevice -lavcodec -lavutil -lswresample \&#xA;    -std=c&#x2B;&#x2B;11 "./read_mp3.cpp"&#xA;    &#xA;    g&#x2B;&#x2B; -o ./read_mp3.out -Ofast -Wall -Wextra \&#xA;      -lavformat  -lavdevice -lavcodec  -lavutil -pthread  -ldl -lswscale -lbz2  -lz -lm \&#xA;    -std=c&#x2B;&#x2B;11 "./read_mp3.cpp"&#xA;

    &#xA;

    but i get the following error :

    &#xA;

        /tmp/ccnZzoIh.o: In function `decode_audio_file(char const*, int, double**, int*)&#x27;:&#xA;    read_mp3.cpp:(.text&#x2B;0x2781): undefined reference to `av_register_all&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2786): undefined reference to `avformat_alloc_context&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x279c): undefined reference to `avformat_open_input&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x27b7): undefined reference to `avformat_find_stream_info&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x284b): undefined reference to `avcodec_find_decoder&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2858): undefined reference to `avcodec_open2&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2865): undefined reference to `swr_alloc&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2880): undefined reference to `av_opt_set_int&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2896): undefined reference to `av_opt_set_int&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x28ae): undefined reference to `av_opt_set_int&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x28c4): undefined reference to `av_opt_set_int&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x28dc): undefined reference to `av_opt_set_int&#x27;&#xA;    &#xA;    /tmp/ccnZzoIh.o:read_mp3.cpp:(.text&#x2B;0x28f0): more undefined references to `av_opt_set_int&#x27; follow&#xA;    /tmp/ccnZzoIh.o: In function `decode_audio_file(char const*, int, double**, int*)&#x27;:&#xA;    read_mp3.cpp:(.text&#x2B;0x2907): undefined reference to `av_opt_set_sample_fmt&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x291d): undefined reference to `av_opt_set_sample_fmt&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2927): undefined reference to `swr_init&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2931): undefined reference to `swr_is_initialized&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2943): undefined reference to `av_init_packet&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2948): undefined reference to `av_frame_alloc&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x297b): undefined reference to `av_read_frame&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x299a): undefined reference to `avcodec_decode_audio4&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x29cc): undefined reference to `av_samples_alloc&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x29e6): undefined reference to `swr_convert&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2a36): undefined reference to `av_frame_free&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2a40): undefined reference to `swr_free&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2a48): undefined reference to `avcodec_close&#x27;&#xA;    read_mp3.cpp:(.text&#x2B;0x2a52): undefined reference to `avformat_free_context&#x27;&#xA;&#xA;    collect2: error: ld returned 1 exit status&#xA;

    &#xA;

  • Revert "lavfi/avfiltergraph : add check before free the format"

    7 août 2020, par Andreas Rheinhardt
    Revert "lavfi/avfiltergraph : add check before free the format"
    

    This reverts commit f156f4ab2317f22bfef33c7eaead0d5d5f162903.

    The checks added by said commit are nonsense because they did not help
    in case ff_merge_samplerates() or ff_merge_formats() returned NULL
    while freeing one of its arguments : Said freeing does not change
    the local variables of can_merge_formats().

    Reviewed-by : Nicolas George <george@nsup.org>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavfilter/avfiltergraph.c
  • fftools/ffmpeg : Fix leak of AVFilterInOut in case of error

    23 août 2020, par Andreas Rheinhardt
    fftools/ffmpeg : Fix leak of AVFilterInOut in case of error
    

    The AVFilterInOuts normally get freed in init_output_filter() when
    the corresponding streams get created ; yet if an error happens before
    one reaches said point, they leak. Therefore this commit makes
    ffmpeg_cleanup free them, too.

    Fixes ticket #8267.

    Reviewed-by : Nicolas George <george@nsup.org>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] fftools/ffmpeg.c