
Recherche avancée
Médias (2)
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
Autres articles (30)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
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 (...)
Sur d’autres sites (3432)
-
Does anyone know how to speed up this FFMPEG command set ?
5 juin 2022, par user19275422does anyone know how to speed up this FFMPEG set ? I want it to be started by a sensor but it takes to long to render. Thank you for any help.


ffmpeg -i voice.wav -f lavfi -t 1 -i anullsrc=channel_layout=stereo:sample_rate=44100 -i music.mp3 -filter_complex "[0:0][1:0][2:0]concat=n=3:v=0:a=1[out]" -map "[out]" audio.wav


ffmpeg -i video.mov -itsoffset 3.84 -i audio.wav -c:v copy audio.mp4


ffmpeg -i audio.mp4' + ' -filter_complex "scale=3840:2160,drawtext=text="' + string + '":fontcolor=white:fontsize=94:fontfile=Jost.ttf' + ':x=(w-text_w)/1.1:y=(h-text_h)/2" -pix_fmt yuv420p display.mp4


I think the last one takes the longest.


-
Pycord Music Bot : AttributeError : 'FFmpegAudio' object has no attribute '_process'
5 juin 2022, par Steven MaoI've made a discord Cog that should be able to queue up and play music, but I'm getting an error from FFmpeg when I actually try to play the URL. I have found an identical question on StackOverflow, but this user's problem was a random typo. The inputs should all be correct, so I am not sure if the problem is my code or my package.


What have I done wrong ?


class MusicClass(commands.Cog):
 #universal attributes
 YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True'}
 FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}

 def __init__(self, bot):
 self.bot = bot
 self.is_playing = False
 self.music_queue = [[],''] #[[music1, music2, music3...], channel_obj]
 self.vc = ''

 @commands.command()
 async def join(self, ctx):
 if not ctx.message.author.voice:
 await ctx.send("{} is not connected to a voice channel".format(ctx.message.author.name))
 return
 else:
 channel = ctx.message.author.voice.channel
 await channel.connect()

 @commands.command()
 async def leave(self, ctx):
 voice_client = ctx.message.guild.voice_client
 if voice_client.is_connected():
 await voice_client.disconnect()
 else:
 await ctx.send("The bot is not connected to a voice channel.")
 
 #rtype: list[dict{str:}]
 #params: search string/web URL, top number of results to show
 #returns list of top 5 queries and their information
 def search_yt(self, search_query, num_results = 3):
 with YoutubeDL(self.YDL_OPTIONS) as ydl:
 try:
 top_results = ydl.extract_info(f"ytsearch{num_results}:{search_query}", download=False)['entries'][0:{num_results}]
 for i in range(len(top_results)):
 top_results[i] = {
 'title': top_results[i]['title'],
 'source': top_results[i]['formats'][0]['url'],
 'channel': top_results[i]['channel'],
 'duration': top_results[i]['duration'],
 'url': top_results[i]['webpage_url']
 }
 except:
 print(f'SEARCH_YT ERROR\t search="{search_query}"')
 return False
 return top_results
 
 #rtype: None
 #looks at queue, decides whether to play the next song in queue or stop
 def play_next(self):
 print('called play_next')
 if len(self.music_queue) > 0:
 self.is_playing = True
 #assigns url AND removes from queue
 music_url = self.music_queue[0][0]['source']
 self.music_queue[0].pop(0)
 self.vc.play(discord.FFmpegAudio(music_url, **self.FFMPEG_OPTIONS), after = lambda e: self.play_next())
 else:
 self.is_playing = False

 #rtype: None
 #similar to play_next but optimized for first-time playing
 #checks if a song in queue + checks if bot's connected, then begins to play
 async def play_now(self):
 print('called play_now, queue:', self.music_queue[0])
 if len(self.music_queue) > 0:
 self.is_playing = True
 music_url = self.music_queue[0][0]['source']
 if self.vc == '' or not self.vc.is_connected():
 self.vc = await self.music_queue[1].connect()
 else:
 print('moving to new channel')
 self.vc = await self.bot.move_to(self.music_queue[1])
 self.music_queue[0].pop(0)

 #######################################################################################################
 print('ERROR HAPPENS RIGHT HERE')
 self.vc.play(discord.FFmpegAudio(music_url, **self.FFMPEG_OPTIONS), after = lambda e: self.play_next())
 #######################################################################################################
 
 else:
 self.is_playing = False

 @commands.command()
 #dynamically checks for URL link or search query, then attempts to play
 async def p(self, ctx, *args):
 voice_channel = ctx.author.voice.channel

 if voice_channel == None: #not in a VC
 await ctx.send('You have to be in a voice channel first')
 return
 else: #set channel, search and play music
 if self.music_queue[1] != voice_channel:
 self.music_queue[1] = voice_channel
 if args[0].startswith('https://www.youtube.com/watch'): #search URL
 #search web_url directly and send object to music queue
 with YoutubeDL(self.YDL_OPTIONS) as ydl:
 try:
 print('attempting to extract URL:', args[0])
 music_obj = ydl.extract_info(args[0], download=False)
 music_obj = {
 'title': music_obj['title'],
 'source': music_obj['formats'][0]['url'],
 'channel': music_obj['channel'],
 'duration': music_obj['duration'],
 'url': music_obj['webpage_url']
 }
 print('music object:', music_obj)
 print('appending URL song queue')
 self.music_queue[0].append(music_obj)
 except:
 print('URL search failed. URL =', args[0])
 else: #search query, display search results, ask for which one, then add to queue
 num_results = args[len(args)-1] if args[len(args)-1].isdigit() else 3
 song_list = self.search_yt(' '.join(args), num_results)
 
 if not self.is_playing:
 await self.play_now()



