Recherche avancée

Médias (91)

Autres articles (34)

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

  • XMP PHP

    13 mai 2011, par

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

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

Sur d’autres sites (5239)

  • Python - second subprocess won't open if sys.argv containts "&" character

    3 juin 2015, par Hyperion

    I’ve got a Python script which download a video using youtube-dl and then extract frames from it using ffmpeg. This is the code :

    def DownloadVideo():
       output_file = "/Users/francesco/Desktop/SOURCE/%(title)s-%(id)s.%(ext)s"
       check_call(["youtube-dl","--output", output_file, "--restrict-filenames", "-f", "best", sys.argv[1]])

    def ConvertVideo(video):
       DEST = "/Users/francesco/Desktop/OUTPUT"
       SOURCE = "/Users/francesco/Desktop/SOURCE"
       ffmpeg_path = "/Users/francesco/Desktop/ffmpeg/ffmpeg"
       video_path = SOURCE + "/" + video
       dest_path = DEST + "/" + os.path.splitext(video)[0] + "-%d.png"
       check_call([ffmpeg_path, "-v", "0", "-i", video_path, "-f", "image2", dest_path])

    def Main():
       DownloadVideo()
       for video in os.listdir("/Users/francesco/Desktop/SOURCE"):
          ConvertVideo(video)

    I run the command python myscript.py myvideolink and everything goes fine in the download process, but the ConvertVideo doesn’t start, it just get frozen for a couple of seconds and then the program exits.

    If I try to run the same command skipping the DownloadVideo() (with the video already downloaded in the folder) it doens’t work too, but if I use python myscript.py without the argv[1], the ffmpeg process works ! Why this happens ?

    Update : I’ve tried to remove the -v 0 option in ffmpeg to see what actually happens, ffmpeg process starts, but get frozen like this :

    ffmpeg version 2.6.2 Copyright (c) 2000-2015 the FFmpeg developers
     built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
     configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --disable-doc --arch=x86_64 --enable-runtime-cpudetect
     libavutil      54. 20.100 / 54. 20.100
     libavcodec     56. 26.100 / 56. 26.100
     libavformat    56. 25.101 / 56. 25.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 11.102 /  5. 11.102
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100

    Update 2 : Turns out that this happens only when the argument (which is a link) contains the character "&". Anyone knows why this is a problem for ffmpeg ? He’s not neither using the arg variable...

  • WordPress Analytics plugin WP-Piwik reaches version 1.0.0 (and 50,000 active users)

    29 mai 2015, par André Bräkling — Plugins

    After six years of development, we are proud to announce the 1.0.0 release of our WP-Piwik WordPress plugin !

    Started as a simple plugin to show a selection of statistics within the WordPress dashboard, WP-Piwik has become a full Piwik integration plugin. The plugin automatically adds the Piwik tracking code to your WordPress sites. The plugin displays your analytics reports directly within the WordPress admin panel. WordPress networks (“multisite”), CDN URLs and the Piwik proxy script are also supported.

    According to WordPress.org the plugin is being used by more than 50,000 WordPress sites !

    This article explains how to install WP-Piwik and how to configure it to work with your Piwik instance.

    Install WP-Piwik

    You can get WP-Piwik using WordPress’ plugin management. Login to your WordPress admin dashboard and go to « Plugins » → « Add New ». Enter « WP-Piwik » into the search field at the top right, press enter and next to WP-Piwik choose « Install Now ».

    If you want to use WP-Piwik in your simple WordPress blog you can just click « Activate Plugin » and WP-Piwik will ask you to configure your Piwik connection.

    Running a WordPress network/multisite you can choose to « Network Activate » the plugin after the installation process. In this case, WP-Piwik will be a fully automated feature of your WordPress network automatically tracking your sites in the same Piwik instance in separate Websites.

    Alternatively you can download WP-Piwik manually from the WordPress website and upload all files to your `wp-content/plugins` directory.

    Configure your Piwik connection

    WP-Piwik lets you choose between three connection modes :

    • Self-hosted (HTTP API) : This is the default option for a self-hosted Piwik and should work for most configurations. You just have to know your Piwik URL, which is the URL you enter to access Piwik, and your auth token (see below). WP-Piwik will connect to Piwik using http(s)-requests.
    • Self-hosted (PHP API) : Choose this, if your self-hosted Piwik and WordPress are running on the same machine and you know the full server path to your Piwik instance. Beside the full server path, you also need to know your auth token (see below).
    • Cloud-hosted (Piwik Pro) : If you are using a cloud-hosted Piwik by Piwik Pro, you just need to know your user name and your auth token (see below).

    Setting up WP-Piwik

    To configure WP-Piwik you will need to specify your Authentication token.

    • If the site you want to track in Piwik is already configured in your Piwik, you only need to specify a token_auth for a user with `view` permission.
    • If you want WP-Piwik to create the website in Piwik (or if you use WP-Piwik in network mode which requires to be able to configure your sites), you should specify a token_auth which has Super User access (after the setting up phase is completed you can set the authentication token back to the token of a `view` user).

    To find your token_auth in Piwik, click on your user name in the right right corner of your Piwik dashboard, then click the « API » in the left menu. The API page displays your auth token in a colored box, just behind the “&token_auth=” string. The screenshot below shows the token_auth anonymous, but your real one will be an alpha numerous random string like a1ec31524a8eabc7a546d71d68b28d17.

    That’s it. After you entered your connection data and submitted the form, WP-Piwik will welcome you with some information :

    You can now start to configure WP-Piwik and enable the tracking code. Learn about any setting by clicking on the small question mark sign. If you have any problem configuring or using WP-Piwik feel free to use the WordPress support forum related to WP-Piwik.

    Translating WP-Piwik

    We invite you to join our translation community at Transifex and help to translate WP-Piwik in more languages !

    Happy WordPress Analytics !

  • WordPress Analytics plugin WP-Piwik reaches version 1.0.0 (and 50,000 active users)

    29 mai 2015, par André Bräkling — Plugins

    After six years of development, we are proud to announce the 1.0.0 release of our WP-Piwik WordPress plugin !

    Started as a simple plugin to show a selection of statistics within the WordPress dashboard, WP-Piwik has become a full Piwik integration plugin. The plugin automatically adds the Piwik tracking code to your WordPress sites. The plugin displays your analytics reports directly within the WordPress admin panel. WordPress networks (“multisite”), CDN URLs and the Piwik proxy script are also supported.

    According to WordPress.org the plugin is being used by more than 50,000 WordPress sites !

    This article explains how to install WP-Piwik and how to configure it to work with your Piwik instance.

    Install WP-Piwik

    You can get WP-Piwik using WordPress’ plugin management. Login to your WordPress admin dashboard and go to « Plugins » → « Add New ». Enter « WP-Piwik » into the search field at the top right, press enter and next to WP-Piwik choose « Install Now ».

    If you want to use WP-Piwik in your simple WordPress blog you can just click « Activate Plugin » and WP-Piwik will ask you to configure your Piwik connection.

    Running a WordPress network/multisite you can choose to « Network Activate » the plugin after the installation process. In this case, WP-Piwik will be a fully automated feature of your WordPress network automatically tracking your sites in the same Piwik instance in separate Websites.

    Alternatively you can download WP-Piwik manually from the WordPress website and upload all files to your `wp-content/plugins` directory.

    Configure your Piwik connection

    WP-Piwik lets you choose between three connection modes :

    • Self-hosted (HTTP API) : This is the default option for a self-hosted Piwik and should work for most configurations. You just have to know your Piwik URL, which is the URL you enter to access Piwik, and your auth token (see below). WP-Piwik will connect to Piwik using http(s)-requests.
    • Self-hosted (PHP API) : Choose this, if your self-hosted Piwik and WordPress are running on the same machine and you know the full server path to your Piwik instance. Beside the full server path, you also need to know your auth token (see below).
    • Cloud-hosted (Piwik Pro) : If you are using a cloud-hosted Piwik by Piwik Pro, you just need to know your user name and your auth token (see below).

    Setting up WP-Piwik

    To configure WP-Piwik you will need to specify your Authentication token.

    • If the site you want to track in Piwik is already configured in your Piwik, you only need to specify a token_auth for a user with `view` permission.
    • If you want WP-Piwik to create the website in Piwik (or if you use WP-Piwik in network mode which requires to be able to configure your sites), you should specify a token_auth which has Super User access (after the setting up phase is completed you can set the authentication token back to the token of a `view` user).

    To find your token_auth in Piwik, click on your user name in the right right corner of your Piwik dashboard, then click the « API » in the left menu. The API page displays your auth token in a colored box, just behind the “&token_auth=” string. The screenshot below shows the token_auth anonymous, but your real one will be an alpha numerous random string like a1ec31524a8eabc7a546d71d68b28d17.

    That’s it. After you entered your connection data and submitted the form, WP-Piwik will welcome you with some information :

    You can now start to configure WP-Piwik and enable the tracking code. Learn about any setting by clicking on the small question mark sign. If you have any problem configuring or using WP-Piwik feel free to use the WordPress support forum related to WP-Piwik.

    Translating WP-Piwik

    We invite you to join our translation community at Transifex and help to translate WP-Piwik in more languages !

    Happy WordPress Analytics !