
Recherche avancée
Autres articles (64)
-
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...) -
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)
Sur d’autres sites (3689)
-
music bot stops after playing music for 30-50 secs
19 mars 2023, par ra1nb0wconst { QueryType } = require("discord-player")
const player = require("../../client/player")
const Discord = require('discord.js')

module.exports = {
 name: 'play',
 cooldown: 5,
 aliases: ['p'],
 description: "Plays a song",
 usage: "?p <song></song>vid-URL>",
 category: "Music",

 async execute(client, message, args) {
 const songTitle = args.join(" ")
 const queue = await player.createQueue(message.guild);
 const nosongEmbed = new Discord.MessageEmbed()
 .setColor('#3d35cc')
 .setDescription(`‼️ - Please provide a song URL or song name!`)

 if (!songTitle) return message.reply({ embeds: [nosongEmbed] })
 

 const novcEmbed = new Discord.MessageEmbed()
 .setColor('#3d35cc')
 .setDescription(`‼️ - You have to be in a Voice Channel to use this command!`)

 if (!message.member.voice.channel) return message.reply({ embeds: [novcEmbed] })
 if (!queue.connection) await queue.connect(message.member.voice.channel)

 let url = songTitle
 
 // Search for the song using the discord-player
 const result = await player.search(url, {
 requestedBy: message.author,
 searchEngine: QueryType.AUTO
 })

 // finish if no tracks were found
 if (result.tracks.length === 0)
 return message.reply("No results")

 // Add the track to the queue
 const song = result.tracks[0]
 await queue.addTrack(song)
 const embed = new Discord.MessageEmbed()
 .setColor("AQUA")
 .setDescription(`**[${song.title}](${song.url})** has been added to the Queue`)
 .setThumbnail(song.thumbnail)
 .setFooter({ text: `Duration: ${song.duration}`})
 message.reply({ embeds: [embed] })
 if (!queue.playing) await queue.play()
 

 

 }
 
 }




i used the command then the song just stops playing after 30-50 seconds, it is supposed to play till the music finishes and then keep staying in the voice channel until a few mins of no music


i have reinstalled ffmpeg


using :
discord.js : 13.14.0
discord-player : 5.2.2


-
Discord js music player bot suddenly leaves
29 janvier 2024, par ImKSo I made a music bot for discord js that uses discord player package. The command runs perfectly but in the middle song suddenly stops I tried searching everywhere nothing works and i think its an issue for ffmpeg but im not so sure


bot.player = new Player(bot, {
 ytdlOptions: {
 quality: 'lowestaudio',
 highWaterMark: 1 >> 25
 },
})

const player = bot.player;

//play command 


bot.on('interactionCreate', async interaction =>{
 if(interaction.commandName === 'play') {

 const song = interaction.options.get('song').value;
 const res = await player.search(song, {
 searchEngine: QueryType.SPOTIFY_SONG
 });


 if (!res || !res.tracks.length) return interaction.reply({ content: `No results found ${interaction.member}... try again ? ❌`, ephemeral: true });

 const queue = await player.createQueue(interaction.guild)

 if (!queue.connection) await queue.connect(interaction.member.voice.channel);


 await interaction.channel.send({ content:`Loading your ${res.playlist ? 'playlist' : 'track'}... 🎧`});

 const track = await res.tracks[0]

 console.log(track)
 if(!track) return interaction.channel.send({content: 'No song found'});

 queue.addTrack(track)

 queue.play();

 }
})



After leaving the channel, other commands and bot work fine


-
Simple discord.py mp3 bot not playing music
18 avril 2023, par Lukas NesvarbuDiscord bot dosent play anykind of music, neither mine nor other bots codes work he just dosent play music. idk maybe i am just stupid BUT IT DOSENT WORK WHY


import discord
import time
import os
from discord.ext import commands

BOT_TOKEN = "" # put token here

intentss = discord.Intents.default()
intentss.message_content = True
intentss.voice_states = True

bot = commands.Bot(command_prefix=";;", intents = intentss)

OPUS_LIBS = ['libopus-0.x86.dll', 'libopus-0.x64.dll', 'libopus-0.dll', 'libopus.so.0', 'libopus.0.dylib']

@bot.command()
async def join(ctx):
 channelVC = ctx.author.voice.channel
 await channelVC.connect()

@bot.command()
async def leave(ctx):
 await ctx.voice_client.disconnect()

@bot.command()
async def play(ctx):
 voice = ctx.guild.voice_client
 mloc = 'C:/Users/Lukas/Desktop/Bot Bethoven/Youtube/test.mp3'
 voice.play(discord.FFmpegPCMAudio(executable = "C:/ffmpeg/bin/ffmpeg.exe", source = mloc))


bot.run(BOT_TOKEN)



it just give error codes :


discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: Not connected to voice.
INFO discord.player ffmpeg process 22896 has not terminated. Waiting to terminate...
INFO discord.player ffmpeg process 22896 should have terminated with a return code of 1.



intresting thing when i put join and play in the same command it dosent show not connected to voice error, actually it dosent show anything and neither plays mp3 file


i tryed reinstalling : PyNaCl, FFmpeg, Visual Code, updating python.
nothing helps. this problem started after i did 1 month break from coding bot, before that it worked fine.


i'm thinking problem is something with my pc, maybe path or something dosent work(because it worked month ago and i didnt do anything to code), i tryed checking but everything seems normal,