Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (26)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

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

Sur d’autres sites (3622)

  • Why my ffmpeg video encode codes does not work on other computer ?

    10 avril 2022, par Object Unknown

    I'm writing code to encode some cv::Mat images to a MP4 video. The program can run successfully in my computer which I developed it, but when I copied it (and all dlls it needs) to an other computer, it stopped work.

    


    The function which reporting error : (I got it from StackOverflow, and added some changes)

    


    int uns::VideoWriter::Remux()
{
    AVFormatContext* ifmt_ctx = NULL, * ofmt_ctx = NULL;
    int err = 0, ret = 0;
    int64_t ts = 0;
    AVStream* inVideoStream = NULL;
    AVStream* outVideoStream = NULL;
    if ((err = avformat_open_input(&ifmt_ctx, VIDEO_TMP_FILE.c_str(), 0, 0)) < 0)
    {
        if(callback != nullptr) 
            callback("[uns::VideoWriter/Remux] Failed to open input file for remuxing", err);
        ret = -1;
        goto end;
    }
    if ((err = avformat_find_stream_info(ifmt_ctx, 0)) < 0) 
    {
        if(callback != nullptr) 
            callback("[uns::VideoWriter/Remux] Failed to retrieve input stream information", err);
        ret = -2;
        goto end;
    }
    if ((err = avformat_alloc_output_context2(&ofmt_ctx, NULL, NULL, FINAL_FILE_NAME.c_str())))
    {
        if(callback != nullptr) 
            callback("[uns::VideoWriter/Remux] Failed to allocate output context", err);
        ret = -3;
        goto end;
    }
    inVideoStream = ifmt_ctx->streams[0];
    outVideoStream = avformat_new_stream(ofmt_ctx, NULL);
    if (!outVideoStream) 
    {
        if(callback != nullptr) 
            callback("[uns::VideoWriter/Remux] Failed to allocate output video stream", 0);
        ret = -4;
        goto end;
    }
    outVideoStream->time_base = { 1, fps };
    if ((err = avcodec_parameters_copy(outVideoStream->codecpar, inVideoStream->codecpar)) < 0)
    {
        if (callback != nullptr)
            callback("[uns::VideoWriter/Remux] Failed to copy stream information", err);
        return -4;
        goto end;
    }
    outVideoStream->codecpar->codec_tag = 0;
    if (!(ofmt_ctx->oformat->flags & AVFMT_NOFILE)) 
    {
        if ((err = avio_open(&ofmt_ctx->pb, FINAL_FILE_NAME.c_str(), AVIO_FLAG_WRITE)) < 0)
        {
            if(callback != nullptr) 
                callback("[uns::VideoWriter/Remux] Failed to open output file", err);
            ret = -5;
            goto end;
        }
    }
    ofmt_ctx->streams[0]->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
    ofmt_ctx->streams[0]->time_base.num = 1;
    ofmt_ctx->streams[0]->time_base.den = fps;
    if ((err = avformat_write_header(ofmt_ctx, 0)) < 0) 
    {
        if(callback != nullptr) 
            callback("[uns::VideoWriter/Remux] Failed to write header to output file", err);
        ret = -6;
        goto end;
    }
    AVPacket videoPkt;
    while (true) 
    {
        if ((err = av_read_frame(ifmt_ctx, &videoPkt)) < 0) 
        {
            break;
        }
        videoPkt.stream_index = outVideoStream->index;
        videoPkt.pts = ts;
        videoPkt.dts = ts;
        videoPkt.duration = av_rescale_q(videoPkt.duration, inVideoStream->time_base, outVideoStream->time_base);
        ts += videoPkt.duration;
        videoPkt.pos = -1;
        if ((err = av_interleaved_write_frame(ofmt_ctx, &videoPkt)) < 0) 
        {
            if(callback != nullptr) 
                callback("[uns::VideoWriter/Remux] Failed to mux packet", err);
            av_packet_unref(&videoPkt);
            break;
        }
        av_packet_unref(&videoPkt);
    }
    av_write_trailer(ofmt_ctx);
end:
    if (ifmt_ctx) 
    {
        avformat_close_input(&ifmt_ctx);
    }
    if (ofmt_ctx && !(ofmt_ctx->oformat->flags & AVFMT_NOFILE)) 
    {
        avio_closep(&ofmt_ctx->pb);
    }
    if (ofmt_ctx) 
    {
        avformat_free_context(ofmt_ctx);
    }
    return ret;
}


    


    Notes :

    


    


    callback is a function which prints error messsage and error code.

    
The error I recived is [uns::VideoWriter/Remux] Failed to write header to output file, error code: -22

    


    


    I want to know what is causing this and how to resolve it please.

    


    Other Informations :

    


    


    Developing Env :

    


    


    OS : Windows 11 Professional Workstation build 22593.ni_release
    
IDE : Visual Studio 2022
    
ffmpeg : 4.4.1
    
Installed ffmpeg library :
ffmpeg[avcodec],ffmpeg[avdevice],ffmpeg[avfilter],ffmpeg[avfilter],ffmpeg[avformat],ffmpeg[openh264],ffmpeg[swresample],ffmpeg[swscale]
    
Compile Settings : x64 Release

    


    


    


    


    Running Env which causing error :

    


    


    OS : Windows Server 2019 DataCenter
    
With all dlls VS2022 copied to release folder

    


    


    


  • Revision 30966 : eviter le moche ’doctype_ecrire’ lors de l’upgrade

    17 août 2009, par fil@… — Log

    eviter le moche ’doctype_ecrire’ lors de l’upgrade

  • Revision 37300 : On documente cet inclure On lui ajoute une option et on corrige certaines ...

    15 avril 2010, par kent1@… — Log

    On documente cet inclure
    On lui ajoute une option et on corrige certaines erreurs