Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (43)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (5345)

  • Executing ffmpeg command using Popen

    21 septembre 2014, par dragonator

    I have a strange problem trying to execute ffmpeg command using Popen.
    I have the following piece of code, which I use for executing an external commands in Python :

    from subprocess import Popen, PIPE
    from datetime import datetime


    class Executor(object):

       @classmethod
       def execute(cls, command):
           """
           Executing a given command and
           writing into a log file in cases where errors arise.
           """
           p = Popen(command, stdin=PIPE, stdout=PIPE, stderr=PIPE)
           output, err = p.communicate()
           if p.returncode:
               with open("failed_commands.log", 'a') as log:
                   now = datetime.now()
                   log.write('{}/{}/{} , {}:{}:{}\n\n'.format(now.day, now.month,
                                                              now.year, now.hour,
                                                              now.minute,
                                                              now.second))

                   log.write("COMMAND:\n{}\n\n".format(" ".join(command)))
                   log.write("OUTPUT:\n{}\n\n".format(output.decode("utf-8")))
                   log.write("ERRORS:\n{}\n".format(err.decode("utf-8")))
                   log.write('-'*40)
                   log.write('\n')

               return ''

           if not output:
               output += ' '

           return output

    I’ve tested it with others commands, but when I try to execute ffmpeg command - it fails.
    I’m trying to convert some audio format to mp3 format.
    Here is an example of my command :

    ffmpeg -i "/path/old_song.m4a" "/path/new_song.mp3"

    ...simple as that.When I run it in terminal it works fine, but when I try to execute it using the above function it fails.
    Here is the exact error :

    ----------------------------------------
    21/9/2014 , 19:48:50

    COMMAND:
    ffmpeg -i "/path/old_song.m4a" "/path/new_song.mp3"

    OUTPUT:


    ERRORS:
    ffmpeg version 2.2.3 Copyright (c) 2000-2014 the FFmpeg developers
     built on Jun  9 2014 08:01:43 with gcc 4.9.0 (GCC) 20140521 (prerelease)
     configuration: --prefix=/usr --disable-debug --disable-static --enable-avisynth --enable-avresample --enable-dxva2 --enable-fontconfig --enable-gnutls --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-pic --enable-postproc --enable-runtime-cpudetect --enable-shared --enable-swresample --enable-vdpau --enable-version3 --enable-x11grab
     libavutil      52. 66.100 / 52. 66.100
     libavcodec     55. 52.102 / 55. 52.102
     libavformat    55. 33.100 / 55. 33.100
     libavdevice    55. 10.100 / 55. 10.100
     libavfilter     4.  2.100 /  4.  2.100
     libavresample   1.  2.  0 /  1.  2.  0
     libswscale      2.  5.102 /  2.  5.102
     libswresample   0. 18.100 /  0. 18.100
     libpostproc    52.  3.100 / 52.  3.100
    "/path/old_song.m4a": No such file or directory
    Conversion failed!

    ----------------------------------------

    ...and as you can think of - the file exists.

    I think there is something in passing the command to Popen.communicate but I don’t know exactly.

    Kind regards,

    Teodor D.
    PS : I’m passing the command to Executor.execute as Python list.

    PSS : Calling the Executor.execute :

    def process_conversion(self):
       for song in self.files_to_convert:
           current_format = song.rsplit('.', 1)[-1]

           old_file = '"{}{}{}"'.format(self.target_dir, os.sep, song)
           new_file = '"{}{}{}"'.format(self.target_dir, os.sep,
                                        song.replace(current_format, 'mp3'))

           command = ["ffmpeg", "-i", old_file, new_file]
           Executor.execute(command)
  • mlpdec : support TrueHD streams with an Atmos substream

    21 septembre 2014, par Hendrik Leppkes
    mlpdec : support TrueHD streams with an Atmos substream
    

    The fourth substream is being discarded, since its not raw audio data,
    but an encoded Atmos stream which needs a specialized decoder.

    Fixes decoding of the true hd stream from Transformers\ -\ Age\ of\ Extinction\ 2014\ 1080P-003.mkv

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

    • [DH] libavcodec/mlp.h
    • [DH] libavcodec/mlpdec.c
  • End of Piwik Mobile 1 – Focus is on Piwik Mobile 2

    2 septembre 2014, par Piwik Core Team — Community, Piwik Mobile Releases

    More than four years after its initial release, we will remove Piwik Mobile 1 from the Apple App Store and Google Play Store in one week. During that time the app was downloaded more than 60.000 times with an average rating of 4.6 and over 2000 ratings. Thank you to our community of users for all of this !

    Why we must focus on Piwik Mobile 2

    Unfortunately we do not have the resources to maintain Piwik Mobile 1 to be compatible with the latest iOS and Android updates (namely iOS 8 and Android L). The last update of Piwik Mobile 1 was over one year ago and the underlying framework, which we are using to develop the app, is nearly two years old. Making the code compatible with the current version of the underlying framework to support the latest platform versions would take us many weeks. As a little background : From the beginning Piwik Mobile 1 has been a free app and was developed by a single person Thomas in his spare time who is now focussing on Piwik Mobile 2.

    Can I still get it ?

    We are announcing this today so you get a chance to install the app via the Apple App Store and Google Play Store while it is still available.

    If you are one of the 87% of our Piwik Mobile 1 users who are already using Android 4+ or iOS 7+ then you can install Piwik Mobile 2 (make sure you upgrade your Piwik platform to 1.12 or 2.x recommended).

    What happens after the app is removed ?

    If you have already installed the app it won’t be removed from your device and you will still be able to use it. Android users can still download Piwik Mobile 1 but we cannot guarantee it will work on all devices. Lastly the code our free software is available on GitHub and you can build it from the source if you have to.

    The future of Piwik Mobile

    Piwik Mobile version 2.1 is currently in beta testing phase. This new version includes several useful new features such as support for Segmentation. If you use Android, give it a try !