Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (109)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (13082)

  • Evolution #4445 (Nouveau) : Permettre de savoir si espace privé depuis tous les JS

    22 février 2020, par RastaPopoulos ♥

    En JS, il semble que SPIP ne fournisse rien pour savoir si on est dans l’admin ou pas. Or c’est indispensable au moins pour certains appels d’URL, savoir si on doit avoir ../ avant ou pas (par ex pour les API mais pas que).

    Le plugin Sélecteur générique fait ça en ajoutant depuis PHP une globale JS selecteur_test_espace_prive booléenne. Mais c’est pourri que chaque plugin doive faire ça. C’est SPIP qui devrait le fournir, comme test_espace_prive() en PHP quoi.

    Du coup soit faut fournir une globale du même style, mais en plus propre SPIP fournit déjà une classe "jquery.spip", du coup ça devrait être un attribut ou une méthode de cette classe.

    Par contre pour la place, à priori c’est pas dans ajaxCallback, puisque pour le faire solidement, c’est sûrement mieux que ce soit en utilisant la fonction PHP. Donc il faudrait que SPIP ajoute ça après le chargement de ajaxCallback, et qu’en PHP, ça rajoute un mini morceau de JS pour compléter jquery.spip avec un attribut qui dit où on est.

    Après dans n’importe quel JS de plugin, on ferait facilement if ($.spip.test_espace_prive()) { …

  • Ffmpeg examples run in debug mode [on hold]

    25 août 2017, par Saeid Zangeneh

    I’m not so professional in c and cpp. I want to run FFmpeg official examples but there are many errors on include files. I can’t solve them.

    below output :when i try to run or debug the sample code

    debug output :

    cd '/home/saeid/NetBeansProjects/CppApplication_2'
    /usr/bin/make -f Makefile CONF=Debug
    "/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-  conf
    make[1]: Entering directory '/home/saeid/NetBeansProjects
    /CppApplication_2'

    "/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-
    Linux/cppapplication_2

    make[2]: Entering directory '/home/saeid/NetBeansProjects
    /CppApplication_2'

    mkdir -p dist/Debug/GNU-Linux

    gcc     -o dist/Debug/GNU-Linux/cppapplication_2 build/Debug/GNU-
    Linux/sample.o

    build/Debug/GNU-Linux/sample.o: In function `select_channel_layout':

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:87: undefined
    reference to `av_get_channel_layout_nb_channels'

    build/Debug/GNU-Linux/sample.o: In function `audio_encode_example':

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:112: undefined
    reference to `avcodec_find_encoder'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:117: undefined
    reference to `avcodec_alloc_context3'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:127: undefined
    reference to `av_get_sample_fmt_name'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:134: undefined
    reference to `av_get_channel_layout_nb_channels'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:136: undefined
    reference to `avcodec_open2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:146: undefined
    reference to `av_frame_alloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:156: undefined
    reference to `av_samples_get_buffer_size'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:162: undefined
    reference to `av_malloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:169: undefined
    reference to `avcodec_fill_audio_frame'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:179: undefined
    reference to `av_init_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:183: undefined
    reference to `sin'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:189: undefined
    reference to `avcodec_encode_audio2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:196: undefined
    reference to `av_free_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:201: undefined
    reference to `avcodec_encode_audio2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:208: undefined
    reference to `av_free_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:212: undefined
    reference to `av_freep'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:213: undefined
    reference to `av_frame_free'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:214: undefined
    reference to `avcodec_close'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:215: undefined
    reference to `av_free'

    build/Debug/GNU-Linux/sample.o: In function `audio_decode_example':

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:229: undefined
    reference to `av_init_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:232: undefined
    reference to `avcodec_find_decoder'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:237: undefined
    reference to `avcodec_alloc_context3'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:243: undefined
    reference to `avcodec_open2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:254: undefined
    reference to `av_free'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:264: undefined
    reference to `av_frame_alloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:269: undefined
    reference to `avcodec_decode_audio4'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:276: undefined
    reference to `av_get_bytes_per_sample'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:305: undefined reference to `avcodec_close'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:306: undefined reference to `av_free'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:307: undefined reference to `av_frame_free'

    build/Debug/GNU-Linux/sample.o : In function `video_encode_example’ :

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:323: undefined reference to `avcodec_find_encoder'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:328: undefined reference to `avcodec_alloc_context3'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:350: undefined reference to `av_opt_set'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:352: undefined reference to `avcodec_open2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:361: undefined reference to `av_frame_alloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:371: undefined reference to `av_image_alloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:379: undefined reference to `av_init_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:399: undefined reference to `avcodec_encode_video2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:407: undefined reference to `av_free_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:413: undefined reference to `avcodec_encode_video2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:421: undefined reference to `av_free_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:427: undefined reference to `avcodec_close'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:428: undefined reference to `av_free'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:429: undefined reference to `av_freep'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:430: undefined reference to `av_frame_free'

    build/Debug/GNU-Linux/sample.o: In function `decode_write_frame':

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:452: undefined reference to `avcodec_decode_video2'

    build/Debug/GNU-Linux/sample.o : In function `video_decode_example’ :

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:481: undefined reference to `av_init_packet'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:486: undefined reference to `avcodec_find_decoder'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:491: undefined reference to `avcodec_alloc_context3'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:502: undefined reference to `avcodec_open2'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:511: undefined reference to `av_frame_alloc'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:545: undefined reference to `avcodec_close'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:546: undefined reference to `av_free'

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:547: undefined reference to `av_frame_free'

    build/Debug/GNU-Linux/sample.o: In function `main':

    /home/saeid/NetBeansProjects/CppApplication_2/sample.c:556: undefined
    reference to `avcodec_register_all'

    collect2: error: ld returned 1 exit status

    nbproject/Makefile-Debug.mk:62: recipe for target 'dist/Debug/GNU-
    Linux/cppapplication_2' failed

    make[2]: *** [dist/Debug/GNU-Linux/cppapplication_2] Error 1

    make[2]: Leaving directory '/home/saeid/NetBeansProjects/CppApplication_2'

    nbproject/Makefile-Debug.mk:59: recipe for target '.build-conf' failed

    make[1]: *** [.build-conf] Error 2

    make[1]: Leaving directory '/home/saeid/NetBeansProjects/CppApplication_2'

    nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

    make: *** [.build-impl] Error 2
  • 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