
Recherche avancée
Autres articles (111)
-
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (15351)
-
How do I add a queue to my music bot using Discrod.py FFmpeg and youtube_dl ?
28 septembre 2022, par Виктор ЛисичкинI'm writing my bot for discord, I can't figure out how to track the end of a song to lose the next one. I sort of figured out the piece of music, but I don't fully understand what to do next. Here is my code for main.py


from discord.ext import commands, tasks
from config import settings
from music_cog import music_cog
bot = commands.Bot(command_prefix='!',intents = discord.Intents.all())

@bot.event
async def on_ready():
 print(f'We have logged in as {bot.user}')
 await bot.add_cog(music_cog(bot))

bot.run(settings['token'])



and And this is for cog with music


from discord.ext import commands
from youtube_dl import YoutubeDL
YDL_OPTIONS = {'format': 'worstaudio/best', 'noplaylist': 'False', 'simulate': 'True',
 'preferredquality': '192', 'preferredcodec': 'mp3', 'key': 'FFmpegExtractAudio'}
FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
queue = []
class music_cog(commands.Cog):
 def __init__(self, bot):
 self.bot = bot
 @commands.command(pass_context=True)
 async def play(self,ctx, *, arg):
 global queue
 queue.append(arg)
 def playing():
 for song in queue:
 with YoutubeDL(YDL_OPTIONS) as ydl:
 if 'https://' in song:
 info = ydl.extract_info(song, download=False)
 else:
 info = ydl.extract_info(f"ytsearch:{song}", download=False)['entries'][0]

 url = info['formats'][0]['url']
 queue.pop(0)
 vc.play(discord.FFmpegPCMAudio(executable="ffmpeg", source=url, **FFMPEG_OPTIONS))
 voice_client = discord.utils.get(self.bot.voice_clients, guild=ctx.guild)
 if not ctx.message.author.voice:
 await ctx.send("You are not connected to voice chanel")
 elif voice_client:
 queue.append(arg)
 else:
 vc = await ctx.message.author.voice.channel.connect()
 playing()
 @commands.command(pass_context = True)
 async def disconect(self, ctx):
 server = ctx.message.guild.voice_client
 if ctx.message.guild.voice_client:
 await server.disconnect()
 else:
 await ctx.send("I am not connected")

 @commands.command(pass_context=True)
 async def stop(self, ctx):
 server = ctx.message.guild
 voice_channel = server.voice_client
 voice_channel.pause()

 @commands.command(pass_context=True)
 async def resumue(self, ctx):
 server = ctx.message.guild
 voice_channel = server.voice_client
 voice_channel.resume()



-
FFMPEG stream desktop to youtube
3 juillet 2018, par user8222409There are tutorials out there on how to stream to youtube using ffmpeg, and I have that part of the code done.
However, I do not know how to stream the desktop in ffmpeg. The tutorials online only show usage of web cams. Anyway, What software do I use to capture the screen and stream using ffmpeg.
Can I do this natively in ffmpeg. If so, how ?what I have so far is
ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i pipe:0 -c:v copy -c:a aac -ab 128k -g 40 -strict experimental -f flv -r 30 rtmp://a.rtmp.youtube.com/live2/$1
where the
$1
is a command line param. -
youtube-dl download best quality and then convert to mp4 and mp3
31 mars 2017, par JoJotaI’m trying to download the best audio and video formats of a video with youtube-dl in python. After the download has finished youtube-dl should convert the video to mp4 and the audio to mp3 with the best video and audio quality. The original video and audio files should then get removed after the conversion is done.
Is it possible to do this with only one command or especially with a maximum of two downloads (best video and best audio) ?