Recherche avancée

Médias (0)

Mot : - Tags -/tags

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (22)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

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

  • How to write unit tests for your plugin – Introducing the Piwik Platform

    17 novembre 2014, par Thomas Steur — Development

    This is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to verify user permissions). This time you’ll learn how to write unit tests in Piwik. For this tutorial you will need to have basic knowledge of PHP, PHPUnit and the Piwik platform.

    When is a test a unit test ?

    There are many different opinions on this and it can be sometimes hard to decide. At Piwik we consider a test as a unit test if only a single method or class is being tested and if a test does not have a dependency to the filesystem, web, config, database or to any other plugin.

    If a test is slow it can be an indicator that it is not a unit test. “Slow” is of course a bit vague. We will cover how to write other type of tests, such as integration tests, in one of our next blog posts.

    Getting started

    In this post, we assume that you have already installed Piwik 2.9.0 or later via git, set up your development environment and created a plugin. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik and other Guides that help you to develop a plugin.

    Let’s create a unit test

    We start by using the Piwik Console to create a new unit test :

    ./console generate:test --testtype unit

    The command will ask you to enter the name of the plugin the created test should belong to. I will use the plugin name “Insights”. Next it will ask you for the name of the test. Here you usually enter the name of the class you want to test. I will use “Widgets” in this example. There should now be a file plugins/Insights/tests/Unit/WidgetsTest.php which contains already an example to get you started easily :

    1. /**
    2.  * @group Insights
    3.  * @group WidgetsTest
    4.  * @group Plugins
    5.  */
    6. class WidgetsTest extends \PHPUnit_Framework_TestCase
    7. {
    8.  
    9.     public function testSimpleAddition()
    10.     {
    11.         $this->assertEquals(2, 1+1);
    12.     }
    13.  
    14. }

    Télécharger

    We don’t want to cover how you should write your unit test. This is totally up to you. If you have no experience in writing unit tests yet, we recommend to read articles on the topic, or a book, or to watch videos or anything else that will help you learn best.

    Running a test

    To run a test we will use the command tests:run which allows you to execute a test suite, a specific file or a group of tests.

    To verify whether the created test works we will run it as follows :

    ./console tests:run WidgetsTest

    This will run all tests having the group WidgetsTest. As other tests can use the same group you might want to pass the path to your test file instead :

    ./console tests:run plugins/Insights/tests/Unit/Widgets.php

    If you want to run all tests within your plugin pass the name of your plugin as an argument :

    ./console tests:run insights

    Of course you can also define multiple arguments :

    ./console tests:run insights WidgetsTest

    This will execute all tests within the insights plugin having the group WidgetsTest. If you only want to run unit tests within your plugin you can do the following :

    ./console tests:run insights unit

    Advanced features

    Isn’t it easy to create a unit test ? We never even created a file ! You can accomplish even more if you want : You can generate other type of tests, you can run tests on Amazon’s AWS and more. Unfortunately, not everything is documented yet so we recommend to discover more features by executing the commands ./console list tests and ./console help tests:run.

    If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.

  • How to configure ffmpeg on ubuntu to convert *.3gp to pcm *.wav ? [migrated]

    31 juillet 2012, par Monica Sol

    I'm using linux Ubuntu ver 10.04.
    I need to convert file *.3gp to PCM *.wav. I'm using for that ffmpeg program.

    When it's installed from repository by using aptitude install ffmpeg it's installing some basic version of it and I cannot convert what I need.

    I've read some stuff on the Internet and I've made what there was written.
    I've installed the latest yasm ver.1.1.0 and the newest x264 - 0.125.2208. After that I got ffmpeg using git from http://ffmpeg.org/download.html (git clone git ://source.ffmpeg.org/ffmpeg.git ffmpeg).

    I`ve tried to configure ffmpeg by myself using :

    ./configure --enable-gpl --enable-version3 --enable-postproc
    --enable-nonfree --enable-swscale --enable-pthreads --enable-libmp3lame
    --enable-libx264 --enable-libopencore-amrnb --enable-libopencore-amrwb

    than : time make && make install.

    Till this time everything was ok. After conversion (ffmpeg -i audiotest.3gp -f s16le -ar 8000 -acodec pcm_s16le audio.wav) I wanted to check information about this PCM *.wav file (ffmpeg -i audio.wav) and I`ve got this error :

    ~# ffmpeg -i audio.wav

    ffmpeg version N-42619-g6b7849e Copyright (c) 2000-2012 the FFmpeg developers
     built on Jul 21 2012 00:50:52 with gcc 4.4.3
     configuration: --enable-gpl --enable-version3 --enable-postproc --enable-nonfree --enable-swscale --enable-pthreads --enable-libmp3lame --enable-libx264 --enable-libopencore-amrnb --enable-libopencore-amrwb

     libavutil      51. 65.100 / 51. 65.100
     libavcodec     54. 41.100 / 54. 41.100
     libavformat    54. 17.100 / 54. 17.100
     libavdevice    54.  1.100 / 54.  1.100
     libavfilter     3.  2.100 /  3.  2.100
     libswscale      2.  1.100 /  2.  1.100
     libswresample   0. 15.100 /  0. 15.100
     libpostproc    52.  0.100 / 52.  0.100
    [aac @ 0x943d4e0] Format aac detected only with low score of 1, misdetection possible!
    [aac @ 0x9443740] channel element 0.0 is not allocated
       Last message repeated 2 times
    [aac @ 0x9443740] More than one AAC RDB per ADTS frame is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] Number of bands (16) exceeds limit (4).
    [aac @ 0x9443740] Number of bands (7) exceeds limit (2).
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] SSR not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    [aac @ 0x9443740] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel mailing list.
    [aac @ 0x9443740] channel element 2.0 is not allocated
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] Reserved bit set.
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] channel element 0.0 is not allocated
    [aac @ 0x9443740] Number of bands (31) exceeds limit (1).
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] Number of bands (16) exceeds limit (2).
    [aac @ 0x9443740] channel element 0.7 is not allocated
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] Number of scalefactor bands in group (62) exceeds limit (41).
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] channel element 0.2 is not allocated
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] Reserved bit set.
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] channel element 0.15 is not allocated
    [aac @ 0x9443740] Pulse data corrupt or invalid.
    [aac @ 0x9443740] Number of scalefactor bands in group (48) exceeds limit (41).
    [aac @ 0x9443740] channel element 2.0 is not allocated
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] Reserved bit set.
    [aac @ 0x9443740] Number of bands (16) exceeds limit (4).
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] Reserved bit set.
       Last message repeated 1 times
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] channel element 2.0 is not allocated
    [aac @ 0x9443740] Number of bands (31) exceeds limit (4).
    [aac @ 0x9443740] Pulse data corrupt or invalid.
    [aac @ 0x9443740] Reserved bit set.
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] Reserved bit set.
    [aac @ 0x9443740] SSR not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    [aac @ 0x9443740] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel mailing list.
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] channel element 0.0 is not allocated
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] Reserved bit set.
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] channel element 0.3 is not allocated
    [aac @ 0x9443740] Pulse data corrupt or invalid.
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] Number of bands (35) exceeds limit (16).
    [aac @ 0x9443740] Number of scalefactor bands in group (63) exceeds limit (41).
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] channel element 0.0 is not allocated
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] Reserved bit set.
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] Reserved bit set.
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] channel element 0.0 is not allocated
    [aac @ 0x9443740] Number of bands (38) exceeds limit (10).
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] channel element 0.2 is not allocated
    [aac @ 0x9443740] channel element 0.7 is not allocated
    [aac @ 0x9443740] Reserved bit set.
       Last message repeated 2 times
    [aac @ 0x9443740] channel element 0.2 is not allocated
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] Reserved bit set.
       Last message repeated 1 times
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] decode_band_types: Input buffer exhausted before END element found
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] Reserved bit set.
    [aac @ 0x9443740] Error decoding AAC frame header.
       Last message repeated 1 times
    [aac @ 0x9443740] Reserved bit set.
       Last message repeated 1 times
    [aac @ 0x9443740] Number of bands (4) exceeds limit (1).
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] Reserved bit set.
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x9443740] Number of bands (31) exceeds limit (8).
    [aac @ 0x9443740] Invalid Predictor Reset Group.
    [aac @ 0x9443740] Number of bands (31) exceeds limit (2).
    [aac @ 0x9443740] Number of bands (28) exceeds limit (1).
    [aac @ 0x9443740] channel element 0.0 is not allocated
    [aac @ 0x9443740] Input buffer exhausted before END element found
    [aac @ 0x9443740] Number of bands (16) exceeds limit (2).
    [aac @ 0x9443740] Error decoding AAC frame header.
    [aac @ 0x943d4e0] decoding for stream 0 failed
    [aac @ 0x943d4e0] Could not find codec parameters for stream 0 (Audio: aac, 4.0, s16, 383 kb/s): unspecified sample rate
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    [aac @ 0x943d4e0] Estimating duration from bitrate, this may be inaccurate
    audio.wav: could not find codec parameters

    Can anyone help me with this ? What I'm doing wrong ? I'm linux newbie, but I really need to get this thing works.

  • Most generic ffmpeg command to truncate video [duplicate]

    18 octobre 2014, par David542

    This question already has an answer here :

    I have several thousand videos that I would like to truncate the video to the first two minutes. Here is the command I’m using so far :

    ffmpeg -i %s -ss 0 -t 120 %s' % (input_path, output_path)

    However, this runs into many errors on valid files. Is there an ’ultra-generic’ command I can use to truncate the file to the first two minutes, and it will work with all videos ?