
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (99)
-
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (12941)
-
How to expose new API methods in the HTTP Reporting API – Introducing the Piwik Platform
26 février 2015, 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 write UI tests for your plugin). This time you’ll learn how to extend our Reporting API. For this tutorial you will need to have basic knowledge of PHP.
What is Piwik’s Reporting API ?
It allows third party applications to access analytics data and manipulate miscellaneous data (such as users or websites) through HTTP requests.
What is it good for ?
The Reporting API is used by the Piwik UI to render reports, to manage users, and more. If you want to add a feature to the Piwik UI, you might have to expose a method in the API to access this data. As the API is called via HTTP it allows you to fetch or manipulate any Piwik related data from anywhere. In these exposed API methods you can do pretty much anything you want, for example :
- Enhance existing reports with additional data
- Filter existing reports based on custom rules
- Access the database and generate custom reports
- Persist and read any data
- Request server information
Getting started
In this series of posts, we assume that you have already set up your development environment. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik.
To summarize the things you have to do to get setup :
- Install Piwik (for instance via git).
- Activate the developer mode :
./console development:enable
. - Generate a plugin :
./console generate:plugin --name="MyApiPlugin"
. There should now be a folderplugins/MyApiPlugin
. - And activate the created plugin :
./console plugin:activate "MyApiPlugin"
Let’s start creating an API
We start by using the Piwik Console to create a new API :
./console generate:api
The command will ask you to enter the name of the plugin the created API should belong to. I will simply use the above chosen plugin name “MyApiPlugin”. There should now be a file
plugins/MyApiPlugin/API.php
which contains already an example to get you started easily :- class API extends \Piwik\Plugin\API
- {
- public function getAnswerToLife($truth = true)
- {
- if ($truth) {
- return 42;
- }
- return 24;
- }
- public function getExampleReport($idSite, $period, $date, $wonderful = false)
- {
- ));
- return $table;
- }
- }
Any public method in that file will be available via the Reporting API. For example the method
getAnswerToLife
can be called via this URL :index.php?module=API&method=MyApiPlugin.getAnswerToLife
. The URL parametermethod
is a combination of your plugin name and the method name within this class.Passing parameters to your method
Both example methods define some parameters. To pass any value to a parameter of your method simply specify them by name in the URL. For example
...&method=MyApiPlugin.getExampleReport&idSite=1&period=week&date=today&wonderful=1
to pass values to the parameters of the methodgetExampleReport
.Returning a value
In an API method you can return any boolean, number, string or array value. A resource or an object cannot be returned unless it implements the DataTableInterface such as DataTable (the primary data structure used to store analytics data in Piwik), DataTable\Map (stores a set of DataTables) and DataTable\Simple (a DataTable where every row has two columns : label and value).
Did you know ? You can choose the response format of your API request by appending a parameter
&format=JSON|XML|CSV|...
to the URL. Check out the Reporting API Reference for more information.Best practices
Check user permissions
Do not forget to check whether a user actually has permissions to access data or to perform an action. If you’re not familiar with Piwik’s permissions and how to check them read our User Permission guide.
Keep API methods small
At Piwik we aim to write clean code. Therefore, we recommend to keep API methods small (separation of concerns). An API pretty much acts like a Controller :
- public function createLdapUser($idSite, $login, $password)
- {
- Piwik::checkUserHasAdminAccess($idSite);
- $this->checkLogin($login);
- $this->checkPassword($password);
- $myModel = new LdapModel();
- $success = $myModel->createUser($idSite, $login, $password);
- return $success;
- }
This is not only easy to read, it will also allow you to create simple tests for
LdapModel
(without having to bootstrap the whole Piwik layer) and you will be able to reuse it in other places if needed.Calling APIs of other plugins
For example if you want to fetch an existing report from another plugin, say a list of all Page URLs, do not request this report by calling that method directly :
\Piwik\Plugins\Actions\API::getInstance()->getPageUrls($idSite, $period, $date);
. Instead, issue a new API request :
$report = \Piwik\API\Request::processRequest('Actions.getPageUrls', array(
'idSite' => $idSite,
'period' => $period,
'date' => $date,
));This has several advantages :
- It avoids a fatal error if the requested plugin is not available on a Piwik installation
- Other plugins can extend the called API method via events (adding additional report data to a report, doing additional permission checks) but those events will be only triggered when requesting the report as suggested
- If the method parameters change, your request will most likely still work
Publishing your Plugin on the Marketplace
In case you want to share your API with other Piwik users you can do this by pushing your plugin to a public GitHub repository and creating a tag. Easy as that. Read more about how to distribute a plugin and best practices when publishing a plugin.
Isn’t it easy to create a API ? We never even created a file ! If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.
-
bigbluebutton ...
7 mars 2015, par signo
Hello i have a BigBlueButton (0.9.0-beta (622)) installation on Debian Wheezy (7.8) all is ok except archiving recordings...
in the log (/var/log/bigbluebutton/archive-488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.log) i have always same message :
I, [2015-03-06T11:48:19.320704 #4550] INFO -- : Archiving events for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
W, [2015-03-06T11:48:19.851280 #4550] WARN -- : Failed to archive events for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/events.xml (complete error below...)but all directory are writable by right user (tomcat7).
More Info :
bbb packages installed
ii bbb-apps 0.9.0-1ubuntu88 amd64 BigBlueButton applications for Red5
ii bbb-apps-deskshare 0.9.0-1ubuntu25 amd64 BigBlueButton deskshare module for Red5
ii bbb-apps-sip 0.9.0-1ubuntu19 amd64 BigBlueButton SIP module for Red5
ii bbb-apps-video 0.9.0-1ubuntu18 amd64 BigBlueButton video module for Red5
ii bbb-client 0.9.0-1ubuntu235 all BigBlueButton Flash client
ii bbb-config 0.9.0-1ubuntu42 all BigBlueButton configuration
rc bbb-demo 0.9.0-1ubuntu8 amd64 BigBlueButton API demos
ii bbb-freeswitch 0.9.0-1ubuntu38 amd64 BigBlueButton build of FreeSWITCH 1.5.x
ii bbb-mkclean 0.8.7-1 amd64 tool to clean and optimize Matroska and WebM files
ii bbb-office 0.9.0-1ubuntu6 amd64 BigBlueButton wrapper for LibreOffice
ii bbb-playback-presentation 0.9.0-1ubuntu11 amd64 BigBluebutton playback of presentation
ii bbb-record-core 0.9.0-1ubuntu37 amd64 BigBlueButton record and playback
ii bbb-red5 0.9.0-1ubuntu25 amd64 The Red5 server for bbb
ii bbb-swftools 0.9.2-1ubuntu14 amd64 The swftools files for bbb
ii bbb-web 0.9.0-1ubuntu54 all BigBlueButton API
ii bigbluebutton 0.9.0-1ubuntu2 amd64 Open source web conferencing platform (bbb)
bbb-conf —check
BigBlueButton Server 0.9.0-beta (622)
Kernel version: 3.16.0-4-amd64(64-bit)
Memory: 12044 MB
/var/www/bigbluebutton/client/conf/config.xml (bbb-client)
Port test (tunnel): 2xx.xxx.xxx.xx
Red5: 2xx.xxx.xxx.xx
useWebrtcIfAvailable: true
/opt/freeswitch/conf/sip_profiles/external.xml (FreeSWITCH)
websocket port: 5066
WebRTC enabled: true
/etc/nginx/sites-available/bigbluebutton (nginx)
server name: 2xx.xxx.xxx.xx
port: 80
bbb-client dir: /var/www/bigbluebutton
/var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties (bbb-web)
bbb-web host: 2xx.xxx.xxx.xx
/usr/share/red5/webapps/bigbluebutton/WEB-INF/red5-web.xml (red5)
voice conference: FreeSWITCH
capture video: true
capture desktop: true
/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
playback host: 2xx.xxx.xxx.xx
* Potential problems described below **
# IP does not match:
# IP from ifconfig: 172.xx.xxx.xx
# /etc/nginx/sites-available/bigbluebutton: 2xx.xxx.xxx.xx
# Error: Unable to connect to port 1935 (RTMP) 2xx.xxx.xxx.xx
# Error: Unable to connect to port 9123 (desktop sharing) on 212.xxx.xxx.xx
ls -l /var/freeswitch/meetings/
-rw-r--r-- 1 freeswitch daemon 5139984 Mar 6 11:44 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675-81976383.wav
ls -l /usr/share/red5/webapps/video/streams/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/
-rw-rw-r-- 1 red5 red5 438342 Mar 6 11:44 320x240-cztd6nyzasaz_1-1425642114164.flv
ls -l /usr/share/red5/webapps/video/streams/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/
-rw-rw-r-- 1 red5 red5 438342 Mar 6 11:44 320x240-cztd6nyzasaz_1-1425642114164.flv
cat /usr/share/red5/webapps/video/WEB-INF/red5-web.xml
<bean class="org.bigbluebutton.app.video.VideoApplication">
<property value="true"></property>
<property ref="redisRecorder"></property>
</bean>
cat /usr/share/red5/webapps/deskshare/WEB-INF/red5-web.xml
<bean class="org.bigbluebutton.deskshare.server.stream.StreamManager">
</bean>
bbb-record —watch
Every 2.0s: bbb-record --list20 Fri Mar 6 11:53:58 2015
Internal MeetingID Time APVD APVDE RAS Slides Processed Published External MeetingID
------------------------------------------------------ ---------------------------- ---- ----- --- ------ -------------------- ------------------ -------------------
57d9849193299cebe9409d1c98d175958331d34a-1425642748807 Fri 6 Mar 11:52:28 GMT 2015 X 5
488052dc7c095c74bf8992ec51a66298db04b765-1425642166675 Fri 6 Mar 11:42:46 GMT 2015 XXX X 6
bbb-record —debug
E, [2015-03-06T11:48:20.335578 #4548] ERROR -- : Sanity check failed on 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675
cat /var/log/bigbluebutton/archive-488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.log
# Logfile created on 2015-03-06 11:48:19 +0000 by logger.rb/31641
I, [2015-03-06T11:48:19.320704 #4550] INFO -- : Archiving events for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
W, [2015-03-06T11:48:19.851280 #4550] WARN -- : Failed to archive events for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/events.xml
I, [2015-03-06T11:48:19.851428 #4550] INFO -- : Fetching the recording marks for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
I, [2015-03-06T11:48:19.851501 #4550] INFO -- : Getting record status events
W, [2015-03-06T11:48:19.851585 #4550] WARN -- : Failed to fetch the recording marks for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/events.xml
I, [2015-03-06T11:48:19.851645 #4550] INFO -- : Archiving audio /var/freeswitch/meetings/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675*.wav.
W, [2015-03-06T11:48:19.851920 #4550] WARN -- : Failed to archive audio for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/audio
I, [2015-03-06T11:48:19.851981 #4550] INFO -- : Archiving presentation for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
W, [2015-03-06T11:48:19.852257 #4550] WARN -- : Failed to archive presentations for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/presentation
I, [2015-03-06T11:48:19.852322 #4550] INFO -- : Archiving deskshare for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
W, [2015-03-06T11:48:19.852561 #4550] WARN -- : Failed to archive deskshare for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/deskshare
I, [2015-03-06T11:48:19.852620 #4550] INFO -- : Archiving video for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
W, [2015-03-06T11:48:19.852834 #4550] WARN -- : Failed to archive video for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/video
all folder under /var/bigbluebutton/ have same rights (drwxrwxrwx tomcat7 tomcat7)
ls -l /var/bigbluebutton/
total 40
drwxr-xr-x 3 tomcat7 tomcat7 4096 Mar 6 11:42 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675
drwxr-xr-x 3 tomcat7 tomcat7 4096 Mar 6 11:52 57d9849193299cebe9409d1c98d175958331d34a-1425642748807
drwxrwxrwx 2 tomcat7 tomcat7 4096 Mar 3 15:52 blank
drwxrwxrwx 2 tomcat7 tomcat7 4096 Feb 17 17:17 configs
drwxrwxrwx 2 tomcat7 tomcat7 4096 Mar 3 15:57 deskshare
drwxrwxrwx 2 tomcat7 tomcat7 4096 Mar 3 15:57 meetings
drwxrwxrwx 3 tomcat7 tomcat7 4096 Mar 3 15:52 playback
drwxrwxrwx 3 tomcat7 tomcat7 4096 Mar 3 15:57 published
drwxrwxrwx 6 tomcat7 tomcat7 4096 Mar 3 15:57 recording
drwxrwxrwx 2 tomcat7 tomcat7 4096 Mar 3 15:57 unpublished -
Android Video Compression [on hold]
10 mars 2015, par Arif GencosmanogluI am planning to build a small Android JAVA application that compresses images and videos. I did the image compression part and my .apk size is 1.5MB. However when I do the video compression part by using ffmpeg the application size goes up to 20.0MB. This library has tons of features that I am not using. I only need a simple video compression module to add.
Is there any other video compression methods or functions that will be useful ?
Thanks.