
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (83)
-
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 -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette 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. -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (7647)
-
Evolution #3791 (Nouveau) : Driver generic acces base de données
5 juin 2016, par Alain G.J’ai commencé à travailler sur la mise en place d’un système générique de driver en utilisant la POO et permettant d’envisager plusieurs types de connexion à une base de données.
Cette proposition conserve l’interface standard définie dans SPIP (abstract_sql.php)
En PJ une archive avec l’état actuel (qui marche à peu près bien que non totalement testé) et qui permet d’utiliser au choix mysqli ou PDO). Cette piste mérite-t-elle d’être creusée ?
-
avcodec/libopus : support disabling phase inversion.
5 février 2018, par Menno -
ffmpeg : Downmixing 5.1 to stereo with phase invert
1er novembre 2022, par anti-heroI'd like to use ffmpeg and Dolby Logic Pro II formula to downmix a 5.1 song to stereo :




Lt = L + (–3 dB × C) – (–1.2 dB × Ls) – (–6.2 dB × Rs)


Rt = R + (–3 dB × C) + (–6.2 dB × Ls) + (–1.2 dB × Rs)




I came up with this long and probably redundant bash script :


# L channel
ffmpeg -i "$filename" -map_channel 0.1.0 -c:a pcm_f32le L.wav
ffmpeg -i "$filename" -map_channel 0.1.2 -filter:a "volume=-3dB" -c:a pcm_f32le C.wav
ffmpeg -i "$filename" -map_channel 0.1.4 -af "volume=-1.2dB" -c:a pcm_f32le Ls.wav
ffmpeg -i "$filename" -map_channel 0.1.5 -af "volume=-6.2dB" -c:a pcm_f32le Rs.wav
ffmpeg -i Ls.wav -af "aeval=-val(0)" -c:a pcm_f32le Lsi.wav
ffmpeg -i Rs.wav -af "aeval=-val(0)" -c:a pcm_f32le Rsi.wav
ffmpeg -i L.wav -i C.wav -i Lsi.wav -i Rsi.wav -filter_complex "amix=inputs=4" -c:a pcm_f32le L_final.wav
rm L.wav Ls.wav Rs.wav Lsi.wav Rsi.wav

# R channel
ffmpeg -i "$filename" -map_channel 0.1.1 -c:a pcm_f32le R.wav
ffmpeg -i "$filename" -map_channel 0.1.4 -filter:a "volume=-6.2dB" -c:a pcm_f32le Ls.wav
ffmpeg -i "$filename" -map_channel 0.1.5 -filter:a "volume=-1.2dB" -c:a pcm_f32le Rs.wav
ffmpeg -i R.wav -i C.wav -i Ls.wav -i Rs.wav -filter_complex "amix=inputs=4" -c:a pcm_f32le R_final.wav
rm R.wav C.wav Ls.wav Rs.wav

# Mix
ffmpeg -i L_final.wav -i R_final.wav -filter_complex "[0:0][1:0] amerge=inputs=2" -c:a pcm_f32le "${filename%.*}_dm.wav"
rm L_final.wav R_final.wav



Would this work ? And is there a simpler way to do this ?


update : I also wrote Python code for the 90 degree phase shift version.


import scipy, os, numpy as np

os.system(f'ffmpeg -i "{filename}" -c:a pcm_f32le temp.wav')
sample_rate, waves = scipy.io.wavfile.read("temp.wav")
os.remove("temp.wav")

L, R, C, LFE, LS, RS = waves.T

LS_shifted = -np.imag(scipy.signal.hilbert(LS))
RS_shifted = np.imag(scipy.signal.hilbert(RS))
L_out = L + 0.708 * C - 0.871 * LS_shifted - 0.49 * RS_shifted
R_out = R + 0.708 * C + 0.49 * LS_shifted + 0.871 * RS_shifted

scipy.io.wavfile.write("out.wav", sample_rate, np.vstack((L_out, R_out)).T)



Hope someone finds this useful ! (and that someone verifies it's correct)