Recherche avancée

Médias (91)

Autres articles (104)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (11175)

  • how to resolve error FileNotFoundError : [WinError 2] The system cannot find the file specified when using ffmpeg-python ?

    24 juillet 2021, par Geo

    I'm trying to merge video and audio files together using ffmprg but I keep on receiving this error

    


    ERROR :

    


    Traceback (most recent call last):&#xA;  File "C:\Users\Geo\youtubedownloader\test.py", line 9, in <module>&#xA;    ffmpeg.concat(video,audio, v=1 , a=1).output("C:/Users/Geo/output_video/mergedretweett.mp4/").run()&#xA;  File "C:\Users\Geo\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg\_run.py", line 313, in run&#xA;    process = run_async(&#xA;  File "C:\Users\Geo\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg\_run.py", line 284, in run_async&#xA;    return subprocess.Popen(&#xA;  File "C:\Users\Geo\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 947, in __init__&#xA;    self._execute_child(args, executable, preexec_fn, close_fds,&#xA;  File "C:\Users\Geo\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1416, in _execute_child&#xA;    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,&#xA;FileNotFoundError: [WinError 2] The system cannot find the file specified&#xA;</module>

    &#xA;

    Code :

    &#xA;

    &#xA;&#xA;video = ffmpeg.input("C:/Users/Geo/File.mp4")&#xA;&#xA;audio = ffmpeg.input("C:/Users/Geo/File_audio.mp4")&#xA;&#xA;&#xA;ffmpeg.concat(video,audio, v=1 , a=1).output("C:/Users/Geo/output_video/outputvideo.mp4").run()```&#xA;&#xA;&#xA;

    &#xA;

  • dshow : rename dshow.h to avoid conflict with system header of equal name

    24 mai 2012, par Kyle

    dshow : rename dshow.h to avoid conflict with system header of equal name

  • Need help to create a queue system with a discord.py bot

    19 août 2024, par Zamv

    im trying to create a bot with discord.py, i'll start saying that the bot is for personal use so please don't point out that i shouldn't use ydl in the comments, ty :&#xA;Also, im a beginner, so please tell me what I can improve and any errors there are, I will be happy to listen.&#xA;That said, i've been stuck on trying to create this queue system for songs for the past 3 days, the bot was working perfectly fine and played some urls before i implemented the play_next function, now it doesn't even play the first song, even if it sends confirmation messages both in the terminal that in the discord channel, i know that the code might be a little confusing, but please i really need to know how to make this work

    &#xA;

    i wrote two main functions : "play_next" to play the next song in the queue and "play", the main command.&#xA;Here is my play_next function :

    &#xA;

    async def play_next(self,ctx):&#xA;        if not ctx.voice_client.is_playing: #(don&#x27;t know if this is correct as I also check if the bot isn&#x27;t                     playing anything in the play function)&#xA;            &#xA;            if self.song.queue: &#xA;                next_song = self.song_queue.pop(0) #deleting the first element of the queue, so if we have (song_0, song_1 and song_2) the bot should delete (song_0) making in fact song_1 the "next" song_0&#xA;                try:&#xA;                    ctx.voice_client.play(discord.FFmpegPCMAudio(next_song), &#xA;                                          after=lambda e: self.bot.loop.create_task(self.play_next(ctx))) #Not gonna lie here, i asked chat gpt for this line, it should make the bot automatically play the next song one after another, correct me if I am wrong&#xA;&#xA;#this is not important&#xA;                    embed = discord.Embed(&#xA;                        title="Song",&#xA;                        description=f"Now playing {next_song}",&#xA;                        color = 0x1DB954&#xA;                    )&#xA;                    await ctx.send(embed=embed)&#xA;                except Exception as e:&#xA;                    print(f"Error playing the next song: {e}")&#xA;&#xA;            else:&#xA;                await ctx.voice_client.disconnect()  # disconnecting from the voice channel if the queue is empty&#xA;                print("Disconnected from the voice channel as the queue is empty.")&#xA;

    &#xA;

    I think that the main problem of my bot is the play_next function, but here it is my "play" function :

    &#xA;

        @commands.command(pass_context=True)&#xA;    async def play(self, ctx, url: str):  &#xA;        if ctx.author.voice:  # first checking if the user is in a voice channel&#xA;            if not ctx.voice_client: #then checking if the bot is already connected to a voice channel&#xA;                channel = ctx.message.author.voice.channel &#xA;                try:&#xA;                    await channel.connect()  #then joining&#xA;                    print("I joined the voice channel!")&#xA;                except Exception as e:&#xA;                    print(f"Failed to connect to the voice channel: {e}")&#xA;                    return&#xA;&#xA;            song_path = f"song_{self.song_index}.mp3" #note, im using cogs, i declared self.song_index with the value of 0 &#xA;            self.song_index &#x2B;= 1 #i thought that this was the easiest way of creating a new file for each song&#xA;&#xA;            ydl_opts = {&#xA;                &#x27;format&#x27;: &#x27;bestaudio/best&#x27;,&#xA;                &#x27;postprocesors&#x27;: [{&#xA;                    &#x27;key&#x27;: &#x27;FFmpegExtractAudio&#x27;,&#xA;                    &#x27;preferredcodec&#x27;: &#x27;mp3&#x27;,&#xA;                    &#x27;preferredquality&#x27;: &#x27;192&#x27;,&#xA;                }],&#xA;                &#x27;outtmpl&#x27;: song_path&#xA;            }&#xA;            try:&#xA;                with youtube_dl.YoutubeDL(ydl_opts) as ydl:&#xA;                    print("Starting download...")&#xA;                    ydl.download([url]) #this is where it should download the song provided by the url&#xA;                    print("Download finished.")&#xA;            except Exception as e:&#xA;                await ctx.send(f"Failed to download the song: {e}")&#xA;                return&#xA;&#xA;#i think that the next two if statements are the main threats&#xA;            if os.path.exists(song_path): #if there is atleast 1 song in the queue&#xA;                self.song_queue.append(song_path) #append the next one&#xA;                embed = discord.Embed(&#xA;                    title="Added to Queue!",&#xA;                    description = f"{url} has been added to the queue.",&#xA;                    color=0x33ff33&#xA;                )&#xA;                await ctx.send(embed=embed)&#xA;&#xA;&#xA;                if not ctx.voice_client.is_playing(): #checking if the bot is already playing something, don&#x27;t know if i should put this if statement here&#xA;                    print("Starting playback...")&#xA;                    await self.play_next(ctx) #if nothing is playing, then the bot should play the next song&#xA;&#xA;&#xA;&#xA;            else:&#xA;                await ctx.send("Failed to download or find the audio file.")&#xA;&#xA;        else:&#xA;            embed = discord.Embed(&#xA;                title="❌You must be in a voice channel",&#xA;                color=0xff6666&#xA;            )&#xA;            await ctx.send(embed=embed)&#xA;

    &#xA;

    thanks in advance, i will try to read and answer any questions as soon as possible

    &#xA;