
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (26)
-
D’autres logiciels intéressants
12 avril 2011, parOn ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
Videopress
Site Internet : (...) -
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone. -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (4173)
-
Music queue, discord.py music bot
29 mars 2021, par Luca M. SchmidtII'm trying to add a queue system to my music cog. When possible it should be able to add songs and play the next song after the one before ended. An explanation on how it should work is sufficient, there's no need to provide any code at all. If any additional information is needed feel free to ask.


My Code (Stripped down a bit) :


# IMPORT


import discord
from discord.ext import commands
import json
import asyncio
import youtube_dl



# LOKALE_VARIABLEN


ytdl_format_options = {
 'format': 'bestaudio/best',
 'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
 '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)

songs = asyncio.Queue()
play_next_song = asyncio.Event()


# ----

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

 self.data = data

 self.title = data.get('title')
 self.url = data.get('url')
 self.thumbnail = data.get('thumbnail')


 @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:
 data = data['entries'][0]

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


# COG_SETUP(START)


class Music(commands.Cog):

 def __init__(self, client):
 self.client = client


 @commands.command()
 async def join(self, ctx, *, channel: discord.VoiceChannel):

 if ctx.voice_client is not None:
 return await ctx.voice_client.move_to(channel)

 await channel.connect()

 @commands.command()
 @commands.cooldown(1, 10, commands.BucketType.user)
 async def play(self, ctx, *, url):

 try:

 async with ctx.typing():
 player = await YTDLSource.from_url(url, loop=self.client.loop, stream=True)
 ctx.voice_client.play(player, after=lambda e: print('Player error: %s' % e) if e else None)

 except:
 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Dies ist eine nicht Unterstützte URL!'
 )

 return await ctx.send(embed=embed)

 embed = discord.Embed(
 title='',
 colour=discord.Colour.blue(),
 description=f'[{format(player.title)}]({player.url})'
 )
 embed.set_author(name='Spielt gerade:')
 embed.set_image(url=player.thumbnail)
 embed.set_footer(text=f'Hinzugefügt von: {ctx.author.name}', icon_url=ctx.author.avatar_url)


 await ctx.send(embed=embed)




 @commands.command()
 async def volume(self, ctx, volume: int):

 if ctx.voice_client is None:

 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Ich bin mit keinem Sprachkanal verbunden!'
 )

 return await ctx.send(embed=embed)

 elif ctx.voice_client is not None:

 if volume in range(0, 201):
 try:
 ctx.voice_client.source.volume = volume / 100

 embed = discord.Embed(
 title='Lautstärke',
 colour=discord.Colour.blue(),
 description=f'Lautstärke auf **{format(volume)}**% gestellt.'
 )
 embed.set_footer(text=f"Angepasst von: {ctx.author.name}", icon_url=ctx.author.avatar_url)

 return await ctx.send(embed=embed)
 except:
 pass

 else:

 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Das ist Lauter, als die Musik geht!'
 )

 return await ctx.send(embed=embed)

 @commands.command()
 async def stop(self, ctx):
 try:

 await ctx.voice_client.disconnect()
 await ctx.message.delete()

 except:
 pass

 @commands.command()
 async def pause(self, ctx):

 if ctx.voice_client.is_playing():

 ctx.voice_client.pause()
 await ctx.message.delete()
 return

 else:

 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Es spielt keine Musik!'
 )

 return await ctx.send(embed=embed)

 @commands.command()
 async def resume(self, ctx):

 if ctx.voice_client.is_paused():

 ctx.voice_client.resume()
 await ctx.message.delete()
 return

 else:

 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Es wurde keine Musik pausiert, darum kann ich auch nichts fortsetzen!'
 )

 return await ctx.send(embed=embed)

 @resume.before_invoke
 @play.before_invoke
 async def ensure_voice(self, ctx):
 if ctx.voice_client is None:
 if ctx.author.voice:
 try:

 await ctx.author.voice.channel.connect()

 except commands.CommandError:
 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Du bist nicht mit einem Sprachkanal verbunden!'
 )

 await ctx.send(embed=embed)

 elif ctx.voice_client.is_playing():
 ctx.voice_client.stop()


# COG_SETUP(END)


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




-
trailing options found on command line ffmpeg
1er juillet 2016, par asadffmpeg complains about trailing options. What parameters are out of the order. I am unable to find any. Please point out some.
/home/ec2-user/bin/ffmpeg -thread_queue_size 1024 -probesize 18M
-re -f rawvideo -framerate 1 -pixel_format rgb32 -video_size 1920x1080
-i pipe:0 -i /home/ec2-user/logo.png
-i /home/ec2-user/testdata/audio.m4a -ss 0 -t 20
-filter_complex "[0:v]vflip[main];[1:v]scale=1920/10:-1[si], [main][si]overlay=5:5:format=rgb,format=yuv420p"
-c:v libx264 /home/ec2-user/output.mp4
-c:v copy -shortest -
Anomalie #3406 (Nouveau) : Notice spip_loader
8 mars 2015, par Franck DalotDans spip_loader 2.5.3
php 5.6.6
prefix des tables : spipdev22
SPIP 3.1.0-alpha [21929]Notice : Constant _SPIP_LOADER_UPDATE_AUTEURS already defined in /.../spip3/spipdev22/spip_loader.php on line 708
Notice : Undefined variable : lang in /home/liendami/www/spip3/spipdev22/spip_loader.php on line 503
Notice : Undefined index : gz in /home/liendami/www/spip3/spipdev22/spip_loader.php on line 464
Notice : Undefined index : gz in /home/liendami/www/spip3/spipdev22/spip_loader.php on line 464
Notice : Undefined index : dest in /home/liendami/www/spip3/spipdev22/spip_loader.php on line 961
Notice : Undefined index : chemin in /home/liendami/www/spip3/spipdev22/spip_loader.php on line 962
Notice : Undefined index : etape in /home/liendami/www/spip3/spipdev22/spip_loader.php on line 966
Notice : Undefined index : range in /home/liendami/www/spip3/spipdev22/spip_loader.php on line 966
Notice : Undefined index : gz in /home/liendami/www/spip3/spipdev22/spip_loader.php on line 464
Notice : Undefined index : spip.0 in /home/liendami/www/spip3/spipdev22/spip_loader.php on line 834
Notice : Undefined index : gz in /home/liendami/www/spip3/spipdev22/spip_loader.php on line 464