
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (108)
-
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 -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (14816)
-
How to read a MP3 audio file into a numpy array / save a numpy array to MP3 ?
15 juin 2021, par BasjIs there a way to read/write a MP3 audio file into/from a
numpy
array with a similar API to scipy.io.wavfile.read and scipy.io.wavfile.write :


sr, x = wavfile.read('test.wav')
wavfile.write('test2.wav', sr, x)




?



Note :
pydub
'sAudioSegment
object doesn't give direct access to a numpy array.


PS : I have already read Importing sound files into Python as NumPy arrays (alternatives to audiolab), tried all the answers, including those which requires to
Popen
ffmpeg and read the content from stdout pipe, etc. I have also read Trying to convert an mp3 file to a Numpy Array, and ffmpeg just hangs, etc., and tried the main answers, but there was no simple solution. After spending hours on this, I'm posting it here with "Answer your own question – share your knowledge, Q&A-style". I have also read How to create a numpy array from a pydub AudioSegment ? but this does not easily cover the multi channel case, etc.

-
Revision f8630c78d1 : configure : remove php test + the remnants in the build system & README the doc
10 mai 2014, par James ZernChanged Paths :
Modify /README
Modify /configure
Modify /docs.mk
configure : remove php test+ the remnants in the build system & README
the documentation that required php was removed in :
50fa585 Removing examples code generation and making them static.Change-Id : Ibf00dca9ab2715fc21e8de358807b63d1445662c
-
FFMPEG width not divisible by 2 (639x360)
5 octobre 2020, par yasgur99I am using python wrapper command of ffmepeg. I followed the tutorial from here for a "Production ready HLS" : https://docs.peer5.com/guides/production-ready-hls-vod/


This is my code :


subprocess.call(['ffmpeg', '-y', '-i', download_path,
 '-vf', 'scale=w=640:h=360:force_original_aspect_ratio=decrease', \
 '-c:a', 'aac', '-ar', '48000', '-c:v', 'h264', \
 '-profile:v', 'main', '-crf', '20', '-sc_threshold', '0', \
 '-g', '48', '-keyint_min', '48', '-hls_time', '4', \
 '-hls_playlist_type', 'vod', '-b:v', '800k', \
 '-maxrate', '856k', '-bufsize', '1200k', '-b:a', '96k', \
 '-hls_segment_filename', upload_path + \
 '/360p_%03d.ts', upload_path + '/360p.m3u8', \
 '-vf', 'scale=w=842:h=480:force_original_aspect_ratio=decrease', \
 '-c:a', 'aac', '-ar', '48000', '-c:v', 'h264', \
 '-profile:v', 'main', '-crf', '20', '-sc_threshold', '0', \
 '-g', '48', '-keyint_min', '48', '-hls_time', '4', \
 '-hls_playlist_type', 'vod', '-b:v', '1400k', \
 '-maxrate', '1498k', '-bufsize', '2100k', '-b:a', '128k', \
 '-hls_segment_filename', upload_path + \
 '/480p_%03d.ts', upload_path + '/480p.m3u8', \
 '-vf', 'scale=w=1280:h=720:force_original_aspect_ratio=decrease', \
 '-c:a', 'aac', '-ar', '48000', '-c:v', 'h264', \
 '-profile:v', 'main', '-crf', '20', '-sc_threshold', '0', \
 '-g', '48', '-keyint_min', '48', '-hls_time', '4', \
 '-hls_playlist_type', 'vod', '-b:v', '2800k', \
 '-maxrate', '2996k', '-bufsize', '4200k', '-b:a', '128k', \
 '-hls_segment_filename', upload_path + \
 '/720p_%03d.ts', upload_path + '/720p.m3u8', \
 '-vf', 'scale=w=1920:h=1080:force_original_aspect_ratio=decrease', \
 '-c:a', 'aac', '-ar', '48000', '-c:v', 'h264', \
 '-profile:v', 'main', '-crf', '20', '-sc_threshold', '0', \
 '-g', '48', '-keyint_min', '48', '-hls_time', '4', \
 '-hls_playlist_type', 'vod', '-b:v', '5000k', \
 '-maxrate', '5350k', '-bufsize', '7500k', '-b:a', '192k', \
 '-hls_segment_filename', upload_path + '/1080p_%03d.ts', upload_path + '/1080p.m3u8'])



And getting this output


[libx264 @ 0x7fb95500c800] width not divisible by 2 (639x360)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height



Any ideas of whats going wrong ?