Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (58)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • 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

Sur d’autres sites (9814)

  • Python : How to decode a mp3 chunk into PCM samples ?

    30 mars 2021, par Bendzko

    I'm trying to catch chunks of an mp3 webstream and decoding them into PCM samples for signal processing. I tried to catch the audio via requests and io.BytesIO to save the data as .wav file.

    



    I have to convert the mp3 data to wav data, but I don't know how. (My goal is not to record a .wav file, i am just doing this to test the algorithm.)

    



    I found the pymedia lib, but it is very old (last commit in 2006), using python 2.7 and for me not installable.

    



    Maybe it is possible with ffmpeg-python, but I have just seen examples using files as input and output.

    



    Here's my code :

    



    import requests
import io
import soundfile as sf
import struct
import wave
import numpy as np


def main():
    stream_url = r'http://dg-wdr-http-dus-dtag-cdn.cast.addradio.de/wdr/1live/diggi/mp3/128/stream.mp3'
    r = requests.get(stream_url, stream=True)
    sample_array = []
    try:
        for block in r.iter_content(1024):
            data, samplerate = sf.read(io.BytesIO(block), format="RAW", channels=2, samplerate=44100, subtype='FLOAT',
                                       dtype='float32')
            sample_array = np.append(sample_array, data)

    except KeyboardInterrupt:
        print("...saving")
        obj = wave.open('sounds/stream1.wav', 'w')
        obj.setnchannels(1)  # mono
        obj.setsampwidth(2)  # bytes
        obj.setframerate(44100)

        data_max = np.nanmax(abs(sample_array))

        # fill WAV with samples from sample_array
        for sample in sample_array:
            if (np.isnan(sample) or np.isnan(32760 * sample / data_max)) is True:
                continue
            try:
                value = int(32760 * sample / data_max)  # normalization INT16
            except ValueError:
                value = 1
            finally:
                data = struct.pack('code>

    



    Do you have an idea how to handle this problem ?

    


  • swscale : fix gbrap16 alpha channel issues

    3 août 2017, par James Cowgill
    swscale : fix gbrap16 alpha channel issues
    

    Fixes filter-pixfmts-scale test failing on big-endian systems due to
    alpSrc not being cast to (const int32_t**).

    Also fixes distortions in the output alpha channel values by copying the
    alpha channel code from the rgba64 case found elsewhere in output.c.

    Fixes ticket 6555.

    Signed-off-by : James Cowgill <James.Cowgill@imgtec.com>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libswscale/output.c
    • [DH] tests/ref/fate/filter-pixfmts-scale
  • Python : How to decode a mp3 chunk from webstream to .wav samples ?

    13 novembre 2019, par Bendzko

    I’m trying to catch chunks of an mp3 webstream and decoding them into wav samples for signal processing. I tried to catch the audio via requests and io.BytesIO to save the data as .wav file.
    I have to convert the mp3 data to wav data, but I don’t know how. (My goal is not to record a .wav file, i am just doing this to test the algorithm.)

    I found the pymedia lib, but it is very old (last commit in 2006), using python 2.7 and for me not installable.

    Maybe it is possible with ffmpeg-python, but I have just seen examples using files as input and output.

    Here’s my code :

    import requests
    import io
    import soundfile as sf
    import struct
    import wave
    import numpy as np


    def main():
       stream_url = r'http://dg-wdr-http-dus-dtag-cdn.cast.addradio.de/wdr/1live/diggi/mp3/128/stream.mp3'
       r = requests.get(stream_url, stream=True)
       sample_array = []
       try:
           for block in r.iter_content(1024):
               data, samplerate = sf.read(io.BytesIO(block), format="RAW", channels=2, samplerate=44100, subtype='FLOAT',
                                          dtype='float32')
               sample_array = np.append(sample_array, data)

       except KeyboardInterrupt:
           print("...saving")
           obj = wave.open('sounds/stream1.wav', 'w')
           obj.setnchannels(1)  # mono
           obj.setsampwidth(2)  # bytes
           obj.setframerate(44100)

           data_max = np.nanmax(abs(sample_array))

           # fill WAV with samples from sample_array
           for sample in sample_array:
               if (np.isnan(sample) or np.isnan(32760 * sample / data_max)) is True:
                   continue
               try:
                   value = int(32760 * sample / data_max)  # normalization INT16
               except ValueError:
                   value = 1
               finally:
                   data = struct.pack('code>

    Do you have an idea how to handle this problem ?