Recherche avancée

Médias (91)

Autres articles (14)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • 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 (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (2289)

  • discord.py [mp3 @ 000001dc99bec540] Estimating duration from bitrate, this may be inaccurate

    21 mars 2021, par user13690031

    I have a problem with "[mp3 @ 000001dc99bec540] Estimating duration from bitrate, this may be inaccurate", using discord.py. Everything works (bot is speaking the text, which we tell him), but, at the end, always shows it. How can I solve it ?

    



            if _command == "speak":
            try:
                await message.delete()
                try:
                    error = _message[1]
                except IndexError:
                    message = await _channel.send("Where is my text, which I have to speak?!")
                    await asyncio.sleep(3)
                    await message.delete()
                    return
                channel = message.author.voice.channel
                voice = discord.utils.get(client.voice_clients, guild=_guild)
                if voice and voice.is_connected():
                    await voice.move_to(channel)
                else:
                    voice = await channel.connect()
                tts = gTTS(text=text, lang='en')
                tts.save("pcvoice.mp3")
                voice.play(discord.FFmpegPCMAudio(executable=r"C:\ffmpeg\bin\ffmpeg.exe", source="pcvoice.mp3"))
            except discord.errors.ClientException:
                await _channel.send("Come on! I am already playing something!")


    


  • Music discord js bot issue

    12 mars 2019, par Eric Sim

    Does anyone know how I would go about resolving this error ?

    My Discord.JS music bot would just simply crashes when trying to play some old songs. The Discord.JS bot is currently being hosted on herokuapp.

    19-03-12T15:08:08.576483+00:00 app[worker.1]: /app/node_modules/ytdl-core-discord/node_modules/prism-media/src/core/FFmpeg.js:41
    2019-03-12T15:08:08.576496+00:00 app[worker.1]:     this._readableState = this._reader._readableState;
    2019-03-12T15:08:08.576499+00:00 app[worker.1]:                                        ^
    2019-03-12T15:08:08.576501+00:00 app[worker.1]:
    2019-03-12T15:08:08.576502+00:00 app[worker.1]: TypeError: Cannot read property '_readableState' of undefined
    2019-03-12T15:08:08.576504+00:00 app[worker.1]:     at new FFmpeg (/app/node_modules/ytdl-core-discord/node_modules/prism-media/src/core/FFmpeg.js:41:40)
    2019-03-12T15:08:08.576506+00:00 app[worker.1]:     at ytdl.getInfo (/app/node_modules/ytdl-core-discord/index.js:23:24)
    2019-03-12T15:08:08.576508+00:00 app[worker.1]:     at fn (/app/node_modules/ytdl-core/lib/info.js:365:9)
    2019-03-12T15:08:08.576510+00:00 app[worker.1]:     at util.parallel (/app/node_modules/ytdl-core/lib/info.js:232:11)
    2019-03-12T15:08:08.576511+00:00 app[worker.1]:     at checkDone (/app/node_modules/ytdl-core/lib/util.js:405:7)
    2019-03-12T15:08:08.576513+00:00 app[worker.1]:     at SAXParser.parser.onend (/app/node_modules/ytdl-core/lib/info.js:288:26)
    2019-03-12T15:08:08.576515+00:00 app[worker.1]:     at emit (/app/node_modules/sax/lib/sax.js:624:35)
    2019-03-12T15:08:08.576517+00:00 app[worker.1]:     at end (/app/node_modules/sax/lib/sax.js:667:5)
    2019-03-12T15:08:08.576519+00:00 app[worker.1]:     at SAXParser.write (/app/node_modules/sax/lib/sax.js:975:14)
    2019-03-12T15:08:08.576520+00:00 app[worker.1]:     at SAXParser.close (/app/node_modules/sax/lib/sax.js:157:38)
  • How to get best audio quality on music bot using discord.py ?

    9 mai 2021, par user28606

    I've built a discord music bot in discord.py but for some reason, it doesn't play music in as high quality as Fredboat or Rythm(so I don't think voice chat's bitrate is the problem). I've tried a couple of things online.

    


    The only thing that improved quality a little bit was downloading the song before playing it. But the quality was still far from anything like Fredboat's. It's also very impractical since downloading a 1h song takes a while and is space consuming.

    


    I'm interested in how to fix this and the explanation for why this is happening.

    


    This is the code we're currently using for the music bot :

    


    from discord import FFmpegPCMAudio
import discord
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from apscheduler.triggers.cron import CronTrigger
from discord.ext import commands, tasks
from youtubesearchpython import VideosSearch

class cmd_music(commands.Cog, name="music_commands"):

    def __init__(self, bot):
        self.bot = bot
        self.music_queue = []
        self.scheduler = AsyncIOScheduler()
        self.scheduler.add_job(self.check_queue, CronTrigger(second="0,5,10,15,20,25,30,35,40,45,50,55"))
        self.scheduler.start()
    
    async def play_raw(self, voice_client):
        if not self.music_queue:
            return

        YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist':'True'}
        FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
        if not voice_client.is_playing():
            with YoutubeDL(YDL_OPTIONS) as ydl:
                info = ydl.extract_info(self.music_queue.pop(0), download=False)
            URL = info['formats'][0]['url']
            voice_client.play(FFmpegPCMAudio(URL, **FFMPEG_OPTIONS))
            voice_client.is_playing()

    async def check_queue(self):
        if not self.bot.voice_clients: return
        
        client = self.bot.voice_clients[0]
        if not client.is_playing():
            if self.music_queue:
                await self.play_raw(client)
           
        
    @commands.command(brief="join")
    async def join(self, ctx):
        await ctx.author.voice.channel.connect()

    @commands.command(brief="leave")
    async def leave(self, ctx):
        await ctx.voice_client.disconnect()
        self.music_queue = []

    @commands.command(brief="play")
    async def play(self, ctx, *name):
        url = VideosSearch(" ".join(name[:]), 1).result().get("result")[0].get("link")
        self.music_queue.append(url)
        await ctx.send("Now playing: " + url)

    @commands.command(brief="skip")
    async def skip(self, ctx):
        await ctx.send("Skipped current song")
        ctx.voice_client.stop()
        if self.music_queue:
            await self.play_raw(ctx.voice_client)```