Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (44)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (8647)

  • Problem : av_seek_frame() always returns me the beginning of the video

    3 novembre 2020, par ZWen

    I'm currently trying to making use of FFMpeg to build a player. When I'm using av_seek_frame() to change the timestamp, it always gives me the beginning of the stream.

    


    Here is my code :

    


    bool XDemux::Seek(double pos)
{
    mux.lock();
    if (!ic)
    {
        mux.unlock();
        return false;
    }
    avformat_flush(ic);

    long long seekPos = 0;
    seekPos = ic->streams[videoStream]->duration * pos;
    int re = av_seek_frame(ic, videoStream, seekPos, AVSEEK_FLAG_BACKWARD | AVSEEK_FLAG_FRAME);
    mux.unlock();
    if (re < 0)
    {
        return false;
    }
    return true;
}


    


    Where ic and mux are defined as

    


    AVFormatContext* ic
std::mutex mux;


    


    When I'm trying to call the Seek function and print out the frame index, it will be something like :

    


    //Read() is called:
0 0 21 42 40 ...
//Then Seek(0.9) is called, should have begin with a later frame, but it also returns me:
0 0 21 42 40 ...


    


  • avcodec_open2 returns Invalid Argument (errnum -22)

    7 avril 2023, par nokla

    I am trying to encode a vector of AVFrames to an MP4 file using the h264 codec.

    


    Everything seems to work fine until the avcodec_open2 function, which returns an "Invalid Argument" (-22) error.

    


    *The stream parameter is a pointer to AVStream.

    


    Here is the code that sets the stream parameters :

    


        stream->codecpar->codec_id = AV_CODEC_ID_H264;
    stream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
    stream->codecpar->width = settings.resolution[0]; // 270
    stream->codecpar->height = settings.resolution[1]; // 480
    stream->codecpar->format = AV_PIX_FMT_YUV420P;
    stream->codecpar->bit_rate = 400000;
    AVRational framerate = { 1, 30};
    stream->time_base = av_inv_q(framerate);


    


    And here is the code that opens the codec context :

    


        // Open the codec context
    AVCodecContext* codec_ctx = avcodec_alloc_context3(codec);
    if (!codec_ctx) {
        std::cout << "Error allocating codec context" << std::endl;
        avformat_free_context(format_ctx);
        return;
    }

    ret = avcodec_parameters_to_context(codec_ctx, stream->codecpar);
    if (ret < 0) {
        std::cout << "Error setting codec context parameters: " << av_err2str(ret) << std::endl;
        avcodec_free_context(&codec_ctx);
        avformat_free_context(format_ctx);
        return;
    }

    ret = avcodec_open2(codec_ctx, codec, nullptr);
    if (ret < 0) {
        wxMessageBox("Error opening codec: ");
        wxMessageBox(av_err2str(ret));
        avcodec_free_context(&codec_ctx);
        avformat_free_context(format_ctx);
        return;
    }


    


    I tried the solution that @philipp suggested in ffmpeg-avcodec-open2-returns-invalid-argument but it didn't resolve my error.

    


    I don't know what's causing this error in my code, can someone please help me ?

    


  • vf_program_opencl : Add missing error code returns

    11 janvier 2018, par Mark Thompson
    vf_program_opencl : Add missing error code returns
    

    Fixes CID #1427285.

    • [DH] libavfilter/vf_program_opencl.c