Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (4)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Personnaliser l’affichage de mon Médiaspip

    27 mai 2013

    Vous pouvez modifier la configuration du squelette afin de personnaliser votre Médiaspip Voir aussi plus d’informations en suivant ce lien
    Comment supprimer le nombre de vues d’affichage d’un média ?
    Administrer > Gestion du squelette > Pages des articles et médias Cocher dans "Informations non affichées sur les pages de médias" les paramètres que vous ne souhaitez pas afficher.
    Comment supprimer le titre de mon Médiaspip dans le bandeau horizontal ?
    Administrer > Gestion du squelette > (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (3096)

  • discord.py bot doesn't play music

    29 août 2022, par bon ho

    I'm making music bot with discord.py, but bot doesn't play music. The code doesn't send error message.

    


    my code :

    


    @tree.command(name="play", description="play music")
async def playmusic(interaction:Interaction,url_title:str,playfirst:bool=False):
  await interaction.response.send_message("I'm looking for music!!")
  guild=str(interaction.guild.id)
  try:
    queue[guild]
  except KeyError:
    queue[guild]=[]
  if interaction.user.voice is None:
    await interaction.edit_original_response(content="you must join any voice channel")
  else:
    voice_client: discord.VoiceClient = discord.utils.get(client.voice_clients, guild=interaction.guild)
    if voice_client == None:
      await interaction.user.voice.channel.connect()
      voice_client: discord.VoiceClient = discord.utils.get(client.voice_clients, guild=interaction.guild)
    player = await YTDLSource.from_url(url_title, loop=None)
    if playfirst and len(queue[guild])>1:
      queue[guild].insert(1,player)
    else:
      queue[guild].append(player)
    if not voice_client.is_playing():
      voice_client.play(player,after=None)
      await interaction.edit_original_response(content=f"{player.title} playing!!")
    else:
      await interaction.edit_original_response(content=f"{player.title} enqueued!")
    await asyncio.sleep(7)
    await interaction.delete_original_response()


    


    output :

    


    [INFO    ] discord.player: ffmpeg process 12 successfully terminated with return code of -11.


    


    What should I do ?

    


    version :

    


    discord.py 2.0.0 python 3.10.6

    


  • discord.py bot dosen't play music

    29 août 2022, par bon ho

    I'm making music bot with discord.py. but bot doesn't play music. code is alright but music played 0.000000001 seconds and terminated.

    


    my code :

    


    @tree.command(name="play", description="play music")
async def playmusic(interaction:Interaction,url_title:str,playfirst:bool=False):
  await interaction.response.send_message("I'm looking for music!!")
  guild=str(interaction.guild.id)
  try:
    queue[guild]
  except KeyError:
    queue[guild]=[]
  if interaction.user.voice is None:
    await interaction.edit_original_response(content="you must join any voice channel")
  else:
    voice_client: discord.VoiceClient = discord.utils.get(client.voice_clients, guild=interaction.guild)
    if voice_client == None:
      await interaction.user.voice.channel.connect()
      voice_client: discord.VoiceClient = discord.utils.get(client.voice_clients, guild=interaction.guild)
    player = await YTDLSource.from_url(url_title, loop=None)
    if playfirst and len(queue[guild])>1:
      queue[guild].insert(1,player)
    else:
      queue[guild].append(player)
    if not voice_client.is_playing():
      voice_client.play(player,after=nextsong(interaction))
      await interaction.edit_original_response(content=f"{player.title} playing!!")
    else:
      await interaction.edit_original_response(content=f"{player.title} enqueued!")
    await asyncio.sleep(7)
    await interaction.delete_original_response()


    


    nextsong :

    


    def nextsong(interaction:Interaction):
  guild=str(interaction.guild.id)
  print(f"end : {guild}")
  voice_client: discord.VoiceClient = discord.utils.get(client.voice_clients, guild=interaction.guild)
  if len(queue[guild])>0:
    queue[guild].pop(0)
  if not voice_client is None:
    voice_client.stop()
  if not len(queue[guild])==0:
    voice_client: discord.VoiceClient = discord.utils.get(client.voice_clients, guild=interaction.guild)
    voice_client.play(queue[guild][0],after=nextsong(interaction))


    


    output :

    


    end : 1012635532829921291
[INFO    ] discord.player: ffmpeg process 12 successfully terminated with return code of -11.


    


    what should I do ?

    


    version :
discord.py 2.0.0 python 3.10.6

    


  • My bot doesn't play any music when hosted on Heroku

    25 août 2022, par Lucas Silva

    I am creating a music command, working great locally but not on Heroku. I have the following buildpacks :
enter image description here

    


    This is my code :

    


    @commands.command(name="musga", help="coloque um url da musica que deseja reproduzir!")
async def play(self, ctx, arg):
    global vc
    
    try:
        voice_channel = ctx.author.voice.channel
        vc = await voice_channel.connect()
    except:
        print('[ERROR]') #debug

    if vc.is_playing():
        await ctx.send(f'{ctx.author.mention}, Já estou cantando.')

    else:
        with YoutubeDL(self.YDL_OPTIONS) as ydl:
            info = ydl.extract_info(arg, download=False)
        
        URL = info['formats'][0]['url']

        vc.play(discord.FFmpegPCMAudio(executable="ffmpeg", source = URL, **self.FFMPEG_OPTIONS))
                
        while vc.is_playing():
            await sleep(1)


    


    And requirements.txt :

    


    discord.py[voice]
PyNaCL
youtube_dl
ffmpeg


    


    When using the command, my bot joins the channel but doesn't play the music and doesn't print any traceback.