
Recherche avancée
Médias (1)
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (56)
-
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation" -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)
Sur d’autres sites (5153)
-
FFMpeg giving invalid argument error with python subprocess
23 janvier 2020, par Emre ErolI am trying to convert a file or microphone stream to 22050 sample rate and change tempo to double. I can do it using terminal with below code ;
#ffmpeg -i test.mp3 -af asetrate=44100*0.5,aresample=44100,atempo=2 output.mp3
But i can not run this terminal code with python subprocess. I try many things but every time fail. Generaly i am taking Requested output format ’asetrate’ or ’aresample’ or ’atempo’ is not suitable output format errors. Invalid argument. How can i run it and take a stream with pipe ?
song = subprocess.Popen(["ffmpeg.exe", "-i", sys.argv[1], "-f", "asetrate", "22050", "wav", "pipe:1"],
stdout=subprocess.PIPE) -
FFmpeg combine Stream Loop and Filter into one command
5 juin 2022, par AceI'm currently running two FFmpeg commends :


[1] Looping a video for the entire duration of an audio file.


ffmpeg -stream_loop -1 -i 1min-loop.mp4 -i 2min-song.mp3 -shortest -map 0:v:0 -map 1:a:0 -y looped-video.mp4



[2] Taking the resulting file add overlaying image files.


ffmpeg -i looped-video.mp4 -i overlay.png -i art.jpeg -filter_complex "\
 [2:v]scale=400:400[resized-artwork];\
 [0][resized-artwork]overlay=100:100[vid-and-artwork];\
 [vid-and-artwork][1:v]overlay=0:0" final-video.mp4



Is it possible to combine these into one command ? Thx


-
Discord.py - IndexError : list index out of range
23 novembre 2020, par itsnexnHello i start to learn python and i make bot for practie but i got this error


Ignoring exception in command play:
Traceback (most recent call last):
 File "C:\Users\sinad\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
 ret = await coro(*args, **kwargs)
 File "d:\Projects\discord\musicbot.py", line 147, in play
 player = await YTDLSource.from_url(queue[0], loop=client.loop)
IndexError: list index out of range



and i use ffmpeg to convert audio
and i write this bot in youtube and discord.py documentation
itswork well without music commend but if i use that i got error and isnt working idk why ...
this is my first python project so this is happening and its normal
and this is my code :


import discord
from discord.ext import commands, tasks
from discord.voice_client import VoiceClient

import youtube_dl

from random import choice

from youtube_dl.utils import lowercase_escape

youtube_dl.utils.bug_reports_message = lambda: ''

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' # bind to ipv4 since ipv6 addresses cause issues sometimes
}

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

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)

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')

 @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)


client = commands.Bot(command_prefix='.')

status = ['']
queue = []

#print on terminal when is bot ready
@client.event
async def on_ready():
 change_status.start()
 print('Bot is online!')

#Welcome message
@client.event
async def on_member_join(member):
 channel = discord.utils.get(member.guild.channels, name='general')
 await channel.send(f'Welcome {member.mention}! Ready to jam out? See `.help` command for details!')

#ping
@client.command(name='ping', help='This command returns the latency')
async def ping(ctx):
 await ctx.send(f'**Ping!** Latency: {round(client.latency * 1000)}ms')

@client.event
async def on_message(message):

 if message.content in ['hello', 'Hello']:
 await message.channel.send("**wasaaaaaap**")

 await client.process_commands(message)


#join
@client.command(name='join', help='This command makes the bot join the voice channel')
async def join(ctx):
 if not ctx.message.author.voice:
 await ctx.send("You are not connected to a voice channel")
 return

 else:
 channel = ctx.message.author.voice.channel

 await channel.connect()

#queue
@client.command(name='queue', help='This command adds a song to the queue')
async def queue_(ctx, url):
 global queue

 queue.append(url)
 await ctx.send(f'`{url}` added to queue!')

#remove
@client.command(name='remove', help='This command removes an item from the list')
async def remove(ctx, number):
 global queue

 try:
 del(queue[int(number)])
 await ctx.send(f'Your queue is now `{queue}!`')

 except:
 await ctx.send('Your queue is either **empty** or the index is **out of range**')

#play
@client.command(name='play', help='This command plays songs')
async def play(ctx):
 global queue

 server = ctx.message.guild
 voice_channel = server.voice_client

 async with ctx.typing():
 player = await YTDLSource.from_url(queue[0], loop=client.loop)
 voice_channel.play(player, after=lambda e: print('Player error: %s' % e) if e else None)

 await ctx.send('**Now playing:** {}'.format(player.title))
 del(queue[0])

#pause
@client.command(name='pause', help='This command pauses the song')
async def pause(ctx):
 server = ctx.message.guild
 voice_channel = server.voice_client

 voice_channel.pause()

#resune
@client.command(name='resume', help='This command resumes the song!')
async def resume(ctx):
 server = ctx.message.guild
 voice_channel = server.voice_client

 voice_channel.resume()

#viow
@client.command(name='view', help='This command shows the queue')
async def view(ctx):
 await ctx.send(f'Your queue is now `{queue}!`')

#leave
@client.command(name='leave', help='This command stops makes the bot leave the voice channel')
async def leave(ctx):
 voice_client = ctx.message.guild.voice_client
 await voice_client.disconnect()

#stop
@client.command(name='stop', help='This command stops the song!')
async def stop(ctx):
 server = ctx.message.guild
 voice_channel = server.voice_client

 voice_channel.stop()

@tasks.loop(seconds=20)
async def change_status():
 await client.change_presence(activity=discord.Game(choice(status)))

client.run("my_secret")