
Recherche avancée
Autres articles (40)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
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
Sur d’autres sites (5933)
-
fluent-ffmpeg add multiple languages from method dynamically nodejs
18 février 2021, par AmitKumarI am trying to add multiple languages and subtitles to a video dynamically. but I am not able to find any solution, I found many results for the command line.


I want to call this command script from my nodejs method


ffmpeg -i captain-marvel-trailer.mp4 -i tamil.mp3 -i telugu.mp3 -i hindi.mp3 -map 1 -map 2 -map 3 -metadata:s:a:0 language=eng -metadata:s:a:1 language=tam -metadata:s:a:2 language=tel -metadata:s:a:3 language=hin -codec copy multilanguage.mp4



Here is my codes :


lodash.each(payloadData.languages,function(language){
 let start = 0;
 let max = payloadData.languages.length;
 while (start < max) {
 // fname = `${path.resolve(`contents/hindi.mp3`)} -map 1 -metadata:s:a:0 language=hin -codec copy ${finalVideoPath}`
 // ffmpeg().input(fname) 
 start += 1;
 }
})
 
ffmpeg('./sample.mov')
 .withOutputFormat('.mp4')
 .size('1920x1080')
 .on("end", function (stdout, stderr) { 

 })
}).on("error", function (err) {
 console.log("an error happened: " + err.message);
}).save(finalVideoPath)



-
How i can convert with Python (audio file from .oga format to .wav format) without using ffmpeg ?
21 août 2021, par MaksTelegram save audio file with .oga, but in my telegram bot i using googleSpeech recognition library which takes .wav file format.
I used ffmpeg with my computer, but it needs to install the program and runs it in subprocess, but if i want deploy bot in some host, i need install ffmpeg on it.
How can i convert .oga to .wav using only python libraries ?
Here is my part of code, if who needs.


def convert_file(self):
 if os.path.exists(os.path.abspath(self.filename)) and os.path.exists(self.new_file):
 pass
 else:
 process = subprocess.run(["ffmpeg", "-hide_banner", "-i", 
(os.path.abspath(self.filename)), self.new_file])
 if process.returncode != 0:
 raise Exception("Something went wrong")

async def recognize_file(self):
 try:
 tlg_audio = sr.AudioFile(os.path.abspath(self.new_file))
 r = sr.Recognizer()
 with tlg_audio as source:
 audio = r.listen(source)
 if self.language is None:
 self.language = "ru-Ru"
 text = r.recognize_google(audio, language=self.language)
 return text
 else:
 text = r.recognize_google(audio, language=self.language)
 return text
 except sr.UnknownValueError:
 return "I not hear you"



-
How to escape characters in Windows batch file
8 février 2017, par TirafesiI’m trying to create a script to run a program that receives as an argument the name of a file. The problem I’m having is that the program doesn’t work if the filename has special characters in it.
I found this post which helped me a bit. With a few modifications on that script I’m able to use the program with filenames containing
[
and]
.However, there are still some other special characters that cause the program to not run. Is it possible to create a batch for all special characters ? If not, I would at least need to be able to parse not only
[
and]
, but'
as well.This is what I have working at the moment. How can I at least add
'
to this ?if not exist "mp4\" mkdir mp4
setlocal disableDelayedExpansion
for %%f in (*.mkv) do (
set _a=%%~nf
set _c=%%f
setlocal enableDelayedExpansion
set _b=!_a:[=\[!
set _name=!_b:]=\]!
set _d=!_c:[=\[!
set _fullname=!_d:]=\]!
"SOMEPATH\ffmpeg\bin\ffmpeg.exe" -i "%%f" -vf subtitles="!_name!.mkv:si=1" -c:v h264_qsv -c:a copy -map 0:v:0 -map 0:a:1 -q:v 6 -look_ahead 0 "mp4/%%~nf.mp4"
endlocal
)
endlocal
pauseIf you could explain the reasoning behind stuff that would be cool as well. I don’t understand much about scripting, but I would like to understand what’s going on in this batch...
Oh, and here is the documentation for escaping characters in this program.