Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (58)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (11168)

  • avformat/matroskadec : Free right buffer on error

    3 mai 2020, par Andreas Rheinhardt
    avformat/matroskadec : Free right buffer on error
    

    Since commit 979b5b89594c7628bd846c63198cb64ef9d81d16, reverting the
    Matroska ContentCompression is no longer done inside
    matroska_parse_frame() (the function that creates AVPackets out of the
    parsed data (unless we are dealing with certain codecs that need special
    handling)), but instead in matroska_parse_block(). As a consequence,
    the data that matroska_parse_frame() receives is no longer always owned
    by an AVBuffer ; it is owned by an AVBuffer iff no ContentCompression needed
    to be reversed ; otherwise the data is independently allocated and needs
    to be freed on error.

    Whether the data is owned by an AVBuffer or not is indicated by a variable
    buf of type AVBufferRef * : If it is NULL, the data is independently
    allocated, if not it is owned by the underlying AVBuffer (and is used to
    avoid copying the data when creating the AVPackets).

    Because the allocation of the buffer holding the uncompressed data happens
    outside of matroska_parse_frame() (if a ContentCompression needs to be
    reversed), the data is passed as uint8_t ** in order to not leave any
    dangling pointers behind in matroska_parse_block() should the data need to
    be freed : In case of errors, said uint8_t ** would be av_freep()'ed in
    case buf indicated the data to be independently allocated.

    Yet there is a problem with this : Some codecs (namely WavPack and
    ProRes) need special handling : Their packets are only stored in
    Matroska in a stripped form to save space and the demuxer reconstructs
    full packets. This involved allocating a new, enlarged buffer. And if
    an error happens when trying to wrap this new buffer into an AVBuffer,
    this buffer needs to be freed ; yet instead the given uint8_t ** (holding
    the uncompressed, yet still stripped form of the data) would be freed
    (av_freep()'ed) which certainly leads to a memleak of the new buffer ;
    even worse, in case the track does not use ContentCompression the given
    uint8_t ** must not be freed as the actual data is owned by an AVBuffer
    and the data given to matroska_parse_frame() is not the start of the
    actual allocated buffer at all.

    Both of these issues are fixed by always freeing the current data in
    case it is independently allocated. Furthermore, while it would be
    possible to track whether the pointer from matroska_parse_block() needs
    to be reset or not, there is no gain in doing so, as the pointer is not
    used at all afterwards and the sematics are clear : If the data passed
    to matroska_parse_frame() is independently allocated, then ownership
    of the data passes to matroska_parse_frame(). So don't pass the data
    via uint8_t **.

    Fixes Coverity ID 1462661 (the issue as described by Coverity is btw
    a false positive : It thinks that this error can be triggered by ProRes
    with a size of zero after reconstructing the original packets, but the
    reconstructed packets can't have a size of zero).

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavformat/matroskadec.c
  • Blank out video frames for last two minutes of MP4 (while keeping audio intact)

    13 juillet 2020, par fourells5

    I am trying to make a copy of one of my mp4 movies with audio intact, but blacking out video frames only on the last few minutes. Basically I want to keep the end credit music but without the artifacted video.

    &#xA;

    I found this answer : which works perfectly for an entire mp4 file (including a test fragment I made of the above ending credits sequence), but I need it applied as I stated above to just the end of the entire copied full mp4.

    &#xA;

    In this case I don't want to start blanking the video stream frames until after 2h 7m 30s. I messed around with combinations of the -ss, -start_time and -timecode 02:07:31 params, but I'm an ffmpeg noob and couldn't get it to produce anything but cut-out sections or the whole copy blanked.

    &#xA;

    Any guidance would be greatly appreciated !

    &#xA;

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

    &#xA;

    Code for read_mp3.cpp is as follows :

    &#xA;

        #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;