
Recherche avancée
Autres articles (91)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
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) (...)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (6603)
-
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(`ퟎ
-
avformat/hls : pass http offset options to http request
4 octobre 2019, par vectronic -
trying to play audio from youtube with ffmpeg on discord.py rewrite
13 septembre 2021, par Bobby Cookim trying to use a discord bot that plays music, but im getting errors when i run this code and python crashes, and i cant quite figure out whats wrong, except for that its around the
@client.command(pass_context=True) async def play(self, ctx, *, url): print(url) server = ctx.message.guild voice_channel = server.voice_client

block. the i apologize for wasting all your time, im really bad at this, and i didnt even write most of this.

import random
import youtube_dl
from discord.ext import commands
from discord.ext import tasks

client = commands.Bot(command_prefix = 'f!')

@client.command()
async def join(ctx):
 channel = ctx.message.author.voice.channel
 await channel.connect()

@client.command()
async def leave(ctx):
 await ctx.voice_client.disconnect()

youtube_dl.utils.bug_reports_message = lambda: ''


ytdl_format_options = {
 'format': 'bestaudio/best',
 'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
 'restrictfilenames': True,
 'noplaylist': True,
 'nocheckcertificate': True,
 'ignoreerrors': False,
 'logtostderr': False,
 'quiet': True,
 'no_warnings': True,
 'default_search': 'auto',
 'source_address': '0.0.0.0' # bind to ipv4 since ipv6 addresses cause issues sometimes
}

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

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)

class YTDLSource(discord.PCMVolumeTransformer):
 def __init__(self, source, *, data, volume=0.5):
 super().__init__(source, volume)

 self.data = data

 self.title = data.get('title')
 self.url = data.get('url')

 @classmethod
 async def from_url(cls, url, *, loop=None, stream=False):
 loop = loop or asyncio.get_event_loop()
 data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))

 if 'entries' in data:
 # take first item from a playlist
 data = data['entries'][0]

 filename = data['url'] if stream else ytdl.prepare_filename(data)
 return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)

 async with ctx.typing():
 player = await YTDLSource.from_url(url, loop=self.bot.loop)
 ctx.voice_channel.play(player, after=lambda e: print('Player error: %s' % e) if e else None)
 await ctx.send('Now playing: {}'.format(player.title))

@client.command(pass_context=True)
 async def play(self, ctx, *, url):
 print(url)
 server = ctx.message.guild
 voice_channel = server.voice_client