
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (102)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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 (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (11664)
-
A late thanks to http://www.fugitives.ca/music/ for the homepage demo tunes
6 mars 2011, par Scott Schillerm index.html A late thanks to http://www.fugitives.ca/music/ for the homepage demo tunes
-
The bot doesn't play music (discord.py)
30 avril 2024, par NaydarThe code works fine, but when using the command in guild the bot enters the voice channel but doesn't play music, immediately console gives : ffmpeg process 56560 successfully terminated with return code of 3199971767.


import discord
import youtube_dl
import ffmpeg
import requests
from discord.ext import commands

class music(commands.Cog, name = 'music'):
 def __init__(self, bot):
 self.bot = bot

 self.is_playing = False
 self.is_paused = False


 self.music_queue = []
 self.YTDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True'}
 self.FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn -filter "volume=0.25"'}

 self.voice_client = None
 
 @commands.command(name="play")
 async def play(self, ctx, url):
 if not ctx.message.author.voice:
 await ctx.send("You are not connected to a voice channel.")
 return

 self.voice_channel = ctx.message.author.voice.channel
 if self.voice_client and self.voice_client.is_connected():
 await self.voice_client.move_to(self.voice_channel)
 else:
 self.voice_client = await self.voice_channel.connect()

 api_key = "my_key"
 video_id = url.split("v=")[1]
 api_url = f"https://www.googleapis.com/youtube/v3/videos?part=snippet&id={video_id}&key={api_key}"

 response = requests.get(api_url)
 if response.status_code == 200:
 data = response.json()
 title = data["items"][0]["snippet"]["title"]
 audio_url = f"https://www.youtube.com/watch?v={video_id}"
 self.voice_client.play(discord.FFmpegOpusAudio(audio_url))
 await ctx.send("Now playing: " + title)
 else:
 await ctx.send("Unable to fetch video information.")

async def setup(bot):
 await bot.add_cog(music(bot))



I tried to rewrite some YTDL and FFMPEG options
(tried to replace "noplaylist" option on "False" and terminal sent :
"discord.player : ffmpeg process 51124 successfully terminated with return code of 4294967295").
Also i checked the updates of modules.


-
How do I add a cool down to a command for a discord music bot [closed]
22 mars 2021, par sherbit fishI'm making a music bot in discord and I need to add a cool down into this command so that people don't spam it and crash the bot. What should I do to fix this problem ?


const ytdl = require("ytdl-core");

client.on('message', async message => {
 if (message.member.voice.channel) {
 const connection = await message.member.voice.channel.join();
 console.log(`sound was just played`);
connection.play(ytdl('https://www.youtube.com/watch?v=jRxSRyrTANY',{ highWaterMark: 50 },{ quality: 'highestaudio' },{ type: 'opus' }));
setTimeout(() => {
 connection.disconnect();
}, 12000); 
 }
});