
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (100)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe 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 (...)
Sur d’autres sites (6729)
-
ffmpeg best settings for youtube live
24 mars 2023, par MarianoI have this settings for ffmpeg


ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i "rtsp://" -c:v libx264 -b:a 384k -ac 2 -preset slow -crf 18 -profile:v high -bf 2 -pix_fmt yuv420p -movflags +faststart -threads 4 -cpu-used 0 -b:v 5M -r 30 -g 15 -coder 1 -f flv "rtmp://a.rtmp.youtube.com/live2/"



but the quality and speed is not very good,
could some one tell me what at the best settings


thanks


-
Youtube-dl Python3 ERROR : audio conversion failed : No such file or directory
21 avril 2020, par WhiteABI was building a small executable, using the youtube-dl module and it is giving me the following error, and I have tried several things and nothing has worked for me



import pyperclip

url=pyperclip.paste()

os.system('''youtube-dl --no-playlist -x --prefer-ffmpeg --audio-format mp3 --audio-quality 0 '''+ url)




when i try to run it does this



[youtube] Ak6ynwcCv1Q: Downloading webpage
[youtube] Downloading just video Ak6ynwcCv1Q because of --no-playlist
[download] Bad Computer - Disarray [Monstercat Release]-Ak6ynwcCv1Q.webm has already been downloaded
[download] 100% of 4.49MiB
[ffmpeg] Destination: Bad Computer - Disarray [Monstercat Release]-Ak6ynwcCv1Q.mp3
ERROR: audio conversion failed: file:Bad Computer - Disarray [Monstercat Release]-Ak6ynwcCv1Q.mp3: No such file or directory




I believe that I need define a path to the mp3 file but I don't know where this path should be defined


-
Discord music bot doesn't play songs
9 octobre 2023, par Gam3rsCZI have made myself a discord bot that also plays music(it's only for my server so strings with messages are in Czech, but code is in English).
Bot worked a while ago but now it stopped, and I don't know where the problem is


I'm getting these errors : HTTP error 403 Forbidden Server returned 403 Forbidden (access denied) and
C :\Users\Me\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\player.py:711 : RuntimeWarning : coroutine 'music_cog.play_next' was never awaited
self.after(error)
RuntimeWarning : Enable tracemalloc to get the object allocation traceback
[2023-10-09 16:23:47] [INFO ] discord.player : ffmpeg process 17496 successfully terminated with return code of 1.
INFO : ffmpeg process 17496 successfully terminated with return code of 1.


My code is :


import discord
from discord.ext import commands
from yt_dlp import YoutubeDL

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

 self.is_playing = False
 self.is_paused = False
 self.current = ""

 self.music_queue = []
 self.YDL_OPTIONS = {"format": "m4a/bestaudio/best", "noplaylist": "True"}
 self.FFMPEG_OPTIONS = {"before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5", "options": "-vn"}

 self.vc = None

 def search_yt(self, item):
 with YoutubeDL(self.YDL_OPTIONS) as ydl:
 try:
 info = ydl.extract_info("ytsearch:%s" % item, download=False)["entries"][0]
 except Exception:
 return False
 info = ydl.sanitize_info(info)
 url = info['url']
 title = info['title']
 return {'title': title, 'source': url}

 async def play_next(self):
 if len(self.music_queue) > 0:
 self.is_playing = True
 self.current = self.music_queue[0][0]["title"]
 m_url = self.music_queue[0][0]["source"]

 self.music_queue.pop(0)

 await self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
 else:
 self.is_playing = False

 async def play_music(self, ctx):
 try:
 if len(self.music_queue) > 0:
 self.is_playing = True
 m_url = self.music_queue[0][0]["source"]

 if self.vc == None or not self.vc.is_connected():
 self.vc = await self.music_queue[0][1].connect()

 if self.vc == None:
 await ctx.send("Nepodařilo se připojit do hlasového kanálu.")
 return
 else:
 await self.vc.move_to(self.music_queue[0][1])

 self.current = self.music_queue[0][0]["title"]
 self.music_queue.pop(0)

 self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
 else:
 self.is_playing = False

 except:
 print("Something went wrong")
 await ctx.send(content="Něco se pokazilo")

 @commands.command(name="play", help="Plays selected song from YouTube")
 async def play(self, ctx, *args):
 query = " ".join(args)

 voice_channel = ctx.author.voice.channel
 if voice_channel is None:
 await ctx.send("Připojte se do hlasového kanálu!")
 elif self.is_paused:
 self.vc.resume()
 else:
 song = self.search_yt(query)
 if type(song) == type(True):
 await ctx.send("Písničku se nepodařilo stáhnout. Špatný formát, možná jste se pokusili zadat playlist nebo livestream.")
 else:
 await ctx.send("Písnička přidána do řady.")
 self.music_queue.append([song, voice_channel])

 if self.is_playing == False:
 await self.play_music(ctx)
 self.is_playing = True

 @commands.command(name="pause", aliases=["p"], help="Pauses the BOT")
 async def pause(self, ctx, *args):
 if self.is_playing:
 self.is_playing = False
 self.is_paused = True
 self.vc.pause()
 await ctx.send(content="Písnička byla pozastavena.")
 
 elif self.is_paused:
 self.is_playing = True
 self.is_paused = False
 self.vc.resume()
 await ctx.send(content="Písnička byla obnovena.")

 @commands.command(name="resume", aliases=["r"], help="Resumes playing")
 async def resume(self, ctx, *args):
 if self.is_paused:
 self.is_paused = False
 self.is_playing = True
 self.vc.resume()
 await ctx.send(content="Písnička byla obnovena.")

 @commands.command(name="skip", aliases=["s"], help="Skips current song")
 async def skip(self, ctx, *args):
 if self.vc != None and self.vc:
 self.vc.stop()
 await self.play_next()
 await ctx.send(content="Písnička byla přeskočena.")

 @commands.command(name="queue", aliases=["q"], help="Displays song queue")
 async def queue(self, ctx, songs=5):
 retval = ""

 for i in range(0, len(self.music_queue)):
 if i > songs: break
 retval += " " + self.music_queue[i][0]["title"] + "\n"

 if retval != "":
 retval += "```"
 await ctx.send(content=("```Aktuální fronta:\n" + retval))
 else:
 await ctx.send("Řada je prázdná.")

 @commands.command(name="clear", help="Clears the queue")
 async def clear(self, ctx):
 if self.vc != None and self.is_playing:
 self.vc.stop()
 self.music_queue = []
 await ctx.send("Řada byla vymazána.")

 @commands.command(name="leave", aliases=["dc", "disconnect"], help="Disconnects the BOT")
 async def leave(self, ctx):
 self.is_playing = False
 self.is_paused = False

 if self.vc != None:
 return await self.vc.disconnect(), await ctx.send(content="BOT byl odpojen.")

 else:
 return await ctx.send("BOT není nikde připojen.")
 
 @commands.command(name="current", help="Displays the current song")
 async def current(self, ctx):
 current = self.current
 retval = f"```Právě hraje:\n {current}```"
 if current != "":
 await ctx.send(retval)
 else:
 await ctx.send("Aktuálně nic nehraje.")



I already tried everything I can think of(which isn't a lot because I suck at programming), and also tried searching for some solution on the internet, but nothing worked.