Recherche avancée

Médias (1)

Mot : - Tags -/livre électronique

Autres articles (30)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

Sur d’autres sites (3432)

  • AttributeError : 'FFmpegPCMAudio' object has no attribute '_process'

    16 septembre 2021, par Sujal Motagi

    I'm trying to make a discord music bot and this is my play function :

    


    async def play(self, ctx, url):
    ctx.voice_client.stop()
    FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'option': '-vn'}
    YDL_OPTIONS = {'format': 'bestaudio'}

    voice = ctx.voice_client
    with youtube_dl.YoutubeDL(YDL_OPTIONS) as ydl:
      info = ydl.extract_info(url, download=False)
      url2 = info['formats'][0]['url']

      voice.play(discord.FFmpegPCMAudio(url2, **FFMPEG_OPTIONS))


    


    But when I run the code I get the following error :

    


    [youtube] MbhXIddT2YY: Downloading webpage&#xA;Exception ignored in: <function at="at" 0x7f1fca7373a0="0x7f1fca7373a0">&#xA;Traceback (most recent call last):&#xA;  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/player.py", line 103, in __del__&#xA;    self.cleanup()&#xA;  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/player.py", line 154, in cleanup&#xA;    proc = self._process&#xA;AttributeError: &#x27;FFmpegPCMAudio&#x27; object has no attribute &#x27;_process&#x27;&#xA;Ignoring exception in command play:&#xA;Traceback (most recent call last):&#xA;  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped&#xA;    ret = await coro(*args, **kwargs)&#xA;  File "/home/runner/Myoojic-Baat/music.py", line 42, in play&#xA;    voice.play(discord.FFmpegPCMAudio(url2, **FFMPEG_OPTIONS))&#xA;TypeError: __init__() got an unexpected keyword argument &#x27;option&#x27;&#xA;&#xA;The above exception was the direct cause of the following exception:&#xA;&#xA;Traceback (most recent call last):&#xA;  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke&#xA;    await ctx.command.invoke(ctx)&#xA;  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke&#xA;    await injected(*ctx.args, **ctx.kwargs)&#xA;  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped&#xA;    raise CommandInvokeError(exc) from exc&#xA;discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: __init__() got an unexpected keyword argument &#x27;option&#x27;&#xA;</function>

    &#xA;

    I found a related post with a similar error : AttributeError : ’FFmpegPCMAudio’ object has no attribute ’start’&#xA;But the solution there did not fix my problem.

    &#xA;

  • 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 :

    &#xA;

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

    &#xA;

    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

    &#xA;

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

    &#xA;

    The error I get returned is :

    &#xA;

    Traceback (most recent call last):&#xA;  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped&#xA;    ret = await coro(*args, **kwargs)&#xA;  File "app2.py", line 75, in play&#xA;    voice.play(discord.FFmpegPCMAudio(&#x27;test.mp3&#x27;), after=your_check)&#xA;  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\player.py", line 225, in __init__&#xA;    super().__init__(source, executable=executable, args=args, **subprocess_kwargs)&#xA;  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\player.py", line 138, in __init__&#xA;    self._process = self._spawn_process(args, **kwargs)&#xA;  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\player.py", line 147, in _spawn_process&#xA;    raise ClientException(executable &#x2B; &#x27; was not found.&#x27;) from None&#xA;discord.errors.ClientException: ffmpeg was not found.&#xA;&#xA;The above exception was the direct cause of the following exception:&#xA;&#xA;Traceback (most recent call last):&#xA;  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke&#xA;    await ctx.command.invoke(ctx)&#xA;  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke&#xA;    await injected(*ctx.args, **ctx.kwargs)&#xA;  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped&#xA;    raise CommandInvokeError(exc) from exc&#xA;discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: ffmpeg was not found.&#xA;

    &#xA;

    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.

    &#xA;

  • Discord v13 audioPlayer playing state changed to idle for unknown reason

    14 septembre 2021, par zS1L3NT

    When I play a song, the audioPlayer's state goes from buffering to playing to idle for no reason, without throwing any errors too. The weird thing is that the code I made runs perfectly fine on my Windows 11 Laptop. The error only occurs when I run the exact same code on my Ubuntu VPS. Here is the dependency report when run on the Ubuntu VPS

    &#xA;

    --------------------------------------------------&#xA;Core Dependencies&#xA;- @discordjs/voice: 0.6.0&#xA;- prism-media: 1.3.2&#xA;&#xA;Opus Libraries&#xA;- @discordjs/opus: 0.6.0&#xA;- opusscript: not found&#xA;&#xA;Encryption Libraries&#xA;- sodium: not found&#xA;- libsodium-wrappers: 0.7.9&#xA;- tweetnacl: not found&#xA;&#xA;FFmpeg&#xA;- version: 4.4-static https://johnvansickle.com/ffmpeg/&#xA;- libopus: yes&#xA;--------------------------------------------------&#xA;

    &#xA;

    What should I do to fix this ?

    &#xA;