
Recherche avancée
Autres articles (38)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
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 (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)
Sur d’autres sites (2199)
-
discord.py music bot can't play next song
6 décembre 2020, par borkI'm making a discord music bot using ffmpeg and youtube-dl. I have a premade playlist of urls that would play the list of songs once a user chooses it.

this is my code for playing the audio

ydl_opts = {
 'format': 'bestaudio', 
 'noplaylist':'True',
 'youtube_include_dash_manifest': False
 }
FFMPEG_OPTIONS = {
 'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
 'options': '-vn'
 }

songs = url[playlist]
dur_min = 0
pre_dur_sec = 0
with YoutubeDL(ydl_opts) as ydl:
 for i in songs:
 info = ydl.extract_info(i, download = False)
 dur = info['duration']
 playlist_songs.append(info)

playlist_songs_copy = playlist_songs.copy()
for i in playlist_songs_copy:
 info = playlist_songs.pop(0)
 URL = info['formats'][0]['url']
 player = FFmpegPCMAudio(URL, **FFMPEG_OPTIONS)
 q.append(player)
 q_playlist.append(playlist)

if not voice.is_playing():
 source = q.pop(0) 
 playlist = q_playlist.pop(0)
 dur_min = duration_min.pop(0)
 dur_sec = duration_sec.pop(0) 
 voice.play(source, after = lambda e: play_next(ctx, source)) 
 voice.is_playing()
 await ctx.send(f'```nim\n*Now Playing:*\nplaylist {playlist}: {name[playlist]}\n\n{content[playlist]}\n\ntotal duration: {dur_min}:{dur_sec}```')



and this is my code for playing the next song


def play_next(ctx, source):
 voice = get(client.voice_clients, guild = ctx.guild)
 if len(q) >= 1:
 try:
 del combine_q[0]
 source = q.pop(0)
 playlist = q_playlist.pop(0)
 dur_min = duration_min.pop(0)
 dur_sec = duration_sec.pop(0)

 except:
 pass

 voice.play(source, after = lambda e: play_next(ctx, source))
 try:
 asyncio.run_coroutine_threadsafe(ctx.send(f'```nim\n*Now Playing:*\nplaylist {playlist}: {name[playlist]}\n\n{content[playlist]}\n\ntotal duration: {dur_min}:{dur_sec}```'), client.loop)
 
 except:
 asyncio.run_coroutine_threadsafe(ctx.send('```nim\nPlaying the next song...```'), client.loop)
 
 else:
 time.sleep(30) 
 if not voice.is_playing():
 asyncio.run_coroutine_threadsafe(voice.disconnect(), client.loop)
 asyncio.run_coroutine_threadsafe(ctx.send("```nim\nNo more songs in queue.```"),client.loop)
 voice.is_paused()



Up till today, it's been working fine. But I was using the bot just now and instead of playing the song and sending the message "Playing the next song..." as usual, it just stopped and spammed the message for about 30 times before it disconnected. When I checked the logs, it showed

socket.send() raised exception

, which was also spammed in the terminal. When I tried making the bot reconnect, it joined my voice channel but didn't respond to any commands and would keep making the discord "connecting" noise. It wouldn't even leave with my .leave command unless I completely turned it off via the script.

The same connecting problem would continue even after I reran the script and would only stop after I restarted my VS Code which is really odd...


After some testing I found out that as of now, the bot is only able to play two songs before breaking. I really need help as this just happened randomly and I'm unable to find anything online about the problem.


-
Discord bot js Bot has no audio after joining with play command. No errors in console or chat
30 mai 2020, par FeXI coded a bot with node.js. I used the example by Crawl for his music bot. I did everything similar to him. After I finished my build everything worked. Every other command and the
play
command. But now after 2 weeks the bot joins the voice channel, light up green but has no sound. I updatedffmpeg
,@discordjs/opus
andffmpeg-static
but the bot still has no audio. Thequeue
,volume
,nowplaying
,skip
,shuffle
,loop
everything works. But after I got the video or playlist with the play command the bot only joins light up green but has no audio.


function play(guild, song) {

 try {

 const ServerMusicQueue = queue.get(guild.id);

 if (!song) {

 ServerMusicQueue.textchannel.send(`ퟎ
-
Discord bot python : discord.errors.ClientException : ffmpeg was not found
14 septembre 2021, par S. KloreI'm trying to make a discord bot that plays music in a voice channel. It connects to the voice channel, but doesn't play anything. It also gives an error in the console.



I'm on Windows and I'm using the discord.py rewrite.



My code :



import discord, random, datetime, asyncio, nacl, ffmpeg

TOKEN = 'What token'

client = discord.Client()

@client.event
async def on_message(message):
if message.content.lower() == '$play':
 if message.content.lower() == '$play':
 channel = client.get_channel(547155964328149007)
 vc = await channel.connect()
 vc.play(discord.FFmpegPCMAudio('mp3.mp3'), after=lambda e: print('done', e))
 vc.is_playing()
 vc.pause()
 vc.resume()
 vc.stop()

@client.event
async def on_ready():
 print('Logged in as {0.user}'.format(client))

client.run(TOKEN)




The error :



Traceback (most recent call last):
 File "D:\Python35\lib\site-packages\discord\client.py", line 218, in _run_event
 await coro(*args, **kwargs)
 File "discord_bot.py", line 90, in on_message
 vc.play(discord.FFmpegPCMAudio('mp3.mp3'), after=lambda e: print('done', e))
 File "D:\Python35\lib\site-packages\discord\player.py", line 165, in __init__
 raise ClientException(executable + ' was not found.') from None
discord.errors.ClientException: ffmpeg was not found.




People seem to have a similar-ish issue with
ffmpeg/avconv was not found in your PATH environment variable
but the fix for them is to download ffmpeg from a website and put it in their PATH, but that doesn't work for me.


Further more I can only find fixes for my problem in JavaScript, while I'm coding the bot in Python 3.



Here are some links from my research :



You need to add FFmpeg to your path



A discord.js (JavaScript) fix for the same error



A fix for discord.py, NOT for discord.py REWRITE