Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (97)

  • 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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

Sur d’autres sites (6412)

  • List of Capture devices libav FFmpeg

    28 juin 2016, par esprittn

    Could anyone please, tell me how can I obtain a list of devices using libav like when I execute this ffmpeg command line

    ffmpeg -list_devices true -f dshow -i dummy

    Thanks for you great job and for your help

  • Memcached protocol support

    15 novembre 2013, par Mikko Koppanen — Imagick

    For the past few days I’ve been adding Memcached binary protocol support to PECL memcached extension. The protocol handler provides a high-level abstraction for acting as a memcached server. There are quite a few things still missing and only binary protocol is supported at the moment, but the code seems to work reasonably well in small-scale testing.

    I am not sure whether this is useful for anyone, but at least it allows things such as quick prototyping of network servers, exposing sqlite database over memcached protocol etc.

    The code is quite simple and implementing a simple server responding to get and set would look roughly like the following :

    1. < ?php
    2. // Create new server instance
    3. $server = new MemcachedServer() ;
    4.  
    5. // Create a simple storage class
    6. class Storage {
    7.   private $values = array () ;
    8.   
    9.   public function set ($key, $value, $expiration) {
    10.     $this->values [$key] = array (’value’ => $value,
    11.                    ’expires’ => time () + $expiration) ;
    12.   }
    13.  
    14.   public function get ($key) {
    15.     if (isset ($this->values [$key])) {
    16.       if ($this->values [$key] [’expires’] < time ()) {
    17.         unset ($this->values [$key]) ;
    18.         return null ;
    19.       }
    20.       return $this->values [$key] [’value’] ;
    21.     }
    22.     else
    23.       return null ;
    24.   }
    25. }
    26.  
    27. $storage = new Storage () ;
    28.  
    29. // Set callback for get command
    30. $server->on (Memcached: :ON_GET,
    31.        function ($client_id, $key, &$value, &$flags, &$cas) use ($storage) {
    32.          echo "Getting key=[$key]" . PHP_EOL ;
    33.          if (($value = $storage->get ($key))  != null)
    34.            return Memcached: :RESPONSE_SUCCESS ;
    35.  
    36.          return Memcached: :RESPONSE_KEY_ENOENT ;
    37.        }) ;
    38.  
    39. // Set callback for set command
    40. $server->on (Memcached: :ON_SET,
    41.        function ($client_id, $key, $value, $flags, $expiration, $cas, &$result_cas) use ($storage) {
    42.          echo "Setting key=[$key] value=[$value]" . PHP_EOL ;
    43.          $storage->set ($key, $value, $expiration) ;
    44.          return Memcached: :RESPONSE_SUCCESS ;
    45.        }) ;
    46.  
    47. // Run the server on localhost, port 3434. Will block
    48. $server->run ("127.0.0.1:3434") ;
    49.  ?>

    And the client that communicates with the server :

    1. < ?php
    2.  
    3. $cache = new Memcached() ;
    4. $cache->setOption(Memcached: :OPT_BINARY_PROTOCOL, true) ;
    5. $cache->setOption(Memcached: :OPT_COMPRESSION, false) ;
    6. $cache->addServer(’localhost’, 3434) ;
    7.  
    8. $cache->set (’set_key1’, ’This is the first key’, 10) ;
    9. var_dump ($cache->get (’set_key1’)) ;
    10.  
    11. $cache->set (’set_key2’, ’This is the second key’, 2) ;
    12. var_dump ($cache->get (’set_key2’)) ;
    13.  ?>

    The code is still work in progress but it’s available in github : https://github.com/mkoppanen/php-memcached/tree/feature-server. Note that you need to compile libmemcached with –enable-libmemcachedprotocol and the PECL memcached extension with –enable-memcached-protocol.

  • Unable to transcode video using ffmpeg transcoder

    28 octobre 2014, par user1843970

    This question may be asked in different forums but still answer is not discovered yet.

    I am trying to play *.flv using Video Module and FFMPEG Converter.
    Whenever I upload any flv Video , I get the following message :-

    PHPVideoToolkit error : Execute error. It was not possible to encode "C :\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_3.flv" as FFmpeg returned an error. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height".

    Installed Modules are :-

    Video - 7.x-2.9

    Video.js - 7.x-2.3 - Version : 4.0.3

    Video transcoder : FFmpeg / avconv : git : c2dd5a1

    JW Player

    All above are installed correctly.

    Configuration of Video Module :-

    Inside Player Tab of Video(admin/config/media/video/players), following has been configured :-

    enter image description here

    A New FLV Preset has been created and added under Preset Tab of Video(admin/config/media/video/presets). Details are as Follows :-

    Preset name :- FLV Preset

    Video output extension :- FLV Flash Video

    Video codec :- H 263/H263-1996,H263+/H0-º1998/H263 Version 2(Not sure about Video Codec)

    FFmpeg video preset :- None

    Video quality :-None

    Video speed :- None

    Dimensions :- 640 X 360

    Aspect mode :- Preserve Aspect Ratio

    When I am uploading the video from content type then it extract the thumbnail as follows :-

    enter image description here

    After saving the video it shows the following Mesage :-

    enter image description here

    My gut feeling is that I am setting up wrong preset but I am not able to solve this problem out. Please help me as I am very close to my completion of project which would have been waste without solving the problem.

    Updated :-

    The Console message is as follows :-

    Reported errors

    PHPVideoToolkit error : Execute error. It was not possible to encode "C :\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_19.flv" as FFmpeg returned an error. Note, however the error was encountered on the second pass of the encoding process and the first pass appear to go fine. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height".

    Executed commands and output

    /ffmpeg/ffmpeg.exe -i "C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv" -strict experimental -vcodec "h264" -s "320x180" -acodec "aac" -ac "2" -pass "1" -passlogfile "C:\xampp\tmp/1384191046-5281144682cfc-multipass"  -y C:\xampp\tmp/1384191046-5281144681e51.flv

    ffmpeg version N-49610-gc2dd5a1 Copyright (c) 2000-2013 the FFmpeg developers
     built on Feb  5 2013 13:26:02 with gcc 4.7.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
     libavutil      52. 17.101 / 52. 17.101
     libavcodec     54. 91.100 / 54. 91.100
     libavformat    54. 61.104 / 54. 61.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 35.101 /  3. 35.101
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    [flv @ 00000000002fb860] max_analyze_duration 5000000 reached at 5018000 microseconds
    Input #0, flv, from 'C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv':
     Metadata:
       audiodelay      : 0
       canSeekToEnd    : true
     Duration: 00:00:06.00, start: 0.000000, bitrate: 118 kb/s
       Stream #0:0: Video: vp6f, yuv420p, 360x288, 409 kb/s, 1k tbr, 1k tbn, 1k tbc
       Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 96 kb/s
    [libx264 @ 0000000002457340] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
    [libx264 @ 0000000002457340] profile Main, level 4.0
    [libx264 @ 0000000002457340] 264 - core 129 r2245 bc13772 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, flv, to 'C:\xampp\tmp/1384191046-5281144681e51.flv':
     Metadata:
       audiodelay      : 0
       canSeekToEnd    : true
       encoder         : Lavf54.61.104
       Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 320x180, q=-1--1, pass 1, 1k tbn, 1k tbc
       Stream #0:1: Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (vp6f -> libx264)
     Stream #0:1 -> #0:1 (mp3 -> aac)
    Press [q] to stop, [?] for help
    frame=    2 fps=0.0 q=-1.0 Lsize=     102kB time=00:00:06.10 bitrate= 136.7kbits/s
    video:2kB audio:95kB subtitle:0 global headers:0kB muxing overhead 4.978013%
    [libx264 @ 0000000002457340] frame I:1     Avg QP:11.95  size:  1595
    [libx264 @ 0000000002457340] frame P:1     Avg QP: 2.00  size:    21
    [libx264 @ 0000000002457340] mb I  I16..4: 86.3%  0.0% 13.8%
    [libx264 @ 0000000002457340] mb P  I16..4:  0.4%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:99.6%
    [libx264 @ 0000000002457340] coded y,uvDC,uvAC intra: 13.8% 40.7% 32.8% inter: 0.0% 0.0% 0.0%
    [libx264 @ 0000000002457340] i16 v,h,dc,p: 80% 15%  4%  0%
    [libx264 @ 0000000002457340] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 42% 21%  0%  0%  0%  0%  0%  0%
    [libx264 @ 0000000002457340] i8c dc,h,v,p: 45% 24% 31%  0%
    [libx264 @ 0000000002457340] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0000000002457340] kb/s:1.08

    /ffmpeg/ffmpeg.exe -i "C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv" -strict experimental -vcodec "h264" -s "320x180" -acodec "aac" -ac "2" -pass "2" -passlogfile "C:\xampp\tmp/1384191046-5281144682cfc-multipass"  -y C:\xampp\tmp/1384191046-5281144681e51.flv

    ffmpeg version N-49610-gc2dd5a1 Copyright (c) 2000-2013 the FFmpeg developers
     built on Feb  5 2013 13:26:02 with gcc 4.7.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
     libavutil      52. 17.101 / 52. 17.101
     libavcodec     54. 91.100 / 54. 91.100
     libavformat    54. 61.104 / 54. 61.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 35.101 /  3. 35.101
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    [flv @ 00000000002fb860] max_analyze_duration 5000000 reached at 5018000 microseconds
    Input #0, flv, from 'C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv':
     Metadata:
       audiodelay      : 0
       canSeekToEnd    : true
     Duration: 00:00:06.00, start: 0.000000, bitrate: 118 kb/s
       Stream #0:0: Video: vp6f, yuv420p, 360x288, 409 kb/s, 1k tbr, 1k tbn, 1k tbc
       Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 96 kb/s
    [libx264 @ 00000000024e7340] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
    [libx264 @ 00000000024e7340] constant rate-factor is incompatible with 2pass.
    Output #0, flv, to 'C:\xampp\tmp/1384191046-5281144681e51.flv':
     Metadata:
       audiodelay      : 0
       canSeekToEnd    : true
       Stream #0:0: Video: h264, yuv420p, 320x180, q=-1--1, pass 2, 90k tbn, 1k tbc
       Stream #0:1: Audio: none, 44100 Hz, stereo, fltp, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (vp6f -> libx264)
     Stream #0:1 -> #0:1 (mp3 -> aac)
    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    I am not Unix Wizard to get the things out of this. Please help me in suggesting the right path.