Recherche avancée

Médias (1)

Mot : - Tags -/publishing

Autres articles (29)

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

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

Sur d’autres sites (7449)

  • lavfi : make vf_colorspace use functions from colorspace.c

    19 juin 2018, par Ruiling Song
    lavfi : make vf_colorspace use functions from colorspace.c
    

    These functions are shared among colorspace related filters.

    Signed-off-by : Ruiling Song <ruiling.song@intel.com>

    • [DH] libavfilter/Makefile
    • [DH] libavfilter/vf_colorspace.c
  • 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)
  • Youtube-dl convert to MP3 multi cores [on hold]

    1er janvier 2017, par Top Games a-Z

    Do you know how to tell to youtube-dl to use all cpu cores when convert music (using ffmpeg) to mp3 ? Because it downloads the song but when it has to convert it uses just one core. Thank you.