
Recherche avancée
Autres articles (67)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (7874)
-
Defining moment of the audio attenuation through ffmpeg
23 août 2016, par riki-tikThere are audio tracks of different lengths in m4a format. And there’s ffmpeg library for working with the media. Many of the tracks have the effect of "decay" in the end, and it is necessary to determine at what point it occurs (determined once and the value entered in the database along with other information about the track). Those. we must somehow determine that the track begins to fade, and its volume reached 30% compared to the total volume of the song. Is it possible to solve by means of ffmpeg, and if so, how ?
-
swscale/swscale : remove useless code
1er avril 2020, par Ruiling Song -
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)