Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (47)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (7087)

  • Killing python ffmpeg subprocess breaks cli output

    17 mars 2016, par JayLev

    I’m trying to execute a system command with subprocess and reading the output.

    But if the command takes more than 10 seconds I want to kill the subprocess.

    I’ve tried doing this in several ways.

    My last try was inspired by this post : http://stackoverflow.com/a/3326559/969208

    Example :

    import os
    import signal
    from subprocess import Popen, PIPE

    class Alarm(Exception):
       pass

    def alarm_handler(signum, frame):
       raise Alarm

    def pexec(args):

       p = Popen(args, stdout=PIPE, stderr=PIPE)

       signal.signal(signal.SIGALRM, alarm_handler)
       signal.alarm(10)

       stdout = stderr = ''
       try:
           stdout, stderr = p.communicate()
           signal.alarm(0)
       except Alarm:
           try:
               os.kill(p.pid, signal.SIGKILL)
           except:
               pass

       return (stdout, stderr)

    The problem is : After the program exits no chars are shown in the cli until I hit return. And hitting return will not give me a new line.

    I suppose this has something to do with the stdout and stderr pipe.

    I’ve tried flushing and reading from the pipe (p.stdout.flush())

    I’ve also tried with different Popen args, but might’ve missed something. Just thought I’d keep it simple here.

    I’m running this on a Debian server.

    Am I missing something here ?

    EDIT :

    It seems this is only the case when killing an ongoing ffmpeg process. If the ffmpeg process exits normally before 10 seconds, there is no problem at all.

    I’ve tried executing a couple of different command that take longer than 10 seconds, one who prints output, one who doesn’t and a ffmpeg command to check the integrity of a file.

    args = ['sleep', '12s'] # Works fine
    args = ['ls', '-R', '/var'] # Works fine, prints lots for a long time
    args = ['ffmpeg', '-v', '1', '-i', 'large_file.mov','-f', 'null', '-'] # Breaks cli output

    I believe ffmpeg prints using \r and prints everything on the strerr pipe. Can this be the cause ? Any ideas how to fix it ?

  • Killing python ffmpeg subprocess breaks cli output

    27 septembre 2017, par JayLev

    I’m trying to execute a system command with subprocess and reading the output.

    But if the command takes more than 10 seconds I want to kill the subprocess.

    I’ve tried doing this in several ways.

    My last try was inspired by this post : https://stackoverflow.com/a/3326559/969208

    Example :

    import os
    import signal
    from subprocess import Popen, PIPE

    class Alarm(Exception):
       pass

    def alarm_handler(signum, frame):
       raise Alarm

    def pexec(args):

       p = Popen(args, stdout=PIPE, stderr=PIPE)

       signal.signal(signal.SIGALRM, alarm_handler)
       signal.alarm(10)

       stdout = stderr = ''
       try:
           stdout, stderr = p.communicate()
           signal.alarm(0)
       except Alarm:
           try:
               os.kill(p.pid, signal.SIGKILL)
           except:
               pass

       return (stdout, stderr)

    The problem is : After the program exits no chars are shown in the cli until I hit return. And hitting return will not give me a new line.

    I suppose this has something to do with the stdout and stderr pipe.

    I’ve tried flushing and reading from the pipe (p.stdout.flush())

    I’ve also tried with different Popen args, but might’ve missed something. Just thought I’d keep it simple here.

    I’m running this on a Debian server.

    Am I missing something here ?

    EDIT :

    It seems this is only the case when killing an ongoing ffmpeg process. If the ffmpeg process exits normally before 10 seconds, there is no problem at all.

    I’ve tried executing a couple of different command that take longer than 10 seconds, one who prints output, one who doesn’t and a ffmpeg command to check the integrity of a file.

    args = ['sleep', '12s'] # Works fine
    args = ['ls', '-R', '/var'] # Works fine, prints lots for a long time
    args = ['ffmpeg', '-v', '1', '-i', 'large_file.mov','-f', 'null', '-'] # Breaks cli output

    I believe ffmpeg prints using \r and prints everything on the strerr pipe. Can this be the cause ? Any ideas how to fix it ?

  • Révision 93109 : Compat PHP7 (peut être pas encore suffisant).

    23 novembre 2015, par marcimat@rezo.net

    La structure foreach change de comportement et s’applique par défaut sur une copie du tableau passé.
    Si on modifie le tableau dans le foreach… bien celui d’origine n’est pas affecté. Pour retrouver
    le comportement d’avant dans ces cas là, il faut passer la valeur par référence.

    cf.
    https://wiki.php.net/rfc/php7_foreach
    http://php.net/manual/fr/migration70.incompatible.php