Recherche avancée

Médias (91)

Autres articles (99)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (11611)

  • PHP - Read and write the same file hangs

    2 février 2016, par Adracat

    I’m trying to use FFMPEG to make some works with video on the server, and something I need to do is to get the progress of the process.

    I searched a little and I found this solution which tells to write the log into a file and then reading and parsing it.

    The problem

    What is driving me crazy is that I tell FFMPEG - with exec - (process A) to write the log into a file, but when I try to read it - with file_get_contents() - (process B) it does not show the contents until process A is finished (or interrupted the PHP script).

    So, when process A finishes or it says "PHP script timeout", then I can read the file as times as I want, refreshing the page (process B) and showing the contents at the time.

    What I’ve tried

    I’ve tried to use fopen() to create the file with w, w+ and a parameters, using - and without using - fclose(). I’ve tried to use also flock() just in case it gets faster to read to process B if it knows it’s already locked and does not have to wait, but then FFMPEG is not able to write into the file.

    I’ve searched for multithreading too, but I think there must be an easier and simpler way.

    I’ve used also CURL and HTTP context, as this link suggests, but no luck.

    I’ve tried, too, to use PHP-FFMPEG but it’s not supporting the last FFMPEG version, so I cannot use it.

    When I said before "(or interrupted the PHP script)" is because I tried to wait and, when PHP got a timeout, process B worked alright and the file was still updating.

    The code

    Process A (fileA.php)

    exec('ffmpeg -y -i input_file.mp4 output_file.avi 2> C:\Full\Path\To\File\log.txt 1>&2');

    Process B (fileB.php)

    $content = file_get_contents($file);

    if($content){
       //get duration of source
       preg_match("/Duration: (.*?), start:/", $content, $matches);

       $rawDuration = $matches[1];

       //rawDuration is in 00:00:00.00 format. This converts it to seconds.
       $ar = array_reverse(explode(":", $rawDuration));
       $duration = floatval($ar[0]);
       if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
       if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;

       //get the time in the file that is already encoded
       preg_match_all("/time=(.*?) bitrate/", $content, $matches);

       $rawTime = array_pop($matches);

       //this is needed if there is more than one match
       if (is_array($rawTime)){$rawTime = array_pop($rawTime);}

       //rawTime is in 00:00:00.00 format. This converts it to seconds.
       $ar = array_reverse(explode(":", $rawTime));
       $time = floatval($ar[0]);
       if (!empty($ar[1])) $time += intval($ar[1]) * 60;
       if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;

       //calculate the progress
       $progress = round(($time/$duration) * 100);

       echo "Duration: " . $duration . "<br />";
       echo "Current Time: " . $time . "<br />";
       echo "Progress: " . $progress . "%";

    }

    The process

    I just open fileA.php on a Chrome tab and, after a few seconds, I open fileB.php on another Chrome tab (and it stays as loading).

    What I need

    I need to be able to load the file and show the information I want to show while the file is being written (by exec and FFMPEG or other PHP scripts), so I can update the progress percentage with some AJAX calls.

    Extra information

    At this point, I’m using PHP 5.4 on a IIS 7.5 with Windows 7 Professional.

    Thank you everyone for your time, help and patience !

    Best regards.

  • How to track WooCommerce orders in Matomo

    3 janvier 2018, par InnoCraft

    According to several sources (datanyze.com, builtwith.com, …) 20% of all online stores are using the WooCommerce WordPress solution. As a result, we thought some of you would be interested in knowing how you can track WooCommerce orders in Matomo (Piwik) without getting a headache.

    What is WooCommerce ?

    Logo WooCommerceSome of you may not be familiar with WooCommerce. It is one of the most popular WordPress plugins allowing you to transform your website into an online store with a few clicks.
    The main advantages of WooCommerce are :

    • free of charge
    • highly customizable
    • easy to install
    • huge community

    Learn more about WooCommerce.

    The WooCommerce Analytics plugin for Matomo

    Tracking e-commerce websites is always challenging as there are so many things to be taken into consideration. However, the InnoCraft team (the professional branch of Matomo) has developed a premium feature in order to track all orders into Matomo (Piwik).

    The Matomo (Piwik) WooCommerce premium feature is straightforward and easy to install and configure. You can find the plugin settings in WooCommerce under “WooCommerce => Settings => Matomo” :

    WooCommerce Matomo (Piwik) settings

    Once done, you will see the data appearing in your Matomo (Piwik) when an order is completed :

    The InnoCraft team made sure the plugin will record all completed orders 100% correctly (eg. ignoring failed orders, not missing any completed orders). The plugin will even track orders of customers who use an ad blocker thanks to a server-side tracking technique.

    Is the WooCommerce Analytics plugin an alternative to my current Matomo tracking code ?

    No. The WooCommerce Analytics plugin only records orders and abandoned carts made through the WooCommerce plugin. It will not record any page views, events or other actions. If you are looking for a great WordPress plugin to insert the Matomo (Piwik) tracking code into your WP website, we strongly recommend WP-Piwik.

    Tell us your story

    If you are a WooCommerce or WordPress user and would like to tell us about how you use Matomo (Piwik), we would love to hear your story and blog about your WooCommerce or WordPress story !

    The post How to track WooCommerce orders in Matomo appeared first on Analytics Platform - Matomo.

  • New Piwik 2.0 public beta for testers

    16 octobre 2013, par matt

    Dear Piwik community,

    We are excited to announce the release of the first public beta version of Piwik 2.0.

    This is software still in development and we really don’t recommend that you run it on a production site — set up a test database just to play with the new version.

    Piwik 2.0 is a major update from Piwik 1.12 and is the result of 5 months of work on the platform !

    What’s changed ?

    We focused on upgrading Piwik source code quality and maintainability : upgraded to PHP 5.3 using namespaces, changed templating library to Twig, started using composer, using Less as well as css, improved QA tests, introduced new Screenshots tests, refactored translations to nice JSON format, refactored LOTS of code, added documentation….

    There also performance improvements, in particular the “All Websites Dashboard” is now usable with 20,000+ websites !

    Several bugs were fixed and we added some very-special-and-exciting new features.

    See the list of closed tickets in Piwik 2.0, or learn more about our recent developments in the Development update blog post.

    Piwik 2 is the open platform for your analytics data !

    How to update to Piwik 2.0 beta ?

    1. You can tell Piwik to use the latest beta from within the user interface. See this FAQ : [piwik.org]
    2. or alternatively you may download the latest beta from the build server, upload these files on top of your existing piwik files, and visit Piwik to upgrade.

    Beta cycle
    The more you test the beta, the more stable our release candidates and our final release will be. If you think you’ve found a bug, you can post it in this forum post. Or, if you’re comfortable writing a reproducible bug report, file one. The stable Piwik 2.0 release is planned for mid-November !

    Happy testing,

    PS : if you are interested in professional support for Piwik, or custom feature development, contact the Piwik experts.