
Recherche avancée
Autres articles (22)
-
Publier sur MédiaSpip
13 juin 2013Puis-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 -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...)
Sur d’autres sites (8352)
-
Python : How to decode a mp3 chunk from webstream to .wav samples ?
13 novembre 2019, par BendzkoI’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 ?
-
Python : How to convert a mp3 chunk from webstream to .wav samples ?
13 novembre 2019, par BendzkoI’m trying to catch chunks of an mp3 webstream and coverting 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.
But I think, that 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 ?
-
lavc : support AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE in all no-delay encoders
27 novembre 2022, par Anton Khirnovlavc : support AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE in all no-delay encoders
Including fake-delay encoders marked with FF_CODEC_CAP_EOF_FLUSH.
- [DH] libavcodec/ac3enc_fixed.c
- [DH] libavcodec/ac3enc_float.c
- [DH] libavcodec/adpcmenc.c
- [DH] libavcodec/adxenc.c
- [DH] libavcodec/alacenc.c
- [DH] libavcodec/aliaspixenc.c
- [DH] libavcodec/aptxenc.c
- [DH] libavcodec/asvenc.c
- [DH] libavcodec/avuienc.c
- [DH] libavcodec/bitpacked_enc.c
- [DH] libavcodec/bmpenc.c
- [DH] libavcodec/cfhdenc.c
- [DH] libavcodec/cinepakenc.c
- [DH] libavcodec/cljrenc.c
- [DH] libavcodec/cngenc.c
- [DH] libavcodec/dcaenc.c
- [DH] libavcodec/dfpwmenc.c
- [DH] libavcodec/dnxhdenc.c
- [DH] libavcodec/dvenc.c
- [DH] libavcodec/eac3enc.c
- [DH] libavcodec/encode.c
- [DH] libavcodec/encode.h
- [DH] libavcodec/exrenc.c
- [DH] libavcodec/ffv1enc.c
- [DH] libavcodec/fitsenc.c
- [DH] libavcodec/flacenc.c
- [DH] libavcodec/flashsv2enc.c
- [DH] libavcodec/flashsvenc.c
- [DH] libavcodec/flvenc.c
- [DH] libavcodec/g722enc.c
- [DH] libavcodec/g723_1enc.c
- [DH] libavcodec/g726.c
- [DH] libavcodec/gif.c
- [DH] libavcodec/h261enc.c
- [DH] libavcodec/hapenc.c
- [DH] libavcodec/hdrenc.c
- [DH] libavcodec/huffyuvenc.c
- [DH] libavcodec/ituh263enc.c
- [DH] libavcodec/j2kenc.c
- [DH] libavcodec/jpeglsenc.c
- [DH] libavcodec/lclenc.c
- [DH] libavcodec/libcodec2.c
- [DH] libavcodec/libgsmenc.c
- [DH] libavcodec/libilbc.c
- [DH] libavcodec/libjxlenc.c
- [DH] libavcodec/libopenh264enc.c
- [DH] libavcodec/libopenjpegenc.c
- [DH] libavcodec/libvo-amrwbenc.c
- [DH] libavcodec/libwebpenc.c
- [DH] libavcodec/libxvid.c
- [DH] libavcodec/ljpegenc.c
- [DH] libavcodec/magicyuvenc.c
- [DH] libavcodec/mjpegenc.c
- [DH] libavcodec/mpegaudioenc_fixed.c
- [DH] libavcodec/mpegaudioenc_float.c
- [DH] libavcodec/msmpeg4enc.c
- [DH] libavcodec/msvideo1enc.c
- [DH] libavcodec/pamenc.c
- [DH] libavcodec/pcm-blurayenc.c
- [DH] libavcodec/pcm-dvdenc.c
- [DH] libavcodec/pcm.c
- [DH] libavcodec/pcxenc.c
- [DH] libavcodec/pngenc.c
- [DH] libavcodec/pnmenc.c
- [DH] libavcodec/proresenc_anatoliy.c
- [DH] libavcodec/proresenc_kostya.c
- [DH] libavcodec/qoienc.c
- [DH] libavcodec/qtrleenc.c
- [DH] libavcodec/r210enc.c
- [DH] libavcodec/rawenc.c
- [DH] libavcodec/roqvideoenc.c
- [DH] libavcodec/rpzaenc.c
- [DH] libavcodec/rv10enc.c
- [DH] libavcodec/rv20enc.c
- [DH] libavcodec/s302menc.c
- [DH] libavcodec/sbcenc.c
- [DH] libavcodec/sgienc.c
- [DH] libavcodec/smcenc.c
- [DH] libavcodec/snowenc.c
- [DH] libavcodec/sonic.c
- [DH] libavcodec/speedhqenc.c
- [DH] libavcodec/sunrastenc.c
- [DH] libavcodec/svq1enc.c
- [DH] libavcodec/targaenc.c
- [DH] libavcodec/tiffenc.c
- [DH] libavcodec/ttaenc.c
- [DH] libavcodec/utvideoenc.c
- [DH] libavcodec/v210enc.c
- [DH] libavcodec/v308enc.c
- [DH] libavcodec/v408enc.c
- [DH] libavcodec/v410enc.c
- [DH] libavcodec/vaapi_encode_mjpeg.c
- [DH] libavcodec/vbnenc.c
- [DH] libavcodec/vc2enc.c
- [DH] libavcodec/wavpackenc.c
- [DH] libavcodec/wbmpenc.c
- [DH] libavcodec/wmaenc.c
- [DH] libavcodec/wmv2enc.c
- [DH] libavcodec/wrapped_avframe.c
- [DH] libavcodec/xbmenc.c
- [DH] libavcodec/xfaceenc.c
- [DH] libavcodec/xwdenc.c
- [DH] libavcodec/y41penc.c
- [DH] libavcodec/yuv4enc.c
- [DH] libavcodec/zmbvenc.c