Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (39)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

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

  • Failed to hard-ware accelerate video decoding via Tesla P40

    20 mai 2018, par Potemkin

    While I am writing a surveillance video recognition demo, I find it is much slower to simply play a video in the server(Xeon E5-2680 2.4GHz, Tesla P40) than in my laptop(i7-8550 1.8GHz, Intel UHD Graphics 620).

    I use DXVA-Checker to see the video decoder device, and notice that my laptop use the GPU for decoding, but the server use no GPU for the job. Then I check ’nvidia-smi’, and it shows all of GPUs are running in TCC driver model, not WDDM driver model. And I cannot turn it to WDDM because nvidia-smi says it is not supported.

    The video play demo is written via OPENCV, in which the video decoding part is from ffmpeg. The server runs in Windows-server-2012, and my laptop is on Windows 10.

    The question is how can I get the server decoding videos with GPUs, and is this the reason for the slowness or there is something else ?

  • demucs.api or demucs.pretrained aren't working

    9 décembre 2023, par user22801597

    I created my environment and installed several packages for CUDA 11.8.0 (including demucs, pytorch, torchaudio, ffmpeg...). I want to separate a track with demucs with a python code in spyder (i don't want to do it on the anaconda prompt) however I've tried several codes and they seem not be working. I get errors like :

    


      

    • AttributeError : module 'demucs' has no attribute 'Separator' (1)
    • 


    • ImportError : cannot import name 'load_pretrained' from 'demucs.pretrained' (2) (C :\Users\User\anaconda3\envs\Pytorch\Lib\site-packages\demucs\pretrained.py)
    • 


    • ModuleNotFoundError : No module named 'demucs.api' (3)
    • 


    • ModuleNotFoundError : No module named 'demucs.model'(4)
    • 


    


    So through the errors I assume my demucs package isn't working correctly but I don't know why. I've done the following (I'Ve found this either in google or in chatgpt) :

    


      

    • Checked Library Versions
    • 


    • Upgraded demucs and other packages
-deinstalled and reinstalled it
Can someone please help me to solve this ? What am I doing worng or why is demucs not working correctly ?
    • 


    


    This are the different codes I tested according to their errors above :

    


    (1)

    


       import demucs
   separator = demucs.Separator()
   model = demucs.load_pretrained('demucs')
   audio_sources = separator.separate('Zweite_Aufnahme_mit_Piano.wav')
   for source_name, source_audio in audio_sources.items():
       source_audio.to_file(source_name + '.wav')



    


    (2)

    


       import torchaudio
   from demucs.pretrained import load_pretrained
   import soundfile as sf
   import os

   input_audio_file = 'Zweite_Aufnahme_mit_Piano.wav'
   output_directory = 'Separated_audios'

   model = load_pretrained('demucs_quantized')

   audio, _ = torchaudio.load(input_audio_file)

   sources = model(audio)

   os.makedirs(output_directory, exist_ok=True)

   for i, source in enumerate(sources):
       source_path = os.path.join(output_directory, f'source_{i}.wav')
       sf.write(source_path, source[0].numpy(), 44100)

   print("Source separation complete. Separated sources saved in the output directory.")



    


    (3)

    


       from pydub import AudioSegment
   import IPython
   import numpy as np
   import demucs.api
   import pathlib
   import torch

   audiosegment = AudioSegment.from_mp3("Zweite_Aufnahme_mit_Piano.wav")
   arr = audiosegment.get_array_of_samples()
   sr = audiosegment.frame_rate
   ch = audiosegment.channels
   aac = np.array(arr, dtype=np.float32).reshape((-1, ch))
   aac = aac[30*sr:40*sr,:]
   IPython.display.Audio(aac[:, 0], rate=sr)

   separator = demucs.api.Separator()
   model = separator.load_model()
   input = torch.from_numpy(aac.reshape((ch, -1)))
   separator.add_track("born", input)
   separated = separator.separate_loaded_audio()
   for (file, stems) in separated:
       for stem, waveform in stems.items():
         print(stem)
         print(waveform.shape)
         aac_again = waveform.numpy().reshape((-1, ch))
         IPython.display.display(IPython.display.Audio(aac_again[:,0], rate=sr))



    


    (4)

    


       import torchaudio
   from demucs.model import load_pretrained

   audio, sample_rate = torchaudio.load('Zweite_Aufnahme_mit_Piano.wav')
   model = load_pretrained('demucs')
   separated_sources = model(audio)
   torchaudio.save('vocals.wav', separated_sources['vocals'], sample_rate)
   torchaudio.save('accompaniment.wav', separated_sources['accompaniment'], sample_rate)
   torchaudio.save('drums.wav', separated_sources['drums'], sample_rate)
   torchaudio.save('bass.wav', separated_sources['bass'], sample_rate)


    


  • Anomalie #3318 (Fermé) : Problème sur le filtre extraire_multi

    31 octobre 2014, par cedric -

    Corrigé, le patch etait inexact car il faut bien typographier en fr dans le cas ou on prend fr au lieu de la langue courante