Now my error message...


Exception ignored in: <function at="at" 0x7ff4b0a5b5e0="0x7ff4b0a5b5e0">
Traceback (most recent call last):
 File "/home/stevenmao/.local/lib/python3.8/site-packages/discord/player.py", line 127, in __del__
 self.cleanup()
 File "/home/stevenmao/.local/lib/python3.8/site-packages/discord/player.py", line 247, in cleanup
 self._kill_process()
 File "/home/stevenmao/.local/lib/python3.8/site-packages/discord/player.py", line 198, in _kill_process
 proc = self._process
AttributeError: 'FFmpegAudio' object has no attribute '_process'
</function>


-
Why i get error when i try to run command play in python script of discord bot
30 mai 2022, par UNDERTAKER 86My code of music discord bot :


import ffmpeg
import asyncio
import discord
from discord.ext import commands
import os
import requests
import random
import json
from replit import db
import youtube_dl
from keep_alive import keep_alive

class music(commands.Cog):
 def __init__(self, client):
 self.client = client

 @commands.command()
 async def join(self, ctx):
 if ctx.author.voice is None:
 await ctx.send(f'{ctx.message.author.mention}, Ты не подключён к голосовому чату!')
 voice_channel = ctx.author.voice.channel
 if ctx.voice_client is None:
 await voice_channel.connect()
 else:
 await ctx.voice_client.move_to(voice_channel)
 
 @commands.command()
 async def leave(self, ctx):
 if ctx.author.voice is None:
 await ctx.send(f'{ctx.message.author.mention}, Ты не подключён к голосовому чату!')
 else:
 await ctx.voice_client.disconnect()
 await ctx.send(f'{ctx.message.author.mention}, Пока!')

 @commands.command()
 async def play(self, ctx, *, url):
 if ctx.author.voice is None:
 await ctx.send(f'{ctx.message.author.mention}, Ты не подключён к голосовому чату!')
 ctx.voice_client.stop()
 ffmpeg_options = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
 YDL_OPTIONS = {'format': 'bestaudio/best', 'noplaylist': 'True', 'simulate': 'True',
 'preferredquality': '32bits', 'preferredcodec': 'wav', 'key': 'FFmpegExtractAudio'}
 vc = ctx.voice_client

 with youtube_dl.YoutubeDL(YDL_OPTIONS) as ydl:
 if 'https://' in url:
 info = ydl.extract_info(url, download=False)
 else:
 info = ydl.extract_info(f'ytsearch:{url}', download=False)['entries'][0]
 url2 = info['formats'][0]['url']
 source = await discord.FFmpegOpusAudio.from_probe(url2, **ffmpeg_options)
 vc.play(source)

 @commands.command()
 async def pause(self, ctx):
 if ctx.author.voice is None:
 await ctx.send(f'{ctx.message.author.mention}, Ты не подключён к голосовому чату!')
 await ctx.voice_client.pause()
 await ctx.send(f'{ctx.message.author.mention}, Пауза')

 @commands.command()
 async def resume(self, ctx):
 if ctx.author.voice is None:
 await ctx.send(f'{ctx.message.author.mention}, Ты не подключён к голосовому чату!')
 await ctx.voice_client.resume()
 await ctx.send(f'{ctx.message.author.mention}, Играет')

# @commands.command()
 # async def stop(self, ctx):
 # await ctx.voice_client.stop()
 # ctx.send(f'{author.mention}, Остановлен')

# @commands.command()
 # async def repeat(self, ctx):
 # await ctx.voice_client.repeat()
 # ctx.send(f'{author.mention}, Повтор')

# @commands.command()
 # async def loop(self, ctx):
 # await ctx.voice_client.loop()
 # ctx.send(f'{author.mention}, Повтор')

keep_alive()
def setup(client):
 client.add_cog(music(client))



But i get error when i write in discord command play :


[youtube] rUd2diUWDyI: Downloading webpage
[youtube] Downloading just video rUd2diUWDyI because of --no-playlist
[youtube] rUd2diUWDyI: Downloading webpage
[youtube] Downloading just video rUd2diUWDyI because of --no-playlist
Ignoring exception in command play:
Traceback (most recent call last):
 File "/home/runner/MBOT/venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
 ret = await coro(*args, **kwargs)
 File "/home/runner/MBOT/music.py", line 51, in play
 source = await discord.FFmpegOpusAudio.from_probe(url2, **ffmpeg_options)
 File "/home/runner/MBOT/venv/lib/python3.8/site-packages/discord/player.py", line 387, in from_probe
 return cls(source, bitrate=bitrate, codec=codec, **kwargs)
 File "/home/runner/MBOT/venv/lib/python3.8/site-packages/discord/player.py", line 324, in __init__
 super().__init__(source, executable=executable, args=args, **subprocess_kwargs)
 File "/home/runner/MBOT/venv/lib/python3.8/site-packages/discord/player.py", line 138, in __init__
 self._process = self._spawn_process(args, **kwargs)
 File "/home/runner/MBOT/venv/lib/python3.8/site-packages/discord/player.py", line 147, in _spawn_process
 raise ClientException(executable + ' was not found.') from None
discord.errors.ClientException: ffmpeg was not found.



I try install ffmpeg in console python, but this dont helped me. Please, give me answer on my question. I use service replit.com to coding on python. Because i want to install this script on server. How i can solve this problem ?