
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (35)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (5303)
-
discord bot music with youtube dl not stuck at webpage downloading
22 septembre 2021, par patricebailey1998So I'm trying to make a music bot which just joins,plays,stops and resume music. However my bot can join and leave a voice channel fine, however when i do my /play command it get stuck on
[youtube] oCveByMXd_0: Downloading webpage
(this is output in vscode) and then does nothing after. I put some print statement (which you can see in the code below and it prints 1 and 2 but NOT 3). Anyone had this issue ?

MUSIC BOT FILE


import discord
from discord.ext import commands
import youtube_dl

class music(commands.Cog):
 def __init__(self, bot):
 self.bot = bot
 
 @commands.command()
 async def join(self, ctx):
 if(ctx.author.voice is None):
 await ctx.reply("*You're not in a voice channel.*")
 voiceChannel = ctx.author.voice.channel
 if(ctx.voice_client is None): # if bot is not in voice channel
 await voiceChannel.connect()
 else: # bot is in voice channel move it to new one
 await ctx.voice_client.move_to(voiceChannel)

 @commands.command()
 async def leave(self, ctx):
 await ctx.voice_client.disconnect()
 
 @commands.command()
 async def play(self,ctx, url:str = None):
 if(url == None):
 await ctx.reply("*Check your arguments!*\n```/play VIDEO_URL```")
 else:
 ctx.voice_client.stop() # stop current song
 
 # FFMPEG handle streaming in discord, and has some standard options we need to include
 FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
 YTDL_OPTIONS = {"format":"bestaudio"}
 vc = ctx.voice_client
 
 # Create stream to play audio and then stream directly into vc
 with youtube_dl.YoutubeDL(YTDL_OPTIONS) as ydl:
 info = ydl.extract_info(url, download=False)
 print("1")
 url2 = info["formats"][0]["url"]
 print("2")
 source = await discord.FFmpegOpusAudio.from_probe(url2,FFMPEG_OPTIONS)
 print("3")
 vc.play(source) # play the audio
 await ctx.send(f"*Playing {info['title']} -* ퟎ
-
Music bot returning errors at core.py and bot.py
13 septembre 2021, par LoganoxThe code for the music bot I'm trying to write in python keeps returning an error with the following code :


@bot.command(name='play_song', help='To play song')
async def play(ctx,url):
 
 #if not ctx.message.author.name=="Rohan Krishna" :
 # await ctx.send('NOT AUTHORISED!')
 # return
 if 1==1:#try :
 server = ctx.message.guild
 voice_channel = server.voice_client
 print("try 1 was a success")
 
 async with ctx.typing():
 filename = await YTDLSource.from_url(url, loop=bot.loop)
 #voice_channel.play(discord.FFmpegPCMAudio(executable="ffmpeg.exe", source=filename)) #ISSUE HERE
 print("try 2 was a success")
 voice = get(ctx.bot.voice_clients, guild=ctx.guild)
 
 #voice.play(discord.FFmpegPCMAudio('test.mp3'), after=your_check)
 #voice.source = discord.PCMVolumeTransformer(voice.source)
 #voice.source.volume = 0.5
 await ctx.send('**Now playing:** {}'.format(filename))
 if 1==0:#except:
 await ctx.send("The bot is not connected to a voice channel.")
 print("try 3 was unfortunately a success")



It normally has a try/except function but I replaced it with if true and false statements to force it to run instead of breaking to determine the exact line of it breaking. The issue supposedly lies in


voice_channel.play(discord.FFmpegPCMAudio(executable="ffmpeg.exe", source=filename)) #ISSUE HERE



The error I get returned is :


Traceback (most recent call last):
 File "C:\Users\heyin\anaconda3\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
 ret = await coro(*args, **kwargs)
 File "app2.py", line 75, in play
 voice.play(discord.FFmpegPCMAudio('test.mp3'), after=your_check)
 File "C:\Users\heyin\anaconda3\lib\site-packages\discord\player.py", line 225, in __init__
 super().__init__(source, executable=executable, args=args, **subprocess_kwargs)
 File "C:\Users\heyin\anaconda3\lib\site-packages\discord\player.py", line 138, in __init__
 self._process = self._spawn_process(args, **kwargs)
 File "C:\Users\heyin\anaconda3\lib\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 "C:\Users\heyin\anaconda3\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
 await ctx.command.invoke(ctx)
 File "C:\Users\heyin\anaconda3\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
 await injected(*ctx.args, **ctx.kwargs)
 File "C:\Users\heyin\anaconda3\lib\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.



I added the print statements to determine which lines were working so those can obviously be ignored. It seems to be working fine except for this, other commands in the bot are working appropriately.


-
Music Bot with replit
7 août 2021, par T FI am currently using replit for my bot. I have installed all the necessary packages and ffmpeg for replit. When I start the bot from my PC everything works, but when I start the bot with replit, the bot joins my channel, says it is playing music and leaves the channel immediately. What could be the reason/fix for this ?


(No error happens)


Edit :


I don't get any errors and the code works. I tested it with the host on my PC. In replit I installed discordjs / opus, opus and ytdl-core. Then I downloaded the ffmpeg-4.4-i686-static from ffmpeg and uploaded the ffmpeg file into replit. Last I typed chmod +777 ./ffmpeg in the shell console. The code works. The problem is with replit. When I start the bot from my PC everything works and the bot plays music. Then when I paste the code into replit and start the bot, the bot briefly joins my channel and then leaves it again. There are no errors or anything else.