Recherche avancée

Médias (0)

Mot : - Tags -/navigation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (57)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

Sur d’autres sites (8384)

  • Music bot returning errors at core.py and bot.py

    13 septembre 2021, par Loganox

    The 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 F

    I 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.

    


  • How To Make A Music Command Discord.py

    14 juin 2021, par Coder999

    I'm trying to make a music bot, but it just doesn't seem to work. Here's what I have so far.

    


    import asyncio
import functools
import itertools
import math
import random
from keep_alive import keep_alive
import discord
import nacl
import youtube_dl
from async_timeout import timeout
from discord.ext import commands
import os

bot = commands.Bot(command_prefix='+')

@bot.event
async def on_ready():
    print('Logged in as:\n{0.user.name}\n{0.user.id}'.format(bot))

youtube_dl.utils.bug_reports_message = lambda: ''

ytdl_format_options = {
    'format': 'bestaudio/best',
    '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 = ""

    @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['title'] if stream else ytdl.prepare_filename(data)
        return filename

@bot.command(name='join', help='Tells the bot to join the voice channel')
async def join(ctx):
    if not ctx.message.author.voice:
        await ctx.send("{} is not connected to a voice channel".format(ctx.message.author.name))
        return
    else:
        channel = ctx.message.author.voice.channel
        await channel.connect()
        await ctx.send(f'Joined channel `{channel}`')

@bot.command(name='leave', help='To make the bot leave the voice channel')
async def leave(ctx):
    voice_client = ctx.message.guild.voice_client
    if voice_client.is_connected():
        channel = ctx.message.author.voice.channel
        await voice_client.disconnect()
        await ctx.send(f'Left channel `{channel}`')
    else:
        await ctx.send("The bot is not connected to a voice channel.")

@bot.command(name='play', help='To play song')
async def play(ctx,url):
    try :
        server = ctx.message.guild
        voice_channel = server.voice_client

        async with ctx.typing():
            filename = await YTDLSource.from_url(url, loop=bot.loop)
            voice_channel.play(discord.FFmpegPCMAudio(executable="ffmpeg.exe", source=filename))
        await ctx.send('**Now playing:** {}'.format(filename))
    except:
        await ctx.send("The bot is not connected to a voice channel.")


    


    I have installed PyNaCl and all that stuff and my leave and join commands are working but my play command isnt. It says that it's not connected to a channel but it clearly is.

    


    enter image description here