
Recherche avancée
Médias (2)
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
Autres articles (42)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 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, parPar 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 (...)
Sur d’autres sites (4928)
-
DiscordJS error : FFmpeg/avconv not found ! showing up after installing it
16 mai 2020, par DataDeceI've been installed the FFmpeg extension using npm, and git also, and this following error still shows itself...



Successfully connected.
Error: FFmpeg/avconv not found!
 at Function.getInfo (D:\bot\node_modules\prism-media\src\core\FFmpeg.js:130:11)
 at Function.create (D:\bot\node_modules\prism-media\src\core\FFmpeg.js:143:38)
 at new FFmpeg (D:\bot\node_modules\prism-media\src\core\FFmpeg.js:44:27) at AudioPlayer.playUnknown (D:\bot\node_modules\discord.js\src\client\voice\player\BasePlayer.js:47:20)
 at VoiceConnection.play (D:\bot\node_modules\discord.js\src\client\voice\util\PlayInterface.js:71:28)
 at D:\bot\index.js:36:47




I don't know what to do also...
I'll be happy for help ;)


-
why ffmpeg process successfully terminated with return code of 1 without play anything
24 juillet 2023, par Exc`I tried replacing youtube_dl with yt_dlp and replaced some of the code, the code worked fine but when using the command, the bot doesn't play music but immediately ffmpeg process 15076 successfully terminated with return code of 1


Is there a problem with my code or the ffmpg option or ytdlp option that doesn't support the yt_dlp library ?`


self.YTDL_OPTIONS = {
 'format': 'bestaudio/best',
 'outtmpl': 'F:/DISCORD BOT/Ex/music/%(extractor)s-%(id)s-%(title)s.%(ext)s',
 'restrictfilenames': True,
 'retry_max': 'auto',
 'noplaylist': True,
 'nocheckcertificate': True,
 'ignoreerrors': True,
 'logtostderr': False,
 'quiet': True,
 'no_warnings': True,
 'default_search': 'auto',
 'source_address': '0.0.0.0',
 'postprocessors': [{
 'key': 'FFmpegExtractAudio',
 'preferredcodec': 'mp3',
 'preferredquality': '192',
 }],
 'youtube_api_key': 'api'
 }
