Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (66)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (7650)

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

  • How Media Analytics for Piwik gives you the insights you need to measure how effective your video and audio marketing is – Part 1

    31 janvier 2017, par InnoCraft — Community

    Do you have video or audio content on your website or in your app ? If you answered this with yes, you should continue reading and learn everything about our Media Analytics premium feature.

    When you produce video or audio content, you are either spending money or time or often both money and time on your content in the hope of increasing conversions or sales. This means you have to know how your media is being used, when it is used, for how long and by whom. You can simply not afford not to know how this content affects your overall business goals as you are likely losing money and time by not making the most out of it. Would you be able to answer any of the above questions ? Do you know whether you can justify the cost and time for producing them, which videos work better than others and how they support your marketing strategy ? Luckily, getting all these insights is now so trivial it is almost a crime to not measure it.

    Getting Media Analytics and Installation

    Media Analytics can be purchased from the Piwik Marketplace where you find all sorts of free plugins as well as several premium features such as A/B Testing or Funnel. After the purchase you will receive a license key that you can enter in your Piwik to install and update the plugin with just one click.

    The feature will in most cases automatically start tracking your media content and you don’t even need to change the tracking code on your website. Currently supported players are for example YouTube, Vimeo, HTML 5, JW Player, VideoJS and many more players. You can also easily extend it by adding a custom media player or simply by letting us know which player you use and we will add support for it for you.

    By activating this feature, you get more than 15 new media reports, even more exportable widgets, new segments, APIs, and more. We will cover some of those features in this blog post and in part 2. For a full list of features check out the Media Analytics page on the Piwik Marketplace.

    Media Overview

    As the name says, it gives you an overview over your media usage and how it performs over time. You can choose any media metrics in the big evolution graph and the sparklines below give you an overview over all important metrics in a glance.

    It lets you for example see how often media was shown to your users, how often users start playing your media, for how long they watched it, how often they finished it, and more. If you see some spikes there, you should definitely have a deeper look at the other reports. When you hover a metric, it will show you a tooltip explaining how the data for this is collected and what it means.

    Real-Time Media

    On the Real-Time page you can see how your content is being used by your visitors right now, for example within the last 30 minutes, last 60 minutes and last 24 hours.

    It shows you how many plays you had in the last minutes, for how long they played it, and it shows you currently most popular media titles. This is great to discover which media content performs best right now and lets you make decisions based on user behaviour that is happening right now.

    Below you can see our Audience Real-Time Map that shows you from where in the world your media is being played. A bigger circle indicates that a media play happened more recently and of course you can zoom in down to countries and regions.

    All the reports update every few seconds so you can always have a look at it and see in just a second how your content is doing and how certain marketing campaigns affect it. All these real-time reports can be also added as widgets to any of your Piwik Dashboards and they can be exported for example as an iframe.

    Video, Audio and Media Player reports

    Those reports come with so many features, we need a separate blog post and cover this in part 2.

    Events

    Media Analytics will automatically track events so you can see how often users pressed for example play or pause, how often they resumed a video and how often they finished a video. This helps you better understand how your media is being used.

    For example in the past we noticed a couple of videos with lots of pause and resume events. We then had a look at the Audience Log – which we will cover next – to better understand why visitors paused the videos so often. We then realized they did this especially for videos that were served from a specific server and because the videos were loading so slow, users often pressed pause to let the media buffer, then played the media for a few seconds and then paused it again as they had to wait for the video to load. Moving those videos to another, faster server showed us immediate results in the number of pauses going down and on average visitors watched the videos for much longer.

    Audience Log

    At InnoCraft, we understand that not only aggregated metrics matter but also that you often need the ability to dig into your data and “debug” certain behaviours to understand the cause for some unusual high or low metrics. For example you may find out that many of your users often pause a video, then you wonder how each individual user behaved so you can better understand the why.

    The audience log shows you a detailed log of every visitor. You can chronologically see every action a visitor has performed during their whole visit. If you click on the visitor profile link, you can even see all visits of a specific visitor, and all actions they have ever performed on your website.

    This lets you ultimately debug and understand your visitors and see exactly which actions they performed before playing your media, which media they played, how they played your media, and how they behaved after playing your media.

    The visitor log of course also shows important information about each visitor like where they came from (referrer), their location, software, device and much more information.

    Audience Map

    The Audience Map is similar to the Real-Time Map but it shows you the locations of your visitors based on a selected date range and not in real time. The darker the blue, the more visitors from that country, region or city have interacted with your media.

    Coming in part 2

    In the next part we will cover which video, audio and media player reports Media Analytics provides, how segmenting gives you insights into different personas, and how nicely it integrates into Piwik.

    How to get Media Analytics and related features

    You can get Media Analytics on the Piwik Marketplace. If you want to learn more about this feature, you might be also interested in the Media Analytics User Guide and the Media Analytics FAQ.

  • An introduction to reverse engineering

    22 janvier 2011

    (This blog is still in hibernation, but I needed somewhere to post this)

    Reverse engineering is one of those wonderful topics, covering everything from simple "guess how this program works" problem solving, to poking at silicon with scanning electron microscopes. I’m always hugely fascinated by articles that walk through the steps involved in these types of activities, so I thought I’d contribute one back to the world.

    In this case, I’m going to be looking at the export bundle format created by the Tandberg Content Server, a device for recording video conferences. The bundle is intended for moving recordings between Tandberg devices, but it’s also the easiest way to get all of the related assets for a recorded conference. Unfortunately, there’s no parser available to take the bundle files (.tcb) and output the component pieces. Well, that just won’t do.

    For this type of reverse engineering, I basically want to learn enough about the TCB format to be able to parse out the individual files within it. The only tools I’ll need in this process are a hex editor, a notepad, and a way to convert between hex and decimal (the OS X calculator will do fine if you’re not the type to do it in your head).

    Step 1 : Basic Research
    After Googling around to see if this was a solved issue, I decided to dive into the format. I brought a sample bundle into my trusty hex editor (in this case Hex Fiend).

    1-1.jpg

    A few things are immediately obvious. First, we see the first four bytes are the letters TCSB. Another quick visit to Google confirms this header type isn’t found elsewhere, and there’s essentially no discussion of it. Going a few bytes further, we see "contents.xml." And a few bytes after that, we see what looks like plaintext XML. This is a pretty good clue that the TCB file consists of a . Let’s scan a bit further and see if we can confirm that.
    1-2.jpg
    In this segment, we see the end of the XML, and something that could be another filename - "dbtransfer" - followed by what looks like gibberish. That doesn’t help too much. Let’s keep looking.
    1-3.jpg
    Great - a .jpg ! Looking a bit further, we see the letters "JFIF," which is recognizable as part of a JPEG header. If you weren’t already familiar with that, a quick google for "jpg hex header" would clear up any confusion. So, we’ve got the basics of the file format down, but we’ll need a little bit more information if we’re going to write a parser.

    Step 2 : Finding the pattern
    We can make an educated guess that a file like this has to provide a few hints to a decoder. We would either expect a table of contents, describing where in the bundle each individual file was located, some sort of stop bit marking the boundary between files, byte offsets describing the locations of files, or a listing of file lengths.

    There isn’t any sign of a table of contents. Let’s start looking for a stop bit, as that would make writing our parser really easy. Want I’m going to do is pull out all of the data between two prospective files, and I want two sets to compare.
    I’ve placed asterisks to flag the bytes corresponding to the filenames, since those are known.

    1E D1 70 4C 25 06 36 4D 42 E9 65 6A 9F 5D 88 38 0A 00 *64 62 74 72 61 6E 73 66 65 72* 42 06 ED 48 0B 50 0A C4 14 D6 63 42 F2 BF E3 9D 20 29 00 00 00 00 00 00 DE E5 FD

    01 0C 00 *63 6F 6E 74 65 6E 74 73 2E 78 6D 6C* 9E 0E FE D3 C9 3A 3A 85 F4 E4 22 FE D0 21 DC D7 53 03 00 00 00 00 00 00

    The first line corresponds to the "dbtransfer" entry, the second to the "contents.xml" entry. Let’s trim the first entry to match the second.

    38 0A 00 *64 62 74 72 61 6E 73 66 65 72* 42 06 ED 48 0B 50 0A C4 14 D6 63 42 F2 BF E3 9D 20 29 00 00 00 00 00 00

    01 0C 00 *63 6F 6E 74 65 6E 74 73 2E 78 6D 6C* 9E 0E FE D3 C9 3A 3A 85 F4 E4 22 FE D0 21 DC D7 53 03 00 00 00 00 00 00

    It looks like we’ve got three bytes before the filename, followed by 18 bytes, followed by six bytes of zero. Unfortunately, there’s no obvious pattern of bits which would correspond to a "break" between segments. However, looking at those first three bytes, we see a 0x0A, and a 0x0C, two small values in the same place. 10 and 12. Interesting - the 12 entry corresponds with "contents.xml" and the 10 entry corresponds with "dbtransfer". Could that byte describe the length of the filename ? Let’s look at our much longer JPG entry to be sure.

    70 4A 00 *77 77 77 5C 73 6C 69 64 65 73 5C 64 37 30 64 35 34 63 66 2D 32 39 35 62 2D 34 31 34 63 2D 61 38 64 66 2D 32 66 37 32 64 66 33 30 31 31 35 65 5C 74 68 75 6D 62 6E 61 69 6C 73 5C 74 68 75 6D 62 6E 61 69 6C 30 30 2E 6A 70 67*

    0x4A - 74, corresponding to a 74 character filename. Looks like we’re in business.

    At this point, it’s worth an aside to talk about endianness. I happen to know that the Tandberg Content Server runs Windows on Intel, so I went into this with the assumption that the format was little-endian. However, if you’re not sure, it’s always worth looking at words backwards and forwards, just in case.

    So we know how to find our filename. Now how do we find our file data ? Let’s go back to our JPEG. We know that JPEGs start with 0xFFD8FFE0, and a quick trip to Google also tells us that they end with 0xFFD9. We can use that to pull a sample jpeg out of our TCB, save it to disk, and confirm that we’re on the right track.
    2-2.jpg

    This is one of those great steps in reverse engineering - concrete proof that you’re on the right track. Everything seems to go quicker from this point on.

    So, we know we’ve got a JPEG file in a continuous 2177 byte segment. We know that the format used byte lengths to describe filenames - maybe it also uses byte lengths to describe file lengths. Let’s look for 2177, or 0x8108, near our JPEG.

    2-3.jpg

    Well, that’s a good sign. But, it could be coincidental, so at this point we’d want to check a few other files to be sure. In fact, looking further in some file, we find some larger .mp4 files which don’t quite match our guess. It turns out that file length is a 32bit value, not a 16bit value - with our two jpegs, the larger bytes just happened to be zeros.

    Step 3 : Writing a parser

    "Bbbbbut...", I hear you say ! "You have all these chunks of data you don’t understand !"

    True enough, but all I care about is getting the files out, with the proper names. I don’t care about creation dates, file permissions, or any of the other crud that this file format likely contains.

    3-1.jpg

    Let’s look at the first two files in this bundle. A little bit of byte counting shows us the pattern that we can follow. We’ll treat the first file as a special case. After that, we seek 16 bytes from the end of file data to find the filename length (2 bytes), then we’re at the filename, then we seek 16 bytes to find the file length (4 bytes) and seek another 4 bytes to find the start of the file data. Rinse, repeat.

    I wrote a quick parser in PHP, since the eventual use for this information is part of a larger PHP-based application, but any language with basic raw file handling would work just as well.

    tcsParser.txt
    This was about the simplest possible type of reverse engineering - we had known data in an unknown format, without any compression or encryption. It only gets harder from here...