
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (57)
-
Monitoring de fermes de MediaSPIP (et de SPIP tant qu’à faire)
31 mai 2013, parLorsque l’on gère plusieurs (voir plusieurs dizaines) de MediaSPIP sur la même installation, il peut être très pratique d’obtenir d’un coup d’oeil certaines informations.
Cet article a pour but de documenter les scripts de monitoring Munin développés avec l’aide d’Infini.
Ces scripts sont installés automatiquement par le script d’installation automatique si une installation de munin est détectée.
Description des scripts
Trois scripts Munin ont été développés :
1. mediaspip_medias
Un script de (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Les notifications de la ferme
1er décembre 2010, parAfin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
Les notifications de changement de statut
Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
À la demande d’un canal
Passage au statut "publie"
Passage au (...)
Sur d’autres sites (5065)
-
Unknown directive "ffmpeg"
5 février 2015, par AndroidBeginnerI’m setting up Amazon AWS s2 Linux(non-AMI) and building up nginx and rtmp from scratch. I follow exactly tutorials at here. When I’m editing nginx.conf, adding ffmpeg and restart my nginx. Unknown directive "ffmpeg" occurs.
Nginx.conf
rtmp {
server {
listen 1935;
chunk_size 4096;
notify_method get;
application live {
live on;
ffmpeg -re -i /var/video/test.mp4 -c copy -f flv rtmp://locahost/live;
}
}}
Way I start nginx :
sudo /usr/local/nginx/sbin/nginx
Way I stop :
sudo /usr/local/nginx/sbin/nginx -s stop
From what I knew, I need to recompile the nginx ? Because I’m using "sudo apt-get install nginx" when I start-up my VPS.
-
AWS Lambda making video thumbnails
5 février 2017, par JesusI want make thumbnails from videos uploaded to S3, I know how to make it with Node.js and ffmpeg.
According to this forum post I can add libraries :
ImageMagick is the only external library that is currently provided by
default, but you can include any additional dependencies in the zip
file you provide when you create a Lambda function. Note that if this
is a native library or executable, you will need to ensure that it
runs on Amazon Linux.But how can I put static ffmpeg binary on aws lambda ?
And how can I call from Node.js this static binary (ffmpeg) with AWS Lambda ?
I’m newbie with amazon AWS and Linux
Can anyone help me ?
-
How to write unit tests for your plugin – Introducing the Piwik Platform
17 novembre 2014, par Thomas Steur — DevelopmentThis 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 :- /**
- * @group Insights
- * @group WidgetsTest
- * @group Plugins
- */
- class WidgetsTest extends \PHPUnit_Framework_TestCase
- {
- public function testSimpleAddition()
- {
- $this->assertEquals(2, 1+1);
- }
- }
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.