Recherche avancée

Médias (91)

Autres articles (69)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (9235)

  • How to downsample all the videos in a folder using ffmeg

    8 novembre 2020, par amarykya_ishtmella

    I have a folder with videos of different types (mainly .MTS or .mov, but strong possibility that in future there will be other types). I want to downsample it. This is the code that I won't, but it's not working.

    


    from pathlib import Path
import subprocess, os
import cv2

path= '/Volumes/Element/videos/'

for filename in os.listdir(path):
    if filename.endswith(".MTS") or filename.endswith(".mp4"): 
        os.system("ffmpeg -i{0} -vf scale=500:-2 output%p.MTS".format(filename))
        continue
    else:
       os.system("ffmpeg -i{0} -vf scale=500:-2 output%p.MTS".format(filename))
       continue


    


  • Piwik 2.1 – Changes for Plugin developers

    24 février 2014, par Piwik Core Team — Development

    This blog post is aimed at developers of Piwik Plugins. If you are simply using Piwik and not developing plugins for Piwik, you do not need to read this post.

    Piwik 2.1 will be released in a few days . This blog post will inform Piwik Plugin developers of the changes in Piwik 2.1 that may require that you update your plugin to work with this latest version.

    Breaking API changes

    Piwik can now handle an unlimited number of users having Super User access (#2589 #4564). In the past Piwik was limited to one Super User who was defined in the config file. From now on all users with Super User access are defined in the database the same way a regular user is. This brought some API changes but we will stay backward compatible until the first of April 2014. This gives you some time to migrate any custom plugins you may use. Although there is a layer for backward compatibility we recommend to make sure your plugin works with Piwik as soon as possible before April 1st.

    List of changes

    Deprecated methods

    The following methods are deprecated and we recommend to use the new methods from now on. There are also some methods which won’t be replaced so make sure to adjust the logic of your plugin.

    \Piwik\Piwik::isUserIsSuperUser => \Piwik\Piwik::hasUserSuperUserAccess
    \Piwik\Piwik::setUserIsSuperUser => \Piwik\Piwik::setUserHasSuperUserAccess
    \Piwik\Piwik::checkUserIsSuperUser => \Piwik\Piwik::checkUserHasSuperUserAccess
    \Piwik\Access::isSuperUser => \Piwik\Access::hasSuperUserAccess
    \Piwik\Access::checkUserIsSuperUser => \Piwik\Access::checkUserHasSuperUserAccess
    \Piwik\Access::setSuperUser => \Piwik\Access::setSuperUserAccess
    \FakeAccess::checkUserIsSuperUser => FakeAccess::checkUserHasSuperUserAccess
    \FakeAccess::setSuperUser => FakeAccess::setSuperUserAccess
    \Piwik\Piwik::isUserIsSuperUserOrTheUser => \Piwik\Piwik::hasUserSuperUserAccessOrIsTheUser
    \Piwik\Piwik::checkUserIsSuperUserOrTheUser => \Piwik\Piwik::checkUserHasSuperUserAccessOrIsTheUser
    \FakeAccess::getSuperUserLogin => No replacement
    \Piwik\Piwik::getSuperUserLogin => No replacement, returns the userLogin of the first Super User we find in the database
    \Piwik\Piwik::getSuperUserEmail => No replacement, returns an empty string from now on
    \Piwik\Access::getSuperUserLogin => No replacement, returns the userLogin of the first Super User we find in the database

    Config Super User

    As mentioned, the Super User was defined in the config and you have accessed the Super User’s data either by using a convenient method like Piwik::getSuperUserLogin or directly via the Config object as follows :

    \Piwik\Config::getInstance->superUser

    As the config user is no longer defined in the config this will no longer work in the future. To stay backward compatible we return the first super user found in the database. This is not necessarily always the same user. So if you have used the super user login in some way in your plugin, make sure you are using the new function such as Piwik::getSuperUserLogin

    Extended Auth Interface

    The last change affects plugins who specify their own Authentication mechanism, for instance when using the custom LoginLDAP plugin. From now on the interface \Piwik\Auth (​https://github.com/piwik/piwik/blob/master/core/Auth.php) requires the methods setTokenAuth and setLogin. There is no backward compatibility layer but we had a look at some plugins defining a custom Authentication adapter to make sure those methods are already defined there as expected.

    For another example of a Login plugin, check out the LoginHttpAuth plugin on the Marketplace.

    After updating the plugin

    After you have made changes in your plugin to keep it compatible with Piwik 2.1, your plugin will no longer work with previous Piwik versions. Therefore you should define the minimum required version in your plugin.json file as follows :

    "require": {
    "piwik": ">=2.1"
    }

    Summary

    Piwik 2.1 introduces some changes in the Piwik Core APIs. This blog post explains how to modify any Plugins compatible with Piwik 2.0 to be compatible with Piwik 2.1. Thank you for taking the time to update your plugins !

    Let us know if you have any feedback. Happy hacking !

    PS : if you use the Web Analytics APIs and the Web Tracking APIs, we guarantee that we will support backwards compatibility of our Web APIs.

  • Is there a possibility to automatically render .json data into a video file ? [closed]

    3 septembre 2020, par chipsys

    I have a .json document from a dash cam which includes date, time, velocity, longitude and latitude for each frame.

    


    My goal is just to write the text on the lower third of each frame. Future projects might animate a speedometer and implement open street map.

    


    I have looked at ffmpeg but haven’t found a way to implement it yet.

    


    If you have the slightest idea on how to implement this please leave a response or guide me in the right direction.

    


    Thank you.