self.FFMPEG_OPTIONS = {
 'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
 'options': '-vn',
 'executable':r'F:\DISCORD BOT\Ex\ffmpeg\bin\ffmpeg.exe'
 }

 
 @commands.hybrid_command(
 name="play",
 aliases=["p"],
 usage="",
 description="KARAUKENAN.",
 
 )
 @app_commands.describe(
 judul_lagu="link ato judul lagunya"
 )
 async def play(self, ctx, judul_lagu:str):
 await ctx.defer()
 voice_channel = ctx.author.voice
 if not voice_channel or not voice_channel.channel:
 await ctx.send("Join voice channel dulu gblk!")
 return

 voice_channel = voice_channel.channel
 song = self.search_song(judul_lagu)
 if not song:
 await ctx.send("Lagnya tdk ditemukan, coba keword lain.")
 return

 if not self.bot.voice_clients:
 voice_client = await voice_channel.connect()
 else:
 voice_client = self.bot.voice_clients[0]
 if voice_client.channel != voice_channel:
 await voice_client.move_to(voice_channel)

 self.music_queue.append([song, voice_client])
 if not self.is_playing:
 await self.play_music(ctx)
 
 async def play_music(self, ctx):
 self.is_playing = True
 while len(self.music_queue) > 0:
 song = self.music_queue[0][0]
 voice_client = self.music_queue[0][1]
 await ctx.send(f"Playing {song['title']}")

 voice_client.play(discord.FFmpegPCMAudio(song['source'], **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
 voice_client.is_playing()

 while voice_client.is_playing():
 await asyncio.sleep(1)

 self.music_queue.pop(0)
 self.is_playing = False

 await ctx.send("Queue is empty.")
 voice_client.stop()

 def play_next(self):
 if len(self.music_queue) > 0:
 self.is_playing = False

 def search_song(self, judul_lagu):
 ydl = yt_dlp.YoutubeDL(self.YTDL_OPTIONS)
 with ydl:
 try:
 info = ydl.extract_info(f"ytsearch:{judul_lagu}", download=False)['entries'][0]
 return {'source': info['formats'][0]['url'], 'title': info['title']}
 except Exception:
 return None





when i use /play the bot sucess serch song but immediately terminate does not play any music


2023-04-10 13:06:45 INFO discord.voice_client Connecting to voice...
2023-04-10 13:06:45 INFO discord.voice_client Starting voice handshake... (connection attempt 1)
2023-04-10 13:06:46 INFO discord.voice_client Voice handshake complete. Endpoint found singapore11075.discord.media
2023-04-10 13:06:50 INFO discord.player ffmpeg process 15076 successfully terminated with return code of 1.





-
How to delete mp3 file after the bot played it
8 mars 2021, par EckigerLucaI am trying to create a music bot and now I want the bot to delete the current playing song after it finished playing. There's my code :


import asyncio

import os
import discord
from discord.embeds import Embed
from discord.file import File
from discord.player import AudioPlayer
from youtube_dl.utils import smuggle_url, update_url_query
from youtube_search import YoutubeSearch
import discord
from discord.ext.commands import bot
import youtube_dl
from discord.ext import commands
from youtube_dl import YoutubeDL

youtube_dl.utils.bug_reports_message = lambda: ''

ytdl_format_options = {
 'format': 'bestaudio/best',
 'outtmpl': '/music_files/%(id)s.mp3',
 'restrictfilenames': True,
 'noplaylist': True,
 'nocheckcertificate': True,
 'ignoreerrors': False,
 'logtostderr': False,
 'quiet': True,
 'no_warnings': True,
 'default_search': 'auto',
 'source_address': '0.0.0.0' 
}

ffmpeg_options = {
 'options': '-vn'
}

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)


class YTDLSource(discord.PCMVolumeTransformer):
 def __init__(self, source: discord.FFmpegPCMAudio, *, data: dict, volume=0.5):
 super().__init__(source, volume)

 self.data = data

 self.title = data.get('title')
 self.thumbnail = data.get('thumbnail')
 self.url = data.get('webpage_url')
 self.uploader = data.get('uploader')
 self.uploader_url = data.get('uploader_url')

 @classmethod
 async def from_url(cls, url, *, loop=None, stream=False):
 loop = loop or asyncio.get_event_loop()
 data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))

 if 'entries' in data:
 # take first item from a playlist
 data = data['entries'][0]

 filename = data['url'] if stream else ytdl.prepare_filename(data)
 return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)

class Music(commands.Cog):
 def __init__(self, bot):
 self.bot = bot


 @commands.command()
 async def play(self, ctx, *, url):
 global player
 """Plays from a url (almost anything youtube_dl supports)"""
 async with ctx.typing():
 player = await YTDLSource.from_url(url, loop=self.bot.loop)
 ctx.voice_client.play(player, after=lambda e: print('Player error: %s' % e) if e else None)

 await ctx.send("Started playing!")
 @play.before_invoke
 async def ensure_voice(self, ctx):
 if ctx.voice_client is None:
 if ctx.author.voice:
 await ctx.author.voice.channel.connect()
 else:
 await ctx.send("You are not connected to a voice channel.")
 raise commands.CommandError("Author not connected to a voice channel.")
 elif ctx.voice_client.is_playing():
 ctx.voice_client.stop()

def setup(client):
 client.add_cog(Music(client))



It's saving the files to a folder called "music_files" with the format videoid.mp3
I noticed that it's logging something in the cmd when
logging.basicConfig(level=logging.INFO)
is added to the main.py file under the imports, is there maybe a way to use it ?

Note : The code is a modified version of basic_voice.py by Rapptz.


Edit : I found a way :


folder = './music_files'
 for song in os.listdir(folder):
 file_path = os.path.join(folder, song)
 try:
 if os.path.isfile(file_path) or os.path.islink(file_path):
 os.unlink(file_path)
 elif os.path.isdir(file_path):
 shutil.rmtree(file_path)
 except Exception as e:
 print('Failed to delete %s. Reason %s' % (file_path, e))