Recherche avancée

Médias (0)

Mot : - Tags -/serveur

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

Autres articles (29)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

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

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (6281)

  • How to expose new API methods in the HTTP Reporting API – Introducing the Piwik Platform

    26 février 2015, 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 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 folder plugins/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 :

    1. class API extends \Piwik\Plugin\API
    2. {
    3.     public function getAnswerToLife($truth = true)
    4.     {
    5.         if ($truth) {
    6.             return 42;
    7.         }
    8.  
    9.         return 24;
    10.     }
    11.  
    12.     public function getExampleReport($idSite, $period, $date, $wonderful = false)
    13.     {
    14.         $table = DataTable::makeFromSimpleArray(array(
    15.             array('label' => 'My Label 1', 'nb_visits' => '1'),
    16.             array('label' => 'My Label 2', 'nb_visits' => '5'),
    17.         ));
    18.  
    19.         return $table;
    20.     }
    21. }

    Télécharger

    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 parameter method 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 method getExampleReport.

    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 :

    1. public function createLdapUser($idSite, $login, $password)
    2. {
    3.     Piwik::checkUserHasAdminAccess($idSite);
    4.     $this->checkLogin($login);
    5.     $this->checkPassword($password);
    6.    
    7.     $myModel = new LdapModel();
    8.     $success = $myModel->createUser($idSite, $login, $password);
    9.    
    10.     return $success;
    11. }

    Télécharger

    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 Gencosmanoglu

    I 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.