Recherche avancée

Médias (1)

Mot : - Tags -/stallman

Autres articles (39)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (7090)

  • Anomalie #4360 (Nouveau) : Message d’erreur au début de l’installation d’un site web SPIP par spip...

    13 juillet 2019, par Vincent ROBERT

    Sur Xampp avec Apache 2.4.39 (Win64) & PHP 7.2.19
    En initiant une nouvelle installation avec spiploader, j’ai le message d’erreur suivant :

    "Warning : Use of undefined constant _DIR_TMP - assumed ’_DIR_TMP’ (this will throw an Error in a future version of PHP) in C :\xampp\htdocs\news-test\pclzip.php on line 28"

    Ce message apparaît juste avant le début de l’installation, sur la page "Téléchargement de SPIP - !Le programme va télécharger les fichiers de SPIP à l’intérieur de ce répertoire."

  • 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 !

  • Truncated videos in multi input multi output ffmpeg command

    1er août 2019, par Bhupendra Fatnani

    I am trying to copy videos from a CCTV DVR server (6 channels) using rtsp. How do I optimize my ffmpeg command ?

    Below is the configuration :

    ffmpeg version : ffmpeg-4.1.4-win64-static
    CPU : Intel Core i7-8650U @1.9 GHz 2.11 GHz
    RAM : 16 GB

    When I try to download from 3 channels, the videos seem to download fine, but when I use >=4 channels simultaneously, the video from channel 1 truncates almost after about 5 secs, and the output files are much smaller from channel 2 to 4, channel 5 video output has no issues.

    For e.g. here are the output file sizes according to channels.

    Channel 1 : 1.7 MB (truncated)
    Channel 2 : 27.5 MB (approx 5 secs video loss in the beginning)
    Channel 3 : 28.5 MB (approx 3-4 secs loss)
    channel 4 : 29.5 MB (approx 2 secs loss)
    Channel 5 : 30 MB (no issues found)

    Below is the command I am trying to use to download.

    ffmpeg -rtsp_transport tcp -thread_queue_size 1024 -i rtsp://<input url="url" 1="1" /> -thread_queue_size 1024 -i rtsp://<input url="url" 2="2" /> -thread_queue_size 1024 -i rtsp://<input url="url" 3="3" /> -thread_queue_size 1024 -i rtsp://<input url="url" 4="4" /> -thread_queue_size 1024 -i rtsp://<input url="url" 5="5" /> -map 0 -vcodec copy -t 60 -y outputfile1.mp4 -map 1 -vcodec copy -t 60 -y outputfile2.mp4 -map 2 -vcodec copy -t 60 -y outputfile3.mp4 -map 3 -vcodec copy -t 60 -y outputfile4.mp4 -map 4 -vcodec copy -t 60 -y outputfile5.mp4

    Below is the actual output :

    ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9.1.1 (GCC) 20190716
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    Input #0, rtsp, from 'rtsp://<input url="url" title="title" n="n" />A, start: 0.080000, bitrate: N/A
       Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
    [udp @ 000001f27c6fffc0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
    [udp @ 000001f27c74f400] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
    [rtsp @ 000001f27c721f40] max delay reached. need to consume packet
    [rtsp @ 000001f27c721f40] RTP: missed 15 packets
    [h264 @ 000001f27d627ac0] error while decoding MB 71 49, bytestream -6
    [h264 @ 000001f27d627ac0] concealing 2258 DC, 2258 AC, 2258 MV errors in P frame
    [h264 @ 000001f27d627ac0] Increasing reorder buffer to 1
    Input #1, rtsp, from 'rtsp://<input url="url" title="title" n="n" />A, start: 0.040000, bitrate: N/A
       Stream #1:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
    [udp @ 000001f27c6ffc40] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
    [udp @ 000001f27d2dc180] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
    [rtsp @ 000001f27d2db700] max delay reached. need to consume packet
    [rtsp @ 000001f27d2db700] RTP: missed 15 packets
    [h264 @ 000001f27d2dbd00] concealing 7337 DC, 7337 AC, 7337 MV errors in P frame
    [h264 @ 000001f27d2dbd00] Increasing reorder buffer to 1
    Input #2, rtsp, from '<input url="url" title="title" n="n" />A, start: 0.080000, bitrate: N/A
       Stream #2:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
    [udp @ 000001f27c6ffd00] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
    [udp @ 000001f27d302bc0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
    [rtsp @ 000001f27cfe9200] max delay reached. need to consume packet
    [rtsp @ 000001f27cfe9200] RTP: missed 44 packets
    [h264 @ 000001f27cfe6c40] error while decoding MB 41 24, bytestream -8
    [h264 @ 000001f27cfe6c40] concealing 5288 DC, 5288 AC, 5288 MV errors in P frame
    [h264 @ 000001f27cfe6c40] Increasing reorder buffer to 1
    Input #3, rtsp, from '<input url="url" title="title" n="n" />A, start: 0.080000, bitrate: N/A
       Stream #3:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
    [udp @ 000001f27cfe0940] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
    [udp @ 000001f27dd1bec0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
    [rtsp @ 000001f27daaf040] max delay reached. need to consume packet
    [rtsp @ 000001f27daaf040] RTP: missed 107 packets
    [h264 @ 000001f27dc05040] concealing 1340 DC, 1340 AC, 1340 MV errors in P frame
    [rtsp @ 000001f27daaf040] max delay reached. need to consume packet
    [rtsp @ 000001f27daaf040] RTP: missed 28 packets
    [h264 @ 000001f27dc05040] Increasing reorder buffer to 1
    [h264 @ 000001f27dc05040] concealing 6961 DC, 6961 AC, 6961 MV errors in P frame
    [rtsp @ 000001f27daaf040] max delay reached. need to consume packet
    [rtsp @ 000001f27daaf040] RTP: missed 53 packets
    [h264 @ 000001f27dc05040] error while decoding MB 16 40, bytestream -18
    [h264 @ 000001f27dc05040] concealing 3393 DC, 3393 AC, 3393 MV errors in I frame
    Input #4, rtsp, from 'rtsp://<input url="url" title="title" n="n" />A, start: 0.120000, bitrate: N/A
       Stream #4:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
    Output #0, mp4, to 'outputfile1.mp4':
     Metadata:
       title           : -
       encoder         : Lavf58.20.100
       Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
    Output #1, mp4, to 'outputfile2.mp4':
     Metadata:
       title           : -
       encoder         : Lavf58.20.100
       Stream #1:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
    Output #2, mp4, to 'outputfile3.mp4':
     Metadata:
       title           : -
       encoder         : Lavf58.20.100
       Stream #2:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
    Output #3, mp4, to 'outputfile4.mp4':
     Metadata:
       title           : -
       encoder         : Lavf58.20.100
       Stream #3:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
    Output #4, mp4, to 'outputfile5.mp4':
     Metadata:
       title           : -
       encoder         : Lavf58.20.100
       Stream #4:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #1:0 -> #1:0 (copy)
     Stream #2:0 -> #2:0 (copy)
     Stream #3:0 -> #3:0 (copy)
     Stream #4:0 -> #4:0 (copy)
    Press [q] to stop, [?] for help
    [mp4 @ 000001f27dd0d8c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [mp4 @ 000001f27dd09040] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [mp4 @ 000001f27dd09040] pts has no value
    [mp4 @ 000001f27dc054c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [mp4 @ 000001f27dc054c0] pts has no value
    [mp4 @ 000001f27ddf86c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [mp4 @ 000001f27ddf86c0] pts has no value
    [mp4 @ 000001f27c743b00] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [mp4 @ 000001f27c743b00] pts has no value
    [mp4 @ 000001f27dd0d8c0] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
    [mp4 @ 000001f27dd09040] Non-monotonous DTS in output stream 1:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
    [mp4 @ 000001f27dc054c0] Non-monotonous DTS in output stream 2:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
    [mp4 @ 000001f27ddf86c0] Non-monotonous DTS in output stream 3:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
    [mp4 @ 000001f27c743b00] Non-monotonous DTS in output stream 4:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
    [mp4 @ 000001f27dd09040] Non-monotonous DTS in output stream 1:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
    [mp4 @ 000001f27dc054c0] Non-monotonous DTS in output stream 2:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
    [mp4 @ 000001f27ddf86c0] Non-monotonous DTS in output stream 3:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
    [mp4 @ 000001f27c743b00] Non-monotonous DTS in output stream 4:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
    [rtsp @ 000001f27d2db700] max delay reached. need to consume packet
    [rtsp @ 000001f27d2db700] RTP: missed 1644 packets
    [rtsp @ 000001f27c721f40] max delay reached. need to consume packet
    [rtsp @ 000001f27c721f40] RTP: missed 2461 packets
    [rtsp @ 000001f27cfe9200] max delay reached. need to consume packet
    [rtsp @ 000001f27cfe9200] RTP: missed 733 packets
    frame=   46 fps=0.8 q=-1.0 Lq=-1.0 q=-1.0 q=-1.0 q=-1.0 size=    1790kB time=00:00:59.99 bitrate= 244.4kbits/s speed=1.04x
    video:119011kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

    Could somebody please help me optimize the ffmpeg command ?