
Recherche avancée
Autres articles (98)
-
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 (...) -
Les sons
15 mai 2013, par -
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"
Sur d’autres sites (6408)
-
Add text to video using FFMPEG
29 décembre 2023, par DexterI have a mp4 vertical video and I would like to add a text in center top of it. I read several things and found out 2 ways to do it (with and without font file).


ffmpeg -i .mp4 -vf "drawtext=text=’Stack Overflow’:fontcolor=white:x=100:y=100:font=Arial" -codec:a copy .mp4

ffmpeg -i .mp4 -vf "drawtext=fontfile='.ttf':text='Stack Overflow':fontcolor=white:fontsize=24:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2" -codec:a copy .mp4



They both work for other people but when I'm trying to do it so I do have an error.


Fontconfig error: Cannot load default config file: No such file: (null)



And that is even if with the without font file method.


Do someone have a solution for this error ?


-
Discord bot stop playing music in random time of song
25 janvier 2021, par JusmejtrI have a discord to let me play a random song from the list.


How bot works :
Bot IS connected to firestore Cloud (firebase) where i have economy data from my server. Price for playing random song is 75 coins.


Everything worked as it should, but yesterday I used command, the bot started playing and after a while it stopped playing music and also no other commands worked, bot probably get freezed.


I have no errors in the console until after a minute it showed me this error.




The bot is hosted on Heroku and I also added this buildpack to ffmpeg in the settings.


https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest


This is my code :


module.exports = {
 name: "buy-music",
 description: "buy a music",

 async execute(message, config, db){
 const PREFIX = (config.prefix);

 if(message.content === PREFIX + "buy music"){
 const ytdl = require("ytdl-core");
 message.delete();
 let uzivatel = message.author.tag;

 let voiceChannel = message.member.voice.channel;
 if(!voiceChannel) return message.reply("Musíš byť vo voice roomke");

 let cena = 75;
 
 db.collection('economy').doc(uzivatel).get().then(async (q) => {
 if(!q.exists) return message.reply("Nemáš vytvorený účet");
 var hodnota = q.data().money;
 if(hodnota < cena) return message.reply("Nemáš dostatok financií");

 db.collection('statusy').doc('music').get().then(async (asaj) => {
 let stav = asaj.data().stav;
 if(stav == "off"){
 db.collection('statusy').doc('music').update({
 "stav": "on",
 "autor": message.author.tag,
 });
 hodnota -= cena;
 db.collection('economy').doc(uzivatel).update({
 'money': hodnota
 });
 function randomhraj(){
 var pole = [
 My YT links

 ]
 let rnd = Math.floor(Math.random() * pole.length);
 let output = pole[rnd];
 return output;
 }
 
 try{
 var pripojenie = await voiceChannel.join();
 message.reply(`Úspešne si si kúpil chuťovečku`);
 }catch(error){
 console.log(`Error pri pripajani do room (music join) ${error}`);
 }
 
 const dispatcher = pripojenie.play(ytdl(randomhraj())).on("finish", async() => {
 await voiceChannel.leave();
 await db.collection('statusy').doc('music').update({
 "stav": "off",
 "autor": "nikto",
 });
 }).on("error", error => {
 console.log(error)
 })
 dispatcher.setVolumeLogarithmic(5 / 5)
 }else{
 message.reply("Momentálne si hudbu kúpil niekto iný alebo ak si hudbu kúpil a chceš ju zastaviť použi príkaz *stop");
 }
 
 });
 });
 
 }else if(message.content === PREFIX + "stop"){
 message.delete();
 db.collection('statusy').doc('music').get().then((n) => {
 let kto = n.data().autor;
 let meno = message.author.tag;
 if(!message.member.voice.channel) return message.channel.send("Musíš byť vo voice roomke pre stopnutie hudby");
 if(kto == meno){
 message.member.voice.channel.leave();
 message.channel.send("Úspešne odpojený");
 db.collection('statusy').doc('music').update({
 "stav": "off",
 "autor": "nikto",
 });
 }else{
 message.reply("Zastaviť hudbu môže len ten kto si ju kúpil");
 }
 });
 }
 
 }
}



-
Passing commands with double quotes to subprocess.call in python
7 juin 2018, par Georgе StoyanovI want to pass a command to a Linux machine running ffmpeg using python containing a double quotes. That’s my script :
drawtext = "drawtext=\"fontfile=DejaVuSans: text='Random Name': fontcolor=white: fontsize=24: box=1: boxcolor=black@0.5: boxborderw=5: x=20: y=20\""
subprocess.call(["ffmpeg", "-v", "error", "-i", input.mp4, "-vf", drawtext, output.mp4])If I print the drawtext variable this is the output :
drawtext="fontfile=DejaVuSans: text='Reference Image': fontcolor=white: fontsize=24: box=1: boxcolor=black@0.5: boxborderw=5: x=20: y=20"
And this is my error in ffmpeg :
[Parsed_drawtext_0 @ 0x564ad79f99c0] [Eval @ 0x7ffd41131810] Invalid chars '"' at the end of expression '20"'
[Parsed_drawtext_0 @ 0x564ad79f99c0] Failed to configure input pad on Parsed_drawtext_0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0If I execute the following command in Linux shell it works just fine :
$ ffmpeg -ss 10 -i input.mp4 -vf drawtext="fontfile=DejaVuSans: text='Random Name': fontcolor=white: fontsize=24: box=1: boxcolor=black@0.5: boxborderw=5: x=20: y=20" output.mp4