
Recherche avancée
Autres articles (36)
-
Publier sur MédiaSpip
13 juin 2013Puis-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 -
Changer son thème graphique
22 février 2011, parLe thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
Modifier le thème graphique utilisé
Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
Il suffit ensuite de se rendre dans l’espace de configuration du (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (5866)
-
Generating test data – Introducing the Piwik Platform
9 octobre 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 create a command). This time you’ll learn how to generate test data.
Developers are developing on their local Piwik instance which usually does not contain useful data compared to a real Piwik installation in production (only a few test visits and a few tests users and websites). The ‘VisitorGenerator’ plugin lets you generate any number of visits, websites, users, goals and more. The generator makes sure there will be data for each report so you can easily test anything.
Getting started
In this series of posts, we assume that you have already installed Piwik. If not, visit the Piwik Developer Zone where you’ll find the Installation guide for developers.
Installing the VisitorGenerator plugin
The easiest way to install the plugin is by using the Marketplace in Piwik itself. It is accessible via Settings => Marketplace => Get new functionality. There you’ll find the plugin “VisitorGenerator” which you can install and activate in one click.
If your Piwik instance is not connected to the internet you can download the plugin from the VisitorGenerator page on the Marketplace. Afterwards you can install the plugin by going to Settings => Marketplace => Uploading a plugin and uploading the previously downloaded ZIP file.
If you have already installed the plugin make sure it is activated by going to Settings => Plugins.
Generating websites
After you have installed the plugin you can add as many websites as you need. This is useful for instance when you want to test something that affects many websites such as the ‘All Websites’ dashboard or the Websites manager. To generate any number of websites use the following command :
./console visitorgenerator:generate-website --limit=10
This will generate 10 websites. If you need more websites simply specify a higher limit. In case you are wondering the names and URLs of the websites are randomly generated by the Faker PHP library.
Generating goals
In case you want to test anything related to Goals you should execute the following command :
./console visitorgenerator:generate-goals --idsite=1
This will generate a few goals for the specified site. The generated goals are defined in a way to make sure there will be conversions when generating the visits in the next step.
Generating visits
To generate visits there are two possibilities. Either via the Piwik UI by going to Settings => Visitor Generator or by using the command line. The UI is a bit limited in generating visits so we recommend to use the command line. There you can generate visits as follows :
./console visitorgenerator:generate-visits --idsite=1
This will generate many different visits for the current day. Don’t worry if it takes a while, it will insert quite a few visits by default.
In case you want to generate visits for multiple days in the past as well you can specify the
--days
option../console visitorgenerator:generate-visits --idsite=1 --days=5
Providing your own logs
Half of the generated visits are randomly generated and half of the visits are based on real logs to make sure there is data for each report. If you want to generate visits based on your own logs for a more realistic testing just place your log files in the
plugins/VisitorGenerator/data
folder and make sure the file name ends with.log
. You can find a few examples in the VisitorGenerator data folder.To generate visits based only on real log files then use the
--no-fake
option../console visitorgenerator:generate-visits --idsite=1 --no-fake
All generated visits will come from the logs and no random visits nor random fake data will be used.
Advanced features
We are regularly adding new commands, tools and runtime checks to make your life as a developer easier. For instance you can also generate users and annotations. In the future we want to extend the plugin to create visits in the background to make sure there will be constantly new actions in the real time report.
Are you missing any kind of generator or any other feature to make your life as a developer easier ? Let us know by email, we are listening !
Would you like to know more about the Piwik platform ? Go to our Piwik Developer Zone where you’ll find guides and references on how to develop plugin and themes.
-
VP8 Codec SDK "Aylesbury" Release
28 octobre 2010, par noreply@blogger.com (John Luther)Today we’re making available "Aylesbury," our first named release of libvpx, the VP8 codec SDK. VP8 is the video codec used in WebM. Note that the VP8 specification has not changed, only the SDK.
What’s an Aylesbury ? It’s a breed of duck. We like ducks, so we plan to use duck-related names for each major libvpx release, in alphabetical order. Our goal is to have one named release of libvpx per calendar quarter, each with a theme.
You can download the Aylesbury libvpx release from our Downloads page or check it out of our Git repository and build it yourself. In the coming days Aylesbury will be integrated into all of the WebM project components (DirectShow filters, QuickTime plugins, etc.). We encourage anyone using our components to upgrade to the Aylesbury releases.
For Aylesbury the theme was faster decoder, better encoder. We used our May 19, 2010 launch release of libvpx as the benchmark. We’re very happy with the results (see graphs below) :
- 20-40% (average 28%) improvement in libvpx decoder speed
- Over 7% overall PSNR improvement (6.3% SSIM) in VP8 "best" quality encoding mode, and up to 60% improvement on very noisy, still or slow moving source video.
The main improvements to the decoder are :
- Single-core assembly "hot spot" optimizations, including improved vp8_sixtap_predict() and SSE2 loopfilter functions
- Threading improvements for more efficient use of multiple processor cores
- Improved memory handling and reduced footprint
- Combining IDCT and reconstruction steps
- SSSE3 usage in functions where appropriate
On the encoder front, we concentrated on clips in the 30-45 dB range and saw the biggest gains in higher-quality source clips (greater that 38 dB), low to medium-motion clips, and clips with noisy source material. Many code contributions made this possible, but a few of the highlights were :
- Adaptive width and strength alternate reference frame noise suppression filter with optional motion compensation.
- Transform improvements (improved accuracy and reduction in round trip error)
- Trellis-based quantized coefficient optimization
- Two-pass rate control and quantizer changes
- Rate distortion changes
- Zero bin and rounding changes
- Work on MB-level quality control and bit allocation
We’re targeting Q1 2011 for the next named libvpx release, which we’re calling Bali. The theme for that release will be faster encoder. We are constantly working on improvements to video quality in the encoder, so after Aylesbury we won’t tie that work to specific named releases.
WebM at Streaming Media West
Members of the WebM project will discuss Aylesbury during a session at the Streaming Media West conference on November 3rd (session C203 : WebM Open Video Project Update). For more information, visit www.streamingmedia.com/west.
John Luther is Product Manager of the WebM Project.
-
How to verify user permissions – Introducing the Piwik Platform
9 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 make your plugin multilingual). This time you’ll learn how to verify user permissions. For this tutorial you will need to have basic knowledge of PHP and the Piwik platform.
When should a plugin verify permissions ?
Usually you want to do this before executing any action – such as deleting or fetching data – and before rendering any sensitive information that should not be accessible by everyone. For instance in an API method or Controller action. You sometimes also need to verify permissions before registering menu items or widgets.
How does Piwik’s user management work ?
It is quite simple as it only differentiates between a few roles : View permission, Admin permission and Super User permission. If you manage multiple websites with Piwik a user can be assigned to different roles as a user might have no permission for some websites but view or admin permission for another set of websites.
Worth mentioning is that roles inherit from each other. This means the role admin automatically includes the role view and a super user automatically covers the view and admin role.
Getting started
In this post, we assume that you have already 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.
Verifying user permissions
To protect your data the platform offers many convenient methods in the \Piwik\Piwik class. There you will find methods that either start with
check
,is
orhas
. While methods that start withcheck
throw an exception in case a condition is not met, the other methods return a booleantrue
orfalse
.Use methods that throw an exception if you want to stop any further execution in case a user does not have an appropriate role. The platform will catch the exception and display an error message or ask the user to log in.
- public function deleteAllMessages()
- {
- // delete messages only if user has super user access, otherwise show an error message
- Piwik::checkUserSuperUserAccess();
- $this->getModel()->deleteAllMessages();
- }
Use methods that return a boolean for instance when registering menu items or widgets.
- public function configureAdminMenu(MenuAdmin $menu)
- {
- if (Piwik::hasUserSuperUserAccess()) {
- $menu->addPlatformItem('Plugins', $this->urlForDefaultAction());
- }
- }
It is important to be aware that just because the menu item won’t be displayed in the UI a user can still open the registered URL manually. Therefore you have to check for permissions in the actual controller action as well.
View permission
A user having a view permission should be only able to view reports but not make any changes apart from his personal settings. The methods that end with
UserHasSomeViewAccess
make sure a user has at least view permission for one website whereas the methods*UserHasViewAccess($idSites = array(1,2,3))
check whether a user has view access for all of the given websites.- Piwik::checkUserHasSomeViewAccess();
As a plugin developer you would usually use the latter example to verify the permissions for specific websites. Use the first example in case you develop something like an “All Websites Dashboard” where you only want to make sure the user has a view permission for at least one website.
Admin permission
A user having an admin permission cannot only view reports but also change website related settings. The methods to check for this role are similar to the ones before, just swap the term
View
withAdmin
.- Piwik::checkUserHasSomeAdminAccess();
Super user permission
A user having the super user permission is allowed to access all of the data stored in Piwik and change any settings. To check if a user has this role use one of the methods that end with
UserSuperUserAccess
.Piwik::checkUserHasSuperUserAccess();
As a plugin developer you would check for this permission for instance in places where your plugin shows an activity log over all users or where it offers the possibility to change any system wide settings.
Getting information about the currently logged in user
Sometimes you might want to know which user is currently logged in. This can be useful if you want to persist user related information in the database or if you want to send an email to the currently logged in user. You can easily get this information by calling the following methods :
- $login = Piwik::getCurrentUserLogin()
- $email = Piwik::getCurrentUserEmail()
Advanced features
Of course there is more that you can do. For instance you can verify whether a user is an anonymous user or whether a user has a specific role. You can also perform any operation in the context of a super user even if the current user does not have this role. Would you like to know more about those features ? Check out the Piwik class reference, the Security guide and the Manage Users user guide.
If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.