Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (94)

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

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (10612)

  • ffmpeg : Resampling with input channels greater than 2 unsupported ?

    13 septembre 2011, par user739711

    This question is already been asked but because that thread is old I am posting again.

    When a video file has 5.1 audio channels ffmpeg is not able to convert it to another format giving error :

    "Resampling with input channels greater than 2 unsupported"

    I saw some blogs saying I can modify the code and or patch ffmpeg for it.

    Any solution found yet ?

  • avformat/matroskaenc : Ignore AttachedFiles for track limit

    27 novembre 2019, par Andreas Rheinhardt
    avformat/matroskaenc : Ignore AttachedFiles for track limit
    

    Attachments are streams in FFmpeg, but they are not tracks in Matroska.
    Yet they were counted when checking a limit for the number of tracks that
    the Matroska muxer imposes. This is unnecessary and has been changed.

    Also use unsigned variables for the variables denoting TrackNumbers as
    negative TrackNumbers are impossible.

    (The Matroska file format actually has practically no limit on the
    number of tracks and this is purely what our muxer supports. But even if
    this limit were removed/relaxed in the future, it still makes sense to
    use small TrackNumbers as this patch does, because greater numbers need
    more bytes to encode.)

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavformat/matroskaenc.c
  • Discord music bot won't join Voice channel

    16 mars 2024, par Skely

    I followed a tutorial for creating a music bot in discord, but it will not join my vc no matter what. Every command works and it gives the correct responses and songs is in the queue. The bot have every permission know to man, but it still won't join. Any way to fix this issue ?&#xA;Thanks in advance !!

    &#xA;

    This is my code and files

    &#xA;

    main.py

    &#xA;

    import discord&#xA;from discord.ext import commands&#xA;import os&#xA;import asyncio&#xA;&#xA;from help_cog import help_cog&#xA;from music_cog import music_cog&#xA;&#xA;bot = commands.Bot(&#xA;    command_prefix="?", &#xA;    intents=discord.Intents.all(),&#xA;    help_command=None&#xA;)&#xA;&#xA;async def main():&#xA;    async with bot:&#xA;        await bot.add_cog(help_cog(bot))&#xA;        await bot.add_cog(music_cog(bot))&#xA;        await bot.start(os.getenv("TOKEN"))&#xA;&#xA;asyncio.run(main())&#xA;

    &#xA;

    music_cog.py

    &#xA;

    import discord&#xA;from discord.ext import commands&#xA;&#xA;from yt_dlp import YoutubeDL&#xA;&#xA;import yt_dlp as youtube_dl&#xA;&#xA;class music_cog(commands.Cog):&#xA;    def __init__(self, bot):&#xA;        self.bot = bot&#xA;&#xA;        self.is_playing = False&#xA;        self.is_paused = False&#xA;&#xA;        self.music_queue = []&#xA;        self.YDL_OPTIONS = {"format": "bestaudio", "postprocessors": [{"key": "FFmpegExtractAudio", "preferredcodec": "mp3", "preferredquality": "192",}]}&#xA;        self.FFMPEG_OPTIONS = {"before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5", "options": "-vn"}&#xA;&#xA;        self.vc = None&#xA;        print("Success")&#xA;&#xA;    def search_yt(self, item):&#xA;        with YoutubeDL(self.YDL_OPTIONS) as ydl:&#xA;            try:&#xA;                info = ydl.extract_info(f"ytsearch:{item}", download=False)["entries"][0]&#xA;            except Exception:&#xA;                return False&#xA;        return {"source": info["url"], "title": info["title"]}&#xA;&#xA;    def play_next(self):&#xA;        if len(self.music_queue) > 0:&#xA;            self.is_playing = True&#xA;&#xA;            m_url = self.music_queue[0][0]["source"]&#xA;&#xA;            self.music_queue.pop(0)&#xA;&#xA;            self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())&#xA;        else:&#xA;            self.is_playing = False&#xA;&#xA;    async def play_music(self, ctx):&#xA;        if len(self.music_queue) > 0:&#xA;            self.is_playing = True&#xA;            m_url = self.music_queue[0][0]["source"]&#xA;&#xA;            if self.vc == None or not self.vc.is_connected():&#xA;                self.vc = await self.music_queue[0][1].connect()&#xA;&#xA;                if self.vc == None:&#xA;                    await ctx.send("Could not connect to the voice channel")&#xA;                    return&#xA;            else:&#xA;                await self.vc.move_to(self.music_queue[0][1])&#xA;            &#xA;            self.music_queue.pop(0)&#xA;&#xA;            self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())&#xA;&#xA;        else:&#xA;            self.is_playing = False&#xA;&#xA;    @commands.command(name="play", aliases=["p", "playing"], help="Play the selected song from YouTube")&#xA;    async def play(self, ctx, *args):&#xA;        query = " ".join(args)&#xA;&#xA;        voice_channel = ctx.author.voice.channel&#xA;        if voice_channel is None:&#xA;            await ctx.send("Connect to a voice channel!")&#xA;        elif self.is_paused:&#xA;            self.vc.resume()&#xA;        else:&#xA;            song = self.search_yt(query)&#xA;            if type(song) == type(True):&#xA;                await ctx.send("Could not download the song. Incorrect format, try a different keyword")&#xA;            else:&#xA;                await ctx.send("Song added to queue")&#xA;                self.music_queue.append([song, voice_channel])&#xA;&#xA;                if self.is_playing == False:&#xA;                    await self.play_music(ctx)&#xA;    &#xA;    @commands.command(name="pause", help="Pauses the current song being played")&#xA;    async def pause(self, ctx, *args):&#xA;        if self.is_playing:&#xA;            self.is_playing = False&#xA;            self.is_paused = True&#xA;            self.vc.pause()&#xA;        elif self.is_paused:&#xA;            self.is_playing = True&#xA;            self.is_paused = False&#xA;            self.vc.resume()&#xA;&#xA;    @commands.command(name="resume", aliases=["r"], help="Resumes playing the current song")&#xA;    async def resume(self, ctx, *args):&#xA;        if self.is_paused:&#xA;            self.is_playing = True&#xA;            self.is_paused = False&#xA;            self.vc.resume()&#xA;        &#xA;    @commands.command(name="skip", aliases=["s"], help="Skips the currently played song")&#xA;    async def skip(self, ctx, *args):&#xA;        if self.vc != None and self.vc:&#xA;            self.vc.stop()&#xA;            await self.play_music(ctx)&#xA;&#xA;    @commands.command(name="queue", aliases=["q"], help="Displays all the songs currently in queue")&#xA;    async def queue(self, ctx):&#xA;        retval = ""&#xA;&#xA;        for i in range(0, len(self.music_queue)):&#xA;            if i > 4: break&#xA;            retval &#x2B;= self.music_queue[i][0]["title"] &#x2B; "\n"&#xA;&#xA;        if retval != "":&#xA;            await ctx.send(retval)&#xA;        else:&#xA;            await ctx.send("No music in the current queue")&#xA;    &#xA;    @commands.command(name="clear", aliases=["c", "bin"], help="Stops the current song and clears the queue")&#xA;    async def clear(self, ctx, *args):&#xA;        if self.vc != None and self.is_playing:&#xA;            self.vc.stop()&#xA;        self.music_queue = []&#xA;        await ctx.send("Music queue cleared")&#xA;&#xA;    @commands.command(name="leave", aliases=["disconnect", "l", "d"], help="Kick the bot from the voice channel")&#xA;    async def leave(self, ctx):&#xA;        self.is_playing = False&#xA;        self.is_paused = False&#xA;        await self.vc.disconnect()&#xA;

    &#xA;

    help_cog.py

    &#xA;

    import discord&#xA;from discord.ext import commands&#xA;&#xA;class help_cog(commands.Cog):&#xA;    def __init__(self, bot):&#xA;        self.bot = bot&#xA;&#xA;        self.help_message = """&#xA;        Help message&#xA;"""&#xA;&#xA;        self.text_channel_text = []&#xA;    &#xA;    @commands.Cog.listener()&#xA;    async def on_ready(self):&#xA;        for guild in self.bot.guilds:&#xA;            for channel in guild.text_channels:&#xA;                self.text_channel_text.append(channel)&#xA;&#xA;        await self.send_to_all(self.help_message)&#xA;&#xA;    async def send_to_all(self, msg):&#xA;        for text_channel in self.text_channel_text:&#xA;            await text_channel.send(msg)&#xA;        &#xA;    @commands.command(name="help", help="Displays all the available commands")&#xA;    async def help(self, ctx):&#xA;        await ctx.send(self.help_message)&#xA;

    &#xA;