Recherche avancée

Médias (91)

Autres articles (81)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (11947)

  • How to play FFMPEG sound sample with OpenAL ?

    22 mars 2016, par Asim

    I am using FFMPEG to load Audio Video from File. It works with video, but I don’t know how to play audio samples.

    Here is my code to get audio samples :

    m_AdotimeBase = (int64_t(m_Adocdec_ctx->time_base.num) * AV_TIME_BASE) / int64_t(m_Adocdec_ctx->time_base.den);  
    if(!m_Adofmt_ctx)
    {
       //AfxMessageBox(L"m_timeBase");
       return FALSE ;
    }
    int64_t seekAdoTarget = int64_t(m_currFrame) * m_AdotimeBase;  


    if(av_seek_frame(m_Adofmt_ctx, -1, seekAdoTarget, AVSEEK_FLAG_ANY) < 0)
    {
       /*CString st;
       st.Format(L"%d",m_currFrame);
       AfxMessageBox(L"av_seek_frame "+st);*/
       m_currFrame = m_totalFrames-1;
       return FALSE ;
    }

    if ((ret = av_read_frame(m_Adofmt_ctx, &packet)) < 0)
           return FALSE;
    if (packet.stream_index == 0)      
    {
       ret = avcodec_decode_audio4(m_Adocdec_ctx, &in_AdeoFrame, &got_frame, &packet);
       if (ret < 0)
       {
           av_free_packet(&packet);
           return FALSE;
       }
    }

    My problem is I want to listen that sample using OPENAL.

    I would appreciate any tutorials or references on the subject.

  • MP4 file delays to play on browser (ffmpeg with movflags)

    3 septembre 2021, par Mak

    We are trying to make FFMPEG to run with the "-movflags frag_keyframe+empty_moov" option. We do this because we don't have the input video file on a persistent disk, since we use serverless, and original video files are like 40GB+ (so we are basically streaming the video in fragments to ffmpeg and outputting the mp4 also in fragments).

    


    The problem is, when we transcode files to mp4, the resulting mp4 files delays to start playing on browsers, it takes like 5 seconds on Chrome. (example mp4 file)

    


    So we need to fix this so the mp4 files would play faster on the browser. (like a normal mp4).

    


    ffmpeg output log

    


    ffmpeg -i [SIGNED_URL] -filter_complex "[0]scale=-1:360[s0]" -map "[s0]" -f mp4 -ac 1 -ar 44100 -b:a 128k -b:v 1M -bufsize 1M -c:a aac -c:v libx264 -maxrate 1M -movflags +faststart+frag_keyframe+empty_moov+default_base_moof -


    


  • Why won't this encrypted HLS video play on iOS (but works on Windows Chrome via hls.js library) ?

    8 mai 2023, par Ryan

    I am trying to play an MP4 test video.

    


    My /home/vagrant/Code/example/public/hls_hls.keyInfo is :

    


    https://example.com/hls.key
/home/vagrant/Code/example/public/hls_hls.key
467216aae8a26fb699080812628031955e304a66e9e4480f9b70d31d8fe94e9a


    


    My /home/vagrant/Code/example/public/hls_hls.key was generated using PHP : hex2bin('467216aae8a26fb699080812628031955e304a66e9e4480f9b70d31d8fe94e9a')

    


    The ffmpeg command for encrypting the video as HLS playlist with "ts" files :

    


    '/usr/bin/ffmpeg' '-y' '-i' 'storage/app/sample_media2/2020-02-27/Sample_Videos_5.mp4' 
'-c:v' 'libx264' '-s:v' '1920x1080' '-crf' '20' '-sc_threshold' '0' '-g' '48' 
'-keyint_min' '48' '-hls_list_size' '0' 
'-hls_time' '10' '-hls_allow_cache' '0' '-b:v' '4889k' '-maxrate' '5866k' 
'-hls_segment_type' 'mpegts' '-hls_fmp4_init_filename' 'output_init.mp4' 
'-hls_segment_filename' 'storage/app/public/test/output_1080p_%04d.ts' 
'-hls_key_info_file' '/home/vagrant/Code/example/public/hls_hls.keyInfo' 
'-strict' '-2' '-threads' '12' 'storage/app/public/test/output_1080p.m3u8'


    


    Then, I know from https://caniuse.com/#search=hls that Windows Chrome won't be able to play the HLS video without a library, so I use https://github.com/video-dev/hls.js/, and Windows Chrome successfully plays the encrypted video !

    


    However, iOS Safari is unable to play it (with or without the hls.js library).

    


    On iOS Safari, when I try to play the video, I see just a quick glimpse (less than a second) where the screen shows 0:15, so it must be reading and decrypting enough to know the correct duration of the video.

    


    So, to debug, I log events :

    


    const nativeHlsEvents = ['play', 'playing', 'abort', 'error', 'canplaythrough', 'waiting', 'loadeddata', 'loadstart', 'progress', 'timeupdate', 'volumechange'];
$.each(nativeHlsEvents, function (i, eventType) {
    video.addEventListener(eventType, (event) => {//https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement
        console.log(eventType, event);
        if (eventType === 'error') {
            console.error(video.error);//https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/error
        }
    });
});


    


    I see in the console log :

    


    loadstart, {"isTrusted":true}
progress, {"isTrusted":true}
play, {"isTrusted":true}
waiting, {"isTrusted":true}
error, {"isTrusted":true}
video.error, {}


    


    I don't know how to find more details about the error.

    


    Note that even though Windows Chrome successfully plays the video, it too shows warnings in the console log :

    


    {"type":"mediaError","details":"fragParsingError","fatal":false,"reason":"TS packet did not start with 0x47","frag":{"...
{"type":"mediaError","details":"fragParsingError","fatal":false,"reason":"no audio/video samples found","frag":{...


    


    Where is my problem ?