Recherche avancée

Médias (0)

Mot : - Tags -/publication

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

Autres articles (102)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (11257)

  • discord.ext.commands.errors.CommandInvokeError : Command raised an exception : ClientException : ffmpeg was not found

    22 juillet 2022, par MST

    I made a music bot on Replit but, when running my code I get this error :
discord.ext.commands.errors.CommandInvokeError : Command raised an exception : ClientException : ffmpeg was not found.

    


    Can someone help me fix this ?

    


    main.py

    


    import discord
from discord.ext import commands
import music

cogs = [music]

client = commands.Bot(command_prefix='!', intents = discord.Intents.all())

for i in range(len(cogs)):
  cogs[i].setup(client)


client.run("token")


    


    music.py

    


    import discord
from discord.ext import commands
import youtube_dl
import ffmpeg

class music(commands.Cog):
  def __init__(self,client):
    self.client = client

  @commands.command(name="join")
  async def join(self,ctx):
    if ctx.author.voice is None:
      await ctx.send("You are not in a Voice Channel!")
    voice_channel = ctx.author.voice.channel
    if ctx.voice_client is None:
      await voice_channel.connect()
    else:
      await ctx.voice_client.move_to(voice_channel)

  @commands.command(name="disconnect")
  async def disconnect(self,ctx):
    await ctx.voice_client.disconnect()

  @commands.command(name="play")
  async def play(self,ctx,url):
    ctx.voice_client.stop()
    FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
    YDL_OPTIONS = {'format':"bestaudio"}
    vc = ctx.voice_client

    with youtube_dl.YoutubeDL(YDL_OPTIONS) as ydl:
      info = ydl.extract_info(url, download=False)
      url2 = info['formats'][0]['url']
      source = await discord.FFmpegOpusAudio.from_probe(url2,**FFMPEG_OPTIONS)
      vc.play(source)


  @commands.command(name="pause")
  async def pause(self,ctx):
    await ctx.voice_client.pause()
    await ctx.send("Paused Playing Music!")

  @commands.command(name="resume")
  async def resume(self,ctx):
    await ctx.voice_client.resume()
    await ctx.send("Resumed Playing Music!")

def setup(client):
  client.add_cog(music(client))


    


    So, The bot is able to join the Voice Channel but when I ask it to play a song, it gives this error :

    


    [youtube] Pkh8UtuejGw: Downloading webpage
[youtube] Pkh8UtuejGw: Downloading player afeb58ff
Ignoring exception in command play:
Traceback (most recent call last):
  File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/runner/DiscordMusicBotTest/music.py", line 34, in play
    source = await discord.FFmpegOpusAudio.from_probe(url2,**FFMPEG_OPTIONS)
  File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/player.py", line 387, in from_probe
    return cls(source, bitrate=bitrate, codec=codec, **kwargs)
  File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/player.py", line 324, in __init__
    super().__init__(source, executable=executable, args=args, **subprocess_kwargs)
  File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/player.py", line 138, in __init__
    self._process = self._spawn_process(args, **kwargs)
  File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/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 "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/runner/DiscordMusicBotTest/venv/lib/python3.8/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.


    


  • How do I make libavformat reconnect when connection is reset by peer ?

    6 mai 2024, par user24897675

    I am opening a network file via HTTPS like this :

    


    avformat_open_input(&m_format, "https://www.example.com/file.mp4", nullptr, nullptr);


    


    It works, however sometimes connection is closed and this is logged :

    


    [tls @ 0x7f600ba690] Error in the pull function.
[tls @ 0x7f600ba690] IO error: Connection reset by peer
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f6007e450] Packet corrupt (stream = 0, dts = 24188928).
[aac @ 0x7f60324800] Input buffer exhausted before END element found


    


    I found it possible to setup reconnection by logs from this post. Here are their logs :

    


    [tls @ 0x6e3b440] Error in the pull function.
[tls @ 0x6e3b440] IO error: Connection reset by peer
[https @ 0x6e37900] Will reconnect at 720896 in 0 second(s), error=Connection reset by peer.


    


    Here libavformat does not give up and it tries to reconnect because -reconnect argument was passed in FFmpeg CLI. How can I do the same in code with FFmpeg's libavformat ?

    


  • Merge mp3 files at specific duration in Android

    18 mai 2017, par Gio Vanno

    First I’m new in Android.

    I’m trying to make an app that can combine a lot of music(mp3 files im using) at specific duration with the selected music via seekbar.

    My main plan is to merge multiple audio files at specific time.

    example :
    when i pressed the drum button at 5 sec(via seekbar), and then guitar button at 6 sec.

    when i clicked the merge button, it will merged the selected mp3 file with those 2 mp3 files at their respective time.

    from what i’m searching so far, the possible way is by using ffmpeg from this :

    -How to overlay two audio files using ffmpeg

    -Merge mp3 files using FFmpeg on Android

    but i don’t see them merged at specified time.

    maybe there’s another way besides ffmpeg,or i’ve missed something ?

    thank you