Recherche avancée

Médias (91)

Autres articles (102)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (12659)

  • Trying to convert an mp3 file to a Numpy Array, and ffmpeg just hangs

    5 juillet 2016, par Rich

    I’m working on a music classification methodology with Scikit-learn, and the first step in that process is converting a music file to a numpy array.

    After unsuccessfully trying to call ffmpeg from a python script, I decided to simply pipe the file in directly :

    FFMPEG_BIN = "ffmpeg"
    cwd = (os.getcwd())
    dcwd = (cwd + "/temp")
    if not os.path.exists(dcwd): os.makedirs(dcwd)

    folder_path = sys.argv[1]
    f = open("test.txt","a")

    for f in glob.glob(os.path.join(folder_path, "*.mp3")):
       ff = f.replace("./", "/")
       print("Name: " + ff)
       aa = (cwd + ff)

       command = [ FFMPEG_BIN,
           '-i',  aa,
           '-f', 's16le',
           '-acodec', 'pcm_s16le',
           '-ar', '22000', # ouput will have 44100 Hz
           '-ac', '1', # stereo (set to '1' for mono)
           '-']

       pipe = sp.Popen(command, stdout=sp.PIPE, bufsize=10**8)
       raw_audio = pipe.proc.stdout.read(88200*4)
       audio_array = numpy.fromstring(raw_audio, dtype="int16")
       print (str(audio_array))
       f.write(audio_array + "\n")

    The problem is, when I run the file, it starts ffmpeg and then does nothing :

    [mp3 @ 0x1446540] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '/home/don/Code/Projects/MC/Music/Spaz.mp3':
     Metadata:
       title           : Spaz
       album           : Seeing souns
       artist          : N*E*R*D
       genre           : Hip-Hop
       encoder         : Audiograbber 1.83.01, LAME dll 3.96, 320 Kbit/s, Joint Stereo, Normal quality
       track           : 5/12
       date            : 2008
     Duration: 00:03:50.58, start: 0.000000, bitrate: 320 kb/s
       Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Output #0, s16le, to 'pipe:':
     Metadata:
       title           : Spaz
       album           : Seeing souns
       artist          : N*E*R*D
       genre           : Hip-Hop
       date            : 2008
       track           : 5/12
       encoder         : Lavf56.4.101
       Stream #0:0: Audio: pcm_s16le, 22000 Hz, mono, s16, 352 kb/s
       Metadata:
         encoder         : Lavc56.1.100 pcm_s16le
    Stream mapping:
     Stream #0:0 -> #0:0 (mp3 (native) -> pcm_s16le (native))
    Press [q] to stop, [?] for help

    It just sits there, hanging, for far longer than the song is. What am I doing wrong here ?,

  • python ff-mpeg not working on VM

    2 août 2013, par Bob

    I have two Windows 2008 R2 64 bit servers with two different host providers (GoDaddy and company B). My python script runs successfully on GoDaddy's server. It doesn't run successfully on the server with company B.

    I installed the same software on both servers :

    • Python 2.7 for Windows 32 bit
    • NumPY module
    • SetupTools
    • EchoNest API for Windows

    The company B server is giving me an error related to an executable called en-ffmpeg.exe that uses the python ff-mpeg module. The exact error message is

    [dv @ 0x1449690]Can't determine profile of DV input stream.
    C :\Music\song1.mp3 : Error while opening file

    The song.mp3 file exists. I installed the latest Windows updates on the server with Company B but still I get the error. I believe the error is because something is not configured properly on this server (missing libraries or drivers ?). However, I don't know what that is !

    Please help :)

    UPDATED TO INCLUDE COMMAND AND ERROR OUTPUT FROM FFMPEG

    COMMAND :

    c :\Python27>en-ffmpeg -i "C :\Music\song1.mp3" -y -ac 2 -ar 44100
    "c :\users\x07 dmini 1\x07ppdata\local\temp\x02\tmpax82jf.wav"

    FULL ERROR :

    FFmpeg version SVN-r17988-Komeil, Copyright (c) 2000-2009 Fabrice Bellard, et al
    .
     configuration: --enable-memalign-hack --extra-cflags=-fno-common --enable-stat
    ic --disable-shared --disable-debug --enable-gpl --enable-nonfree --enable-avfil
    ter --enable-avfilter-lavf --enable-avisynth --enable-postproc --enable-pthreads
    --enable-libamr-nb --enable-libamr-wb --enable-libgsm --enable-libfaac --enable
    -libfaad --enable-libmp3lame --enable-libschroedinger --enable-libspeex --enable
    -libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
     libavutil     50. 0. 0 / 50. 0. 0
     libavcodec    52.21. 0 / 52.21. 0
     libavformat   52.31. 1 / 52.31. 1
     libavdevice   52. 1. 0 / 52. 1. 0
     libavfilter    0. 4. 0 /  0. 4. 0
     libswscale     0. 7. 1 /  0. 7. 1
     libpostproc   51. 2. 0 / 51. 2. 0
     built on Mar 15 2009 18:16:31, gcc: 4.3.0 20080305 (alpha-testing) mingw-20080
    502
    [dv @ 0x1449690]Can't determine profile of DV input stream.
    C:\\Music\\song1.mp3: Error while opening file

    I also tried removing the double back slashes from the command but got the same error.

  • Pydub unable to locte ffprobe

    22 décembre 2020, par Recessive

    First of all, here is the link to a similar question to this : Pydub (WindowsError : [Error 2] The system can not find the file specified)
Although in this one the problem is with ffmpeg, which I solved by setting the absolute path.

    



    After setting the absolute path for converter and/or ffmpeg with either :

    



    AudioSegment.converter = r'C:\ffmpeg\bin'

    



    or

    



    AudioSegment.ffmpeg = r'C:\ffmpeg\bin'

    



    I still get this error :

    



    


    C :\Program Files\Python36\lib\site-packages\pydub\utils.py:193 : RuntimeWarning : Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
 warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
 Traceback (most recent call last) :
 File "C :/Users/Sean/Desktop/vp/encode_audio/m4a_to_wav.py", line 4, in 
 song = AudioSegment.from_file("pines.m4a", "m4a")
 File "C :\Program Files\Python36\lib\site-packages\pydub\audio_segment.py", line 660, in from_file
 info = mediainfo_json(orig_file)
 File "C :\Program Files\Python36\lib\site-packages\pydub\utils.py", line 263, in mediainfo_json
 res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
 File "C :\Program Files\Python36\lib\subprocess.py", line 707, in init
 restore_signals, start_new_session)
 File "C :\Program Files\Python36\lib\subprocess.py", line 990, in _execute_child
 startupinfo)
 FileNotFoundError : [WinError 2] The system cannot find the file specified`

    


    



    I have ffmpeg in my path envvar. I also have libav in my path envvar, and installed libav and then pydub in the order specified at https://github.com/jiaaro/pydub#dependencies.

    



    Nothing I'm doing appears to be working, so any ideas or solutions would be greatly appreciated !