Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (97)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (12618)

  • Amazon Elastic Transcoder vs FFMPEG [on hold]

    17 janvier 2015, par KiranD

    I’m developing a website (php based) and there is a provision to upload videos in different formats. I’m using HTML5 player for the front end presentation. So, as the ideal format that is supported by most of the browsers is mp4, I tried using ffmpeg and it works fine.

    I would like to know which transcoder (Amazon Elastic Transcoder or FFMPEG) would be best for handling conversions parallely when there is a huge traffic.

    There could me approximately thousands of users watching the videos and may be hundreds uploading the videos at the same time. I’m using Amazon EC2 for deployment and the traffic is mostly spiky (not flat).

    I’m not sure about the acceptable speed. But, I need the one which can transcode the videos much faster.

  • How to burn in subtitles onto a webm video with ffmpeg ?

    7 mai 2014, par IcanFLY

    I am trying to set up a livestream with ffserver and ffmpeg. The problem is I am using webm, and I need to burn in subtitles, which are located in a mkv. I am not quite sure how to do this, but here is my ffmpeg config (ffstream.sh) that I am using :

    #Livestream script for FFMpeg/FFServer
    FPS=24                                          # Stream FPS.
    GOP=48                                          # GOP Should be double of FPS.
    THREADS=4                                       # How many threads.
    DEADLINE=realtime                               # Speed preset, realtime is fastest.
    FRAMELAG=16                                     # How many frames to seek ahead (max 25)
    QMAX=52                                         # More = less quality.
    QMIN=10                                         # Less = more quality.
    VBITRATE=1M                                     # Target Bitrate.
    BITRATE=3000k                                   # Bitrate.
    AUDIBR=48k                                      # Audio Bitrate.
    SERVER=<myserver>:8090/feed.ffm                 # Server stream endpoint.
    LOGLEVEL=verbose                                # Logging verbosity level.

    for f in $@; do ffmpeg -re -i $f\
           -vf subtitles=$f\
           -g $GOP -loglevel $LOGLEVEL\
           -c:v:0 libvpx  -threads $THREADS -b:v $BITRATE -vb $VBITRATE -bufsize $BITRATE\
           -qmax $QMAX -qmin $QMIN -deadline $DEADLINE -lag-in-frames $FRAMELAG\
           -c:a libvorbis -b:a $AUDIBR\
           "http://$SERVER"
    done
    </myserver>

    Everything connects fine and I can get audio and video to play, however I cannot seem to get the subtitles to show up. Here is my output (I quit out of it) :

    Stream mapping:
     Stream #0:1 -> #0:0 (flac -> libvorbis)
     Stream #0:0 -> #0:1 (h264 -> libvpx)
    Press [q] to stop, [?] for help
    [output stream 0:0 @ 0x1e77dc0] 100 buffers queued in output stream 0:0, something may be wrong.
    frame=  232 fps= 23 q=0.0 Lsize=     816kB time=00:00:09.67 bitrate= 690.8kbits/s
    video:758kB audio:41kB subtitle:0kB other streams:0kB global headers:3kB muxing overhead: 2.113806%
    Input file #0 (<file>.mkv):
     Input stream #0:0 (video): 242 packets read (3343775 bytes); 242 frames decoded;
     Input stream #0:1 (audio): 118 packets read (391060 bytes); 118 frames decoded (483328 samples);
     Input stream #0:2 (audio): 8 packets read (20480 bytes);
     Input stream #0:3 (subtitle): 1 packets read (182 bytes);
     Input stream #0:4 (subtitle): 1 packets read (52 bytes);
     Input stream #0:5 (attachment): 0 packets read (0 bytes);
     Total: 370 packets (3755549 bytes) demuxed
    Output file #0 (http://<myserver>/feed.ffm):
     Output stream #0:0 (audio): 3233 frames encoded (206912 samples); 406 packets muxed (41937 bytes);
     Output stream #0:1 (video): 232 frames encoded; 232 packets muxed (776350 bytes);
     Total: 638 packets (818287 bytes) muxed
    Received signal 2: terminating.
    </myserver></file>

    Also here is my ffserver config, not sure if there is something in here stopping the subtitles from showing up :

    Port 8090
    BindAddress 0.0.0.0
    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 10000
    CustomLog -

    <feed>
       File /path/to/folder/tmp/feed.ffm
       FileMaxSize 100M
       #Allow localhost
       ACL allow 127.0.0.1
       ACL allow <myip>
       #It might be a good idea to add your stream source here.
    </myip></feed>


    <stream>
       Feed feed.ffm
       Format webm
       VideoSize hd720 #Must be set here, all input files will be scaled to fit.
       AVOptionVideo flags +global_header
       AVOptionAudio flags +global_header
       StartSendOnKey
    </stream>

    <stream>
       Format status
       ACL allow localhost
    </stream>

    # Redirect index.html to the appropriate site
    <redirect>
       URL http://<myserver>
    </myserver></redirect>

    Any help on how to do this, would be grateful.

  • WebM file not seekable in Chrome when loaded through PHP (other browsers work)

    13 avril 2014, par Zoon

    I am having a mind-boggling problem, I just can't seem to resolve.

    Providing a WebM file through PHP is nothing new in my world, and I even know how to work with HTTP 206 Partial Content. But for some reason Chrome does not like it.

    A simple HTML5 video playback

    <video width="640" height="360" poster="picture/preview/V00000006.jpg" controls="controls" preload="preload">
       <source type="video/webm" src="/video/V00000006.webm">
    </source></video>

    where /video/V00000006.webm is rewritten to a PHP-file in Apache, will playback just fine.
    But in Chrome the seekbar is not effective. When clicking on the seekbar the player will freeze and no longer playback until page is refreshed. Firefox handles it just fine !

    If I change /video/V00000006.webm to be a direct link to the same video it works just fine. I even compared the network requests between the two versions (with and without PHP) and there is barely any difference in the first request, but the second is failing in the PHP-delivered video.

    Initial request and seek request for Apache-delivered video file :

        Request URL :http://mytestserver.net/movie1152x720.webm
        Request Method:GET
        Status Code:206 Partial Content
        Request Headers
        Accept :*/*
        Accept-Encoding:identity ;q=1, * ;q=0
        Accept-Language:da-DK,da ;q=0.8,en-US ;q=0.6,en ;q=0.4
        Cache-Control:no-cache
        Connection:keep-alive
        Cookie:PHPSESSID=i562540rek172mnv3nk528acj0 ; userPassword= ; userEmail=
        Host:mytestserver.net
        Pragma:no-cache
        Range:bytes=0-
        Referer :http://mytestserver.net/video.html
        User-Agent:Mozilla/5.0 (X11 ; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36
        Response Headers
        Accept-Ranges:bytes
        Connection:close
        Content-Length:4446451
        Content-Range:bytes 0-4446450/4446451
        Content-Type:video/webm
        Date:Fri, 11 Apr 2014 13:07:30 GMT
        ETag :"d2d0027-43d8f3-b91417c0"
        Last-Modified:Fri, 11 Apr 2014 12:46:31 GMT
        Server:Apache/2.2.3 (CentOS)
    

    Request URL :http://mytestserver.net/movie1152x720.webm
    Request Method:GET
    Status Code:206 Partial Content
    Request Headers
    Accept :*/*
    Accept-Encoding:identity ;q=1, * ;q=0
    Accept-Language:da-DK,da ;q=0.8,en-US ;q=0.6,en ;q=0.4
    Cache-Control:no-cache
    Connection:keep-alive
    Cookie:PHPSESSID=i562540rek172mnv3nk528acj0 ; userPassword= ; userEmail=
    Host:mytestserver.net
    Pragma:no-cache
    Range:bytes=4445881-
    Referer :http://mytestserver.net/video.html
    User-Agent:Mozilla/5.0 (X11 ; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36
    Response Headers
    Accept-Ranges:bytes
    Connection:close
    Content-Length:570
    Content-Range:bytes 4445881-4446450/4446451
    Content-Type:video/webm
    Date:Fri, 11 Apr 2014 13:09:02 GMT
    ETag :"d2d0027-43d8f3-b91417c0"
    Last-Modified:Fri, 11 Apr 2014 12:46:31 GMT
    Server:Apache/2.2.3 (CentOS)

    Initial request and seek request for PHP-streamed video :

        Request URL :http://mytestserver.net/video/V00000006.webm
        Request Method:GET
        Status Code:206 Partial Content
        Request Headers
        Accept :*/*
        Accept-Encoding:identity ;q=1, * ;q=0
        Accept-Language:da-DK,da ;q=0.8,en-US ;q=0.6,en ;q=0.4
        Cache-Control:no-cache
        Connection:keep-alive
        Cookie:PHPSESSID=i562540rek172mnv3nk528acj0 ; userPassword= ; userEmail=
        Host:mytestserver.net
        Pragma:no-cache
        Range:bytes=0-
        Referer :http://mytestserver.net/video.html
        User-Agent:Mozilla/5.0 (X11 ; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36
        Response Headers
        Accept-Ranges:bytes
        Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
        Connection:close
        Content-Length:8566268
        Content-Range:bytes 0-8566267/8566268
        Content-Type:video/webm
        Date:Fri, 11 Apr 2014 13:31:27 GMT
        Expires:Thu, 19 Nov 1981 08:52:00 GMT
        Pragma:no-cache
        Server:Apache/2.2.3 (CentOS)
        X-Powered-By:PHP/5.3.27
    

    Request URL :http://mytestserver.net/video/V00000006.webm
    Request Headers CAUTION : Provisional headers are shown.
    Accept-Encoding:identity ;q=1, * ;q=0
    Cache-Control:no-cache
    Pragma:no-cache
    Range:bytes=4338314-
    Referer :http://mytestserver.net/video.html
    User-Agent:Mozilla/5.0 (X11 ; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36

    Notice how the second request does not complete, Provisional headers are shown.

    I have tried altering the cache headers, setting it to the future, setting them blank and using file attachment headers.

    I tried fiddling around a lot with the serving code, but lately I have ended up with a simple example.

    &lt;?php

    $path = &#39;test.webm&#39;;

    $size=filesize($path);

    $fm=@fopen($path,&#39;rb&#39;);
    if(!$fm) {
     header ("HTTP/1.0 404 Not Found");
     die();
    }

    $begin=0;
    $end = $size-1;

    if(isset($_SERVER[&#39;HTTP_RANGE&#39;])) {
     if(preg_match(&#39;/bytes=\h*(\d+)-(\d*)[\D.*]?/i&#39;, $_SERVER[&#39;HTTP_RANGE&#39;], $matches)) {
       $begin=intval($matches[0]);
       if(!empty($matches[1])) {
         $end=intval($matches[1]);
       }
     }
    }

    if($begin>0||$end&lt;$size)
     header(&#39;HTTP/1.0 206 Partial Content&#39;);
    else
     header(&#39;HTTP/1.0 200 OK&#39;);

    header("Content-Type: video/webm");
    header(&#39;Accept-Ranges: bytes&#39;);
    header(&#39;Content-Length:&#39;.($end-$begin+1));
    header("Content-Disposition: inline;");
    header("Content-Range: bytes $begin-$end/$size");
    header("Content-Transfer-Encoding: binary\n");
    header(&#39;Connection: close&#39;);

    ob_get_clean();
    flush();

    $f = fopen($path, &#39;r&#39;);
    fseek($f, $offset);

    $pos = 0;
    $length = $end-$begin;

    while($pos &lt; $length)
    {
       $chunk = min($length-$pos, 1024);

       echo fread($f, $chunk);
       flush();

       $pos += $chunk;
    }
    ?>

    Please note, entering the PHP-delivered video URL directly into the browser does not make a difference from showing it in a HTML page.

    I hope someone has an answer to why seeking might not work. Let me know if you have any suggestions.

    Thanks !