Recherche avancée

Médias (91)

Autres articles (73)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (6168)

  • How to make a Seek command in discord py with ytdl and ffmpeg

    15 septembre 2021, par Utsarg

    I am making a discord py bot that plays music with ytdl and ffmpeg, is there a way to seek to a specific part in the song ?

    


  • 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)``` 


    


  • How to start music at a specific time

    16 mars 2019, par INeed ADollar

    I want to start a song file at a specific time with ffmpeg in python and I don’t know if this is possible. I make a discord bot and I want to make a command about this. Thank you for any help !