Recherche avancée

Médias (91)

Autres articles (71)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

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

Sur d’autres sites (6889)

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

  • libavcodec : use 64bit counter in deprecated audio encoder API to prevent problems...

    4 juillet 2013, par Peter Große
    libavcodec : use 64bit counter in deprecated audio encoder API to prevent problems regarding negative dts
    

    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/internal.h
  • Convert a video to audio on an android device (Java)

    25 mai 2012, par user1237578

    My problem is very basic, yet I find it incredibly hard to find a solution.

    I have made an android app which downloads videos from a server and is then supposed to convert them into mp3, because it's for music downloads. The problem now is that I can't really find a lightweight way of converting the videos.

    I have looked into a suitable ffmpeg library/wrapper already, but couldn't find a simple solution to use on the android. I'm already using ffmpeg on my windows machine, but it is console-based.

    All I need to do is convert mp4 into mp3 but somehow there doesn't seem to by any simple solution to find, also I'd rather not use an external web service because I can't rely on a website to always function, while my app should.

    I hope I've made myself clear, and thanks for taking the time to read this.