
Recherche avancée
Autres articles (59)
-
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 -
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 -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (8389)
-
How do I make my Discord Bot play mp3 files, while in a voice Channel ? (FFMPEG problem)
27 mars 2019, par João PimentaI’m trying to make a bot that joins the voice channel, plays a mp3 file from my computer, and leaves the channel afterwards.
It "does" work, joins, leaves, but it doesn’t plays any sound, sometimes it produces static-like noises though, which made me think it is a FFMPEG problem.
I’m on a ubuntu 16.04.
I have tried changing the way I show the function what the path is for my .mp3 file. I came to the conclusion that
('/home/user/djsBot/01.mp3');
is the correct way to do it (the documentation asks for an absolute path), because I thought it wasn’t able to locate my file.I have also tried uninstalling and installing ffmpeg-binaries, same for node-opus, both of which give me moderate vulnerability reports (not sure what this means) and tell to run
npm audit fix
.I’m somewhat new to ubuntu, and a complete beginner on JS and Node.JS, so any tips or clarification are welcome. :)
client.on('message', (msg) => {
if (msg.content === '1') { // user types '1' to play a sound
if (msg.member.voiceChannel) {
msg.member.voiceChannel.join() // bot joins user's channel
.then(connection => {
const dispatcher = connection.playFile('/home/user/djsBot/01.mp3');
dispatcher.on("end", end => {
msg.member.voiceChannel.leave();
});
}).catch(err => {
console.log(err);
});
}
else {
msg.channel.send(`You must be in a Voice Channel for me to talk to you, ${msg.author.username}!`);
}
}
}); -
Is it possible to automate ffmpeg-normalize in java ?
6 avril 2019, par SaadI need to use ffmpeg-normalize (https://github.com/slhck/ffmpeg-normalize) to properly normalize audio files in my java program but ffmpeg-normalize requires manual installation and command usage.
I thought I could automate it in java using ProcessBuilder but it’s been proving somewhat impossible.
ffmpeg-normalize is written in python, so I tried every stackoverflow question that relates to running python commands in java. None of them worked, it seems windows just refuses to allow java to run commands in general.
I added python to my environment variables as well. No dice. Windows keeps telling me it doesn’t recognize
python
norpy
norpip
as valid internal or external commands.This is my final code, I tried all other solutions before this including Runtime.exe, using "cmd /c start", and all other derivatives of that.
My last attempt was running a .bat file from the java cmd processor and have the .bat do the rest, but not only is that windows only, but also fails.
Running
pip
in a cmd from cmd.exe directly (outside the java program I mean), it runs properly and shows me the help menu for pip. When the cmd opens from the java app, windows refuses to acknowledge the existence of python all together like in the image below.Process process = Runtime.getRuntime().exec("cmd /c start " + installerBat.getAbsolutePath(), null, ffNormExtractDir);
StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream());
StreamGobbler outputGobbler = new StreamGobbler(process.getInputStream());
errorGobbler.start();
outputGobbler.start();
try {
process.waitFor();
} catch (InterruptedException e) {
e.printStackTrace();
}
}I expected the java-born cmd to run the commands instantly and perfectly, but it simply refuses to run them.
So what is my best approach to make installing ffmpeg-normalize a breeze to the user ?
-
How to add title screen to the video using ffmpeg ?
25 mai 2019, par Rohan PatilI am making an story telling video application. In this application the videos which are basically interviews and footage provided by user are merged together, in addition to this the video title which is entered by user should also be merged with rest of the video. I am successfully able to make title video using the title and export it, But the problem occurs when i try to merge the title video with rest of the videos. My app crashes when i try to merge the title video with other videos. Below I have put two commands, first one is for making title video, and the second one is merging that title video with rest of the video. What I want is to merge the title video with other video and export it. Does anyone have any idea to do this ? Thank you !
command = new String[]{"-f","lavfi","-i","color=c=black:s=1080x1920:d=0.5","-vf","drawtext=fontfile=/system/fonts/DroidSans.ttf:fontsize=45:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2:text='hello world'",dest2.getAbsolutePath()}
command2=new String[]{"-y","-i",dest2.getAbsolutePath(),"-i", originalpath1, "-i", originalpath2 ,"-strict", "experimental", "-filter_complex",
"[0:v]scale=1080x1920,setsar=1:1[v0];[1:v]scale=1080x1920,setsar=1:1[v1];[2:v]scale=1080x1920,setsar=1:1[v2];[v0][0:a][v1][1:a][v2][2:a] concat=n=3:v=1:a=1",
"-ab", "48000", "-ac", "2", "-ar", "22050", "-s", "1080x1920", "-vcodec", "libx264","-crf","27","-q","4","-preset", "ultrafast", dest.getAbsolutePath()};