Recherche avancée

Médias (91)

Autres articles (108)

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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (11809)

  • Unable to use Multithread for librosa melspectrogram

    15 avril 2019, par Raven Cheuk

    I have over 1000 audio files (it’s just a initial development, in the future, there will be even more audio files), and would like to convert them to melspectrogram.

    Since my workstation has a Intel® Xeon® Processor E5-2698 v3, which has 32 threads, I would like to use multithread to do my job.

    My code

    import os
    import librosa
    from librosa.display import specshow
    from natsort import natsorted
    import numpy as np
    import sys
    # Libraries for multi thread
    from multiprocessing.dummy import Pool as ThreadPool
    import subprocess
    pool = ThreadPool(20)

    songlist = os.listdir('../opensmile/devset_2015/')
    songlist= natsorted(songlist)

    def get_spectrogram(song):
       print("start")
       y, sr = librosa.load('../opensmile/devset_2015/' + song)

       ## Add some function to cut y
       y_list = y
       ##

       for i, y_i in enumerate([y_list]): # can remove for loop if no audio is cut
           S = librosa.feature.melspectrogram(y=y, sr=sr, n_mels=128,fmax=8000)
           try:
               np.save('./Test/' + song + '/' + str(i), S)
           except:
               os.makedirs('./Test/' + song)
               np.save('./Test/' + song + '/' + str(i), S)
           print("done saving")

    pool.map(get_spectrogram, songlist)

    My Problem

    However, my script freezes after finished the first conversion.

    To debug what’s going on, I commented out S = librosa.feature.melspectrogram(y=y, sr=sr, n_mels=128,fmax=8000) and replace it by S=0.
    Then the multi-thread code works fine.

    What’s wrong with the librosa.feature.melspectrogram function ? Does it not support multi-thread ? Or is it a problem of ffmpeg ? (When using librosa, it asks me to install ffmpeg before.)

  • FFmpeg seems to be version conflict

    4 novembre 2014, par user3177342

    I am using git version of ffmpeg( renewed after old version succesful using) , when i try to compile my project i get

    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_subpacket':
    /home/user/projects/ffmpleglast/ffmpeg/libavcodec/opusdec.c:376: undefined reference to `swr_is_initialized'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_frame':
    /home/user/projects/ffmpleglast/ffmpeg/libavcodec/opusdec.c:222: undefined reference to `swr_is_initialized'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_init_resample':
    /home/user/projects/ffmpleglast/ffmpeg/libavcodec/opusdec.c:163: undefined reference to `swr_init'
    /home/user/projects/ffmpleglast/ffmpeg/libavcodec/opusdec.c:169: undefined reference to `swr_convert'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_frame':
    /home/user/projects/ffmpleglast/ffmpeg/libavcodec/opusdec.c:236: undefined reference to `swr_convert'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_flush_resample':
    /home/user/projects/ffmpleglast/ffmpeg/libavcodec/opusdec.c:117: undefined reference to `swr_convert'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_subpacket':
    /home/user/projects/ffmpleglast/ffmpeg/libavcodec/opusdec.c:408: undefined reference to `swr_close'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_flush':
    /home/user/projects/ffmpleglast/ffmpeg/libavcodec/opusdec.c:557: undefined reference to `swr_close'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_close':
    /home/user/projects/ffmpleglast/ffmpeg/libavcodec/opusdec.c:579: undefined reference to `swr_free'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_init':
    /home/user/projects/ffmpleglast/ffmpeg/libavcodec/opusdec.c:629: undefined reference to `swr_alloc'

    Seems to be version conflict ? but how to delete wrong libs ? they seem to be todays build.

    ls -l /usr/local/lib
    -rw-r--r-- 1 root root  136509684 may   29 14:47 libavcodec.a
    -rw-r--r-- 1 root root    1853574 may   29 14:47 libavdevice.a
    -rw-r--r-- 1 root root    9689456 may   29 14:47 libavfilter.a
    -rw-r--r-- 1 root root   46282270 may   29 14:47 libavformat.a
    -rw-r--r-- 1 root root    2092250 may   29 14:47 libavutil.a
    -rw-r--r-- 1 root root      67942 may   12 11:29 libBasicUsageEnvironment.a
    -rw-r--r-- 1 root root    2200164 apr.  10 10:11 libfftw3.a
    -rwxr-xr-x 1 root root        872 apr.  10 10:11 libfftw3.la
    -rw-r--r-- 1 root root      94188 may   12 11:29 libgroupsock.a
    -rw-r--r-- 1 root root    2236084 may   12 11:29 libliveMedia.a
    -rw-r--r-- 1 root root     546506 may   29 14:47 libswresample.a
    -rw-r--r-- 1 root root    4813716 may   29 14:47 libswscale.a
    -rw-r--r-- 1 root root      14588 may   12 11:29 libUsageEnvironment.a
  • FFMPEG draw text with change over time [duplicate]

    18 avril 2020, par bleepbloopbleep

    Hi i am working on a project that will get metadata from an mp3 file and then stream the file with text displaying the Artist Name and Song Title from the metadata.

    



    In order to get around a bug I concatenated the audio files into one larger file and got the meta data from each track before the concatenation.

    



    While streaming I want to display the artist name and song title while the track is playing.

    



    The current text script for just the text looks like this :

    



    drawtext=text='Artist: ARTISTNAME:fontfile=PATH/TO/FONT/FILE:fontsize=(w * 0.03333333333333333):bordercolor=#000000:borderw=1:fontcolor=#FFFFFF:y=(h * 0.15):x=(w * 0.02),drawtext=text='Song: NAME’OFSONG:fontfile=PATH/TO/FONT/FILE:fontsize=(w * 0.03333333333333333):bordercolor=#000000:borderw=1:fontcolor=#FFFFFF:y=(h * 0.25):x=(w * 0.02)"


    



    How can I add time duration element to the FFMEG script ?

    



    Thanks !