
Recherche avancée
Autres articles (85)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation" -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (10099)
-
How does MPG determine its default audio track ?
1er octobre 2022, par codedreadI have some mpg files that I transcoded from DVDs I bought a long time ago (maybe 20 years ago). ffprobe :


Input #0, mpeg, from 'da-orig.mpg':
 Duration: 00:06:59.44, start: 0.044100, bitrate: 6354 kb/s
 Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 8:9 DAR 4:3], Closed Captions, 31 fps, 59.94 tbr, 90k tbn
 Side data:
 cpb: bitrate max/min/avg: 7500000/0/0 buffer size: 1835008 vbv_delay: N/A
 Stream #0:1[0x85]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
 Stream #0:2[0x83]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
 Stream #0:3[0x81]: Audio: ac3, 48000 Hz, mono, fltp, 192 kb/s
 Stream #0:4[0x80]: Audio: ac3, 48000 Hz, mono, fltp, 192 kb/s



This shows there are 4 audio streams. When I play this file in VLC / QuickTime it seems that Audio Track 4 is the default. I'd like to understand how this is chosen. Is it something within the mpg container format or are players choosing the stream that has the lowest id (0x80) ?


More background, when I try to turn this into a mp4 file with the following command :


ffmpeg -i da-orig.mpg -c copy -map 0 da-copy.mp4


I get roughly the same size file, but the default audio track is stream #0:1[0x85].


What I want is an equivalent mp4 file (so the same audio track chosen).


-
Mimic Audacity amplification with Pydub
16 août 2022, par UnisionzzFor my music library I have used Audacity for recent years to amplify the music to similar levels of loudness ; technically speaking this is not completely true, but for me it is sufficient. However, as it is tedious to do this all by hand, I decided to write a Python code to automate this process for me. The code after the imported package(s) and defined functions will run in a loop in which the filename changes depending on which song is processed.


The difficult part is that I have not yet been able to find a consistent way to amplify different songs so that when the output files are put through Audacity, it will not want to change the amplitude by more than 0.1 dB(FS).


Below are two attempts which seem to have come closest to the desirable output ; other methods that I have tried were either less succesfull or resulted in clipping.


The first attempt finds the maximum dBFS of the song and then applies a gain in order for the maximum dBFS to equal 0 (I have also tried this method with
sound.dBFS
andsound.apply_gain
, but results seem more mixed than the attempt below) :

from pydub import AudioSegment

def change_amplitude(sound, target_dBFS):
 change_in_dBFS = target_dBFS - sound.max_dBFS
 return sound.apply_gain_stereo(change_in_dBFS)

# Audio is gathered from a hard coded path
s = AudioSegment.from_file(Dir+filename+".mp3", "mp3")
amp_s = change_amplitude(s, 0)
amp_s.export(Dir+filename+".mp3", format = "mp3")



The second attempt finds the amplitude and the maximum allowable amplitude (before clipping), recalculates both to dB and then adds the
dB_diff
to the sound :

import numpy as np
from pydub import AudioSegment

s = AudioSegment.from_file(Dir+filename+".mp3", "mp3")

# Get dB amplitude of song and maximum allowable value
dB_sound = 20*np.log10(s.max)
dB_max = 20*np.log10(s.max_possible_amplitude)
dB_diff = dB_max - dB_sound

amp_sound = s + dB_diff



Summarizing, I would like to import a music file, amplify it similar to Audacity amplification and then export the file again.


-
Recommendation : Video format process NodeJS
13 août 2022, par Austin HowardI am looking for the best recommendation for formatting videos ona nodejs server. In all my research i keep getting pointed back to
ffmpeg
but it doesnt look very friendly to a Nodejs app, i've seenfluent-ffmpeg
andnode-ffmpeg
and a couple others, but at this point they are a couple years old, and if im going to use a node package id like for them to be udpated a bit more. Do you guys have any recommendations for current software that will be decent for converting and compressing videos for upload ? I have a use case where i sometimes have 2-3gb files that i want to get down to somewhere around 500-1gb in size. As well as generating thumbnails from that video, or if you guys have good documentation to point me to that would allow me to use the ffmpeg executable alone i can make that work too.