
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 (39)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (4077)
-
Python Discord Music Bot : Playing next song while current song is playing
8 février, par DeltracI've been working on a Discord bot and got it working 90% of the time. On some occasions, the bot will be playing a song and it will stop playing and just move to the next song. My assumption is that it's because of how I am handling my
play
command and theplay_next
command as well.

I've tried to re-arrange the code, change functionality, etc. without success.


Here are the two commands :


@client.command(name="p")
async def play(ctx, *, search_query: str):
 global bot_disconnect
 try:
 # Only start a song if the user trying to play a song is in a voice channel
 if ctx.author.voice:
 voice_channel = ctx.author.voice.channel
 voice_client = await voice_channel.connect() # Find who played the song and have the bot enter that channel
 voice_clients[voice_client.guild.id] = voice_client
 else:
 await ctx.channel.send("Get in a voice channel")
 return
 except Exception as e:
 print(e)
 try:
 if is_youtube_url(search_query):
 loop = asyncio.get_event_loop() # Let's the bot multi-task (Similar behavior to interrupts in C/C++)
 data = await loop.run_in_executor(None, lambda: ytdl.extract_info(search_query, download = False))
 video_url = data["webpage_url"] # Save the youtube video URL to variable
 song_url = data["url"] # Save the extracted URL to a variable
 title = data["title"]
 else:
 url = f"ytsearch:{search_query}"
 loop = asyncio.get_event_loop() # Let's the bot multi-task (Similar behavior to interrupts in C/C++)
 data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download = False)) 
 entry = data['entries'][0]
 video_url = entry["webpage_url"] # Save the youtube video URL to variable
 song_url = entry["url"] # Save the extracted URL to a variable
 title = entry["title"]

 if ctx.guild.id in voice_clients and voice_clients[ctx.guild.id].is_playing():
 await queue(ctx, search_query = video_url, title = title)
 else:
 player = discord.FFmpegOpusAudio(song_url, **ffmpeg_options) # THIS IS WHAT PLAYS THE ACTUAL SONG!!!!!!
 await ctx.channel.send(f"Now Playing: {video_url} \n[DOWNLOAD LINK HERE]({song_url})") # Send the video URL to discord channel and include a download link as well
 bot_disconnect = False
 voice_clients[ctx.guild.id].play(player, after=lambda e: asyncio.run_coroutine_threadsafe(play_next(ctx), client.loop))
 except Exception as e:
 print(e)



async def play_next(ctx):
 if len(queues) != 0 and queues.get(ctx.guild.id): 
 search_query = queues[ctx.guild.id].pop(0)[0] # Pull the URL from the next index
 loop = asyncio.get_event_loop() # Let's the bot multi-task (Similar behavior to interrupts in C/C++)
 print(f"{search_query}")
 data = await loop.run_in_executor(None, lambda: ytdl.extract_info(search_query, download = False))
 player = discord.FFmpegOpusAudio(data["url"], **ffmpeg_options)
 voice_client = voice_clients[ctx.guild.id]
 voice_client.play(player, after=lambda e: asyncio.run_coroutine_threadsafe(play_next(ctx), client.loop))
 await ctx.channel.send(f"Now Playing: {data['webpage_url']} \n[DOWNLOAD LINK HERE]({data['url']})") # Send the video URL to discord channel and include a download link as well
 else:
 await ctx.send("No songs in queue")



I can also link the full code, if required.


-
ffmpeg use amix and adelay to play ad over song
15 mars 2017, par snowkiterdudeI have two mp3 files, one long and one short(a song and an ad). I need the ad to play over the song starting 15 seconds into the song. I also need the volume of the song to fade out/in slightly before and after the ad. I have tried using amix with adelay but just can’t get it right.
here is something close but broken.
ffmpeg -i song.mp3 -i ad.mp3 -filter_complex "amix=inputs=2:duration=first:dropout_transition=2 ;adelay=0|15000" output.mp3
How can I get the ad to mix with the song properly ?
-
ffmpeg use amix and adelay to play ad over song
28 juin 2020, par snowkiterdudeI have two mp3 files, one long and one short(a song and an ad). I need the ad to play over the song starting 15 seconds into the song. I also need the volume of the song to fade out/in slightly before and after the ad. I have tried using amix with adelay but just can't get it right.



here is something close but broken.



ffmpeg -i song.mp3 -i ad.mp3 -filter_complex "amix=inputs=2:duration=first:dropout_transition=2;adelay=0|15000" output.mp3




How can I get the ad to mix with the song properly ?