
Recherche avancée
Autres articles (8)
-
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (1775)
-
discord.ext.commands.errors.CommandInvokeError : Command raised an exception : ClientException : ffmpeg was not found
22 juillet 2022, par MSTI made a music bot on Replit but, when running my code I get this error :
discord.ext.commands.errors.CommandInvokeError : Command raised an exception : ClientException : ffmpeg was not found.


Can someone help me fix this ?


main.py


import discord
from discord.ext import commands
import music

cogs = [music]

client = commands.Bot(command_prefix='!', intents = discord.Intents.all())

for i in range(len(cogs)):
 cogs[i].setup(client)


client.run("token")



music.py


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

class music(commands.Cog):
 def __init__(self,client):
 self.client = client

 @commands.command(name="join")
 async def join(self,ctx):
 if ctx.author.voice is None:
 await ctx.send("You are not in a Voice Channel!")
 voice_channel = ctx.author.voice.channel
 if ctx.voice_client is None:
 await voice_channel.connect()
 else:
 await ctx.voice_client.move_to(voice_channel)

 @commands.command(name="disconnect")
 async def disconnect(self,ctx):
 await ctx.voice_client.disconnect()

 @commands.command(name="play")
 async def play(self,ctx,url):
 ctx.voice_client.stop()
 FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
 YDL_OPTIONS = {'format':"bestaudio"}
 vc = ctx.voice_client

 with youtube_dl.YoutubeDL(YDL_OPTIONS) as ydl:
 info = ydl.extract_info(url, download=False)
 url2 = info['formats'][0]['url']
 source = await discord.FFmpegOpusAudio.from_probe(url2,**FFMPEG_OPTIONS)
 vc.play(source)


 @commands.command(name="pause")
 async def pause(self,ctx):
 await ctx.voice_client.pause()
 await ctx.send("Paused Playing Music!")

 @commands.command(name="resume")
 async def resume(self,ctx):
 await ctx.voice_client.resume()
 await ctx.send("Resumed Playing Music!")

def setup(client):
 client.add_cog(music(client))



So, The bot is able to join the Voice Channel but when I ask it to play a song, it gives this error :


[youtube] Pkh8UtuejGw: Downloading webpage
[youtube] Pkh8UtuejGw: Downloading player afeb58ff
Ignoring exception in command play:
Traceback (most recent call last):
 File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
 ret = await coro(*args, **kwargs)
 File "/home/runner/DiscordMusicBotTest/music.py", line 34, in play
 source = await discord.FFmpegOpusAudio.from_probe(url2,**FFMPEG_OPTIONS)
 File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/player.py", line 387, in from_probe
 return cls(source, bitrate=bitrate, codec=codec, **kwargs)
 File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/player.py", line 324, in __init__
 super().__init__(source, executable=executable, args=args, **subprocess_kwargs)
 File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/player.py", line 138, in __init__
 self._process = self._spawn_process(args, **kwargs)
 File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/player.py", line 147, in _spawn_process
 raise ClientException(executable + ' was not found.') from None
discord.errors.ClientException: ffmpeg was not found.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
 File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
 await ctx.command.invoke(ctx)
 File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
 await injected(*ctx.args, **ctx.kwargs)
 File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
 raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: ffmpeg was not found.



-
FFMPEG add/remove input on the fly
10 août 2022, par Thomas HalvickI'm trying to merge audio on the fly for my bot with discord JS.
I found a way to do it, but it's not perfect.


My solution


- 

- Create a FFmpeg process with each input into stream and process them at same speed while playing
- And merge each stream in one with another FFmpeg process
- When adding a new audio, I create a new process for this one and destroy the merge process and recreate one








Issues


- 

- It's take seconds before playing
- When adding a new song, my bot stop playing while the merge process start






There is a way to do it with one FFmpeg process to add and remove input stream ? FFmpeg is the best way to do that ?


-
ffmpeg was not found. How do i fix this ?
18 novembre 2024, par Ice Cr3aMSo im trying to make a simple discord music bot, which is halted right now due to this problem. The issue is that everytime i try to play a music through youtube_dl library, it pops up with the prompt : "ffmpeg was not found".


This is the main.py



import discord
import os
import asyncio
import youtube_dl
import ffmpeg

token = 'NzY5NTUzNDcwNjAwMTE4Mjgz.G3Dzce.XYKNAyLfBPg0ug5XPKssV-9EvsFjBlCMeM43ag'

client = discord.Client()

block_words = ['foo', 'bar', 'baz', 'quux', 'http://', 'https://']

voice_clients = {}
yt_dl_opts = {'format': 'bestaudio/best'}
ytdl = youtube_dl.YoutubeDL(yt_dl_opts)

ffmpeg_options = {'options': '-vn'}


@client.event
async def on_ready():
 print(f'Bot has logged in as {client.user}')

@client.event
async def on_message(msg):
 if msg.author != client.user:
 if msg.content.lower().startswith('?hi'):
 await msg.channel.send(f'Hi, {msg.author.display_name}')

@client.event
async def on_message(msg):
 if msg.author != client.user:
 for text in block_words:
 if "OTR" not in str(msg.author.roles) and text in str(msg.content.lower()):
 await msg.delete()
 return
 print("Not Deleting...")

@client.event
async def on_message(msg):
 if msg.content.startswith('?play'):
 try:
 url = msg.content.split()[1]

 voice_client = await msg.author.voice.channel.connect()
 voice_clients[voice_client.guild.id] = voice_client

 loop = asyncio.get_event_loop()
 data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=False))

 song = data['url']
 player = discord.FFmpegPCMAudio(song, **ffmpeg_options)
 except Exception as err:
 print(err)
client.run(token)