
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (78)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (6177)
-
Why is `subprocess.call` not invoking the command
6 juin 2014, par ShookieI’m trying to run a .wav file through ffmpeg using the
subprocess.call(shell=True)
in the following code and it doesn’t seem to run. I know this because theoutput_file
isn’t created and I’m getting an exception in theopen()
method.
What am I doing wrong ?try:
import pocketsphinx
except:
import pocketsphinx as ps
import sphinxbase
import subprocess
import os
hmmd = "../../Pocketsphinx_Files/en-us-8khz"
lmdir = "../../Pocketsphinx_Files/cmusphinx-5.0-en-us.lm"
dictp = "../../Pocketsphinx_Files/cmu07a.dic"
output_filename = "../../temp/ps_output.wav"
def recognize(filename="../../temp/temp_output.wav"):
command = "ffmpeg -i "+filename+" -ac 1 -ab 16 -ar 16000 "+output_filename
subprocess.call(command,shell=True)
wavFile = open(output_filename,"rb")
speechRec = ps.Decoder(hmm = hmmd, lm = lmdir, dict = dictp)
wavFile.seek(44)
speechRec.decode_raw(wavFile)
result = speechRec.get_hyp()
#os.remove(filename)
#os.remove(output_filename)
return result
if __name__=="__main__":
print(recognize())edit : I’ve got ffmpeg installed.
Furthermore, when I run the subprocess.call() command from the python interpreter it seems to work. This is why I’m stumped. -
FFMPEG not working as intended in a bash script
9 mai 2024, par rcpI'm trying to get the mean volume of a recording and the echo the expected value. When I do it line by line, everything works fine, but as soon as I execute it in a bash script, I have a problem with the FFMPEG line. I identified the problem, which is that
&> analysis
is not doing anything for some reason and instead of saving the output in a file it prints it in the shell.

I don't know how to fix it since it works fine when not in a script.


#!/bin/bash

# Record sound
sh aud2.sh

# Run ff.sh in the background to analyze volume and save results
ffmpeg -i test.wav -af "volumedetect" -vn -sn -dn -f null - &> analysis.vol

# Extract mean_volume and save to mean.vol
grep "mean_volume" analysis.vol > mean.vol

# Extract numerical value and save to val.vol
sed -n 's/^.*mean_volume: \([-0-9.]*\) dB.*/\1/p' < mean.vol > val.vol

# Read the value from val.vol into the variable volume
volume=$(code>


Expected output when line by line




I expected the shell output to be saved in a file.


-
how to use ffmpeg batch convert mp4 to m3u8 ? [on hold]
29 mars 2017, par user6006103a script Can be use shell or perl or python by ffmpeg batch cut mp4 to m3u8 ts file?