Recherche avancée

Médias (91)

Autres articles (111)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (8905)

  • How to force AVCodecContext to release all references to any buffers

    17 septembre 2024, par imikbox

    I'm using FFMPEG to decode a video stream and I have implemented a custom functions for AVFrame memory allocation and de-allocation (by setting a custom function for codec_ctx->get_buffer2). So when an AVFrame requires new memory, I do the memory allocation and wrap an AvBufferRef around it using av_buffer_create. I also define my custom de-allocation function, so when the reference counted AvBufferRef is not required anymore, I do the memory clean up.
This way I can log precisely when memory gets allocated and when a buffer becomes free.

    


    During video decoding I want to do a seek, for that I need to clear out all buffers from my AVCodecContext. I'm following the official documentation for that :

    


      

    • enter draining mode by sending NULL to the decoder
    • 


    • collect all frames from the decoder
    • 


    • flush AVCodecContext
    • 


    


    This is the code for that :

    


            avcodec_send_packet(codec_ctx, NULL);
        auto result = 0;
        while (result != AVERROR_EOF)
        {
            auto frame = av_frame_alloc();
            result = avcodec_receive_frame(codec_ctx, frame);
            av_frame_free(&frame);
        }
        avcodec_flush_buffers(codec_ctx);


    


    However, I can see (due to my custom memory management) that not all frames are released.
Only when I close the codec context by calling avcodec_free_context, I see all frames getting released.

    


    Any hints how I can completely release all resources in AVCodecContext (without closing it) ?

    


  • What is the best way to get duration of a video using ffprobe (ffmpeg) ?

    15 juin 2023, par promaxdev

    Most of the solutions to get duration revolves around parsing the output to get the duration. Even FFProbe official documentation here says that there is no duration stored for MKV, webm, etc.

    


    Take the below examples.

    


    ffprobe -v error -i <inputmkv> -show_entries stream=...,duration,.. -of default=noprint_wrappers=1&#xA;</inputmkv>

    &#xA;

    This gives me the below output. This is not having duration.

    &#xA;

    Image with Duration NA

    &#xA;

    But when I run the same command differently like below, I am getting this output but having duration. Just removed '-v error' part.

    &#xA;

    ffprobe -i <inputmkv> -show_entries stream=...duration,... -of default=noprint_wrappers=1 &#xA;</inputmkv>

    &#xA;

    enter image description here

    &#xA;

    If you notice the same command shows the duration in one place and not in another place.

    &#xA;

    So my question is, What is the best way to get duration in ffmpeg, especially for the video streams ?

    &#xA;

    Edit : I have already explored decoding using null mux option. But that is a costly operation and also need to parse the output.

    &#xA;

  • How to build FFmpeg into static libs for MacOS for usage in a C++ application

    29 septembre 2017, par Programist

    How can I build static libs of FFmpeg for MacOS.

    All I need is to make a .mp4 with H264 codecs out of some images using ffmpeg. Dont need the build to be fully loaded with features.

    I built it for iOS using a script from here which was really simple and smooth. It checked out the code & smoothly built the output into include/ & lib/ folders.

    I checked the official FFmpeg site offers excutables for MacOS. But I need static libs to use in my C++ code.

    Question :
    I want to build FFmpeg into static libs for MacOS only for creating .mp4 videos. How can I do it OR
    How can I change this script to do the same for MacOS ?

    PS :
    I am Mac OS Sierra with Xcode9