Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (37)

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

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, 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 (...)

Sur d’autres sites (6099)

  • Python Discord Music Bot : Playing next song while current song is playing

    8 février, par Deltrac

    I've been working on a Discord bot and got it working 90% of the time. On some occasions, the bot will be playing a song and it will stop playing and just move to the next song. My assumption is that it's because of how I am handling my play command and the play_next command as well.

    


    I've tried to re-arrange the code, change functionality, etc. without success.

    


    Here are the two commands :

    


    @client.command(name="p")
async def play(ctx, *, search_query: str):
        global bot_disconnect
        try:
        # Only start a song if the user trying to play a song is in a voice channel
            if ctx.author.voice:
                voice_channel = ctx.author.voice.channel
                voice_client = await voice_channel.connect() # Find who played the song and have the bot enter that channel
                voice_clients[voice_client.guild.id] = voice_client
            else:
                await ctx.channel.send("Get in a voice channel")
                return
        except Exception as e:
                print(e)
        try:
            if is_youtube_url(search_query):
                loop = asyncio.get_event_loop() # Let's the bot multi-task (Similar behavior to interrupts in C/C++)
                data = await loop.run_in_executor(None, lambda: ytdl.extract_info(search_query, download = False))
                video_url = data["webpage_url"] # Save the youtube video URL to variable
                song_url = data["url"] # Save the extracted URL to a variable
                title = data["title"]
            else:
                url = f"ytsearch:{search_query}"
                loop = asyncio.get_event_loop() # Let's the bot multi-task (Similar behavior to interrupts in C/C++)
                data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download = False)) 
                entry = data['entries'][0]
                video_url = entry["webpage_url"] # Save the youtube video URL to variable
                song_url = entry["url"] # Save the extracted URL to a variable
                title = entry["title"]

            if ctx.guild.id in voice_clients and voice_clients[ctx.guild.id].is_playing():
                await queue(ctx, search_query = video_url, title = title)
            else:
                player = discord.FFmpegOpusAudio(song_url, **ffmpeg_options) # THIS IS WHAT PLAYS THE ACTUAL SONG!!!!!!
                await ctx.channel.send(f"Now Playing: {video_url} \n[DOWNLOAD LINK HERE]({song_url})") # Send the video URL to discord channel and include a download link as well
                bot_disconnect = False
                voice_clients[ctx.guild.id].play(player, after=lambda e: asyncio.run_coroutine_threadsafe(play_next(ctx), client.loop))
        except Exception as e:
                print(e)



async def play_next(ctx):
    if len(queues) != 0 and queues.get(ctx.guild.id):         
        search_query = queues[ctx.guild.id].pop(0)[0] # Pull the URL from the next index
        loop = asyncio.get_event_loop() # Let's the bot multi-task (Similar behavior to interrupts in C/C++)
        print(f"{search_query}")
        data = await loop.run_in_executor(None, lambda: ytdl.extract_info(search_query, download = False))
        player = discord.FFmpegOpusAudio(data["url"], **ffmpeg_options)
        voice_client = voice_clients[ctx.guild.id]
        voice_client.play(player, after=lambda e: asyncio.run_coroutine_threadsafe(play_next(ctx), client.loop))
        await ctx.channel.send(f"Now Playing: {data['webpage_url']} \n[DOWNLOAD LINK HERE]({data['url']})") # Send the video URL to discord channel and include a download link as well
    else:
        await ctx.send("No songs in queue")


    


    I can also link the full code, if required.

    


  • Converting a color video to 8-bit (per frame) video via FFMPEG

    25 mai 2020, par SilverSurfer

    I wish to convert a color video file (AVI format) to grayscale video (i.e. 8 bits per frame) AVI video via FFMPEG. Any pointers ?

    



    I have tried using gray and yuv420p options in pix_fmt but it they didn't help.

    



    Thank you

    


  • lavu : Document the color properties enumeration values origin

    1er décembre 2016, par Vittorio Giovara
    lavu : Document the color properties enumeration values origin
    
    • [DBH] libavutil/pixfmt.h