
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
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 (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)
Sur d’autres sites (2211)
-
Discord bot cannot play youtube video for more than 60sec
18 octobre 2020, par Antoine WeberA few weeks back I started a discord bot as a side project for fun.
Since yesterday i've been trying to allow my bot to search youtube videos and play them in voice channels (mostly for songs).


The bot correctly searches youtube with the query and finds the youtube video, starts playing it, but for some reason, after 60 sec (no matter of the video, always the same time), the bot suddenly provides no more audio, and then gets stuck somewhere (not a single error message, but the bots just stops responding).


Here are the code snippets :


# first two words are activation keywords for the bot, then its the youtube query
query = ' '.join(message.message.content.split()[2:])
youtube = build("youtube", "v3", developerKey=yt_token)
search_response = youtube.search().list(q=query, part="id,snippet", maxResults=5).execute()
video_id = search_response['items'][0]['id']['videoId']
video_url = "https://www.youtube.com/watch?v=" + video_id

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 ydl.download([video_url])
await play_audio(message, 'song.mp3')



(I delete the song.mp3 after playing)


my ydl options are


ydl_opts = {
 "postprocessors":[{
 "key": "FFmpegExtractAudio", # download audio only
 "preferredcodec": "mp3", # other acceptable types "wav" etc.
 "preferredquality": "192" # 192kbps audio
 }],
 "format": "bestaudio/best",
 "outtmpl": "song.mp3"
}



and also my play_audio function is


async def play_audio(message, audio_name):
 channel = message.message.author.voice.channel
 vc = await channel.connect()
 time.sleep(0.5)
 vc.play(discord.FFmpegPCMAudio(audio_name))
 while vc.is_playing():
 time.sleep(1)
 vc.stop()
 await vc.disconnect()



I know the time.sleep() call is blocking but I don't really core for now.


Any one had this issue ? For short videos (less than 60sec), everything works fine. Maybe an ffmpeg option ?


-
Cannot play audio from a link using a Discord Bot
2 mars 2020, par GuilhermeffableI’m trying to code a bot so me and my friends can hear the local radio on our Discord Server but I’m having this error.
This is part of my code, it’s the play.js file that handles the playback stuff.
module.exports = (client,message) => {
const voiceChannel = message.member.voiceChannel;
const idChannel = voiceChannel.id;
console.log(idChannel)
//vê se o user está numa sala de voz
if(!voiceChannel) {
return message.channel.send("Precisas de estar num voice channel para usar este comando.")
}
const permissions = voiceChannel.permissionsFor(message.client.user);
//vê se tem permissões para entrar na sala
if(!permissions.has('CONNECT') || !permissions.has('SPEAK')) {
return message.channel.send("Não tenho permissões para entrar nessa sala.")
}
voiceChannel.join()
.then(connection => {
console.log("Successfully connected.");
connection.playStream('http://centova.radios.pt:8401/stream.mp3/1')
}).catch(e =>{
console.error(e);
});}
And this is the error I’m getting :
TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received an instance of
Object
at validateString (internal/validators.js:117:11)
at normalizeSpawnArguments (child_process.js:406:3)
at Object.spawn (child_process.js:542:16)
at new FfmpegProcess (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\prism-media\src\transcoders\ffmpeg\FfmpegProcess.js:14:33)
at FfmpegTranscoder.transcode (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\prism-media\src\transcoders\ffmpeg\Ffmpeg.js:34:18)
at MediaTranscoder.transcode (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\prism-media\src\transcoders\MediaTranscoder.js:27:31)
at Prism.transcode (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\prism-media\src\Prism.js:13:28)
at AudioPlayer.playUnknownStream (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\discord.js\src\client\voice\player\AudioPlayer.js:97:35)
at VoiceConnection.playStream (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\discord.js\src\client\voice\VoiceConnection.js:546:24)
at C:\Users\guilh\desktop\BOT\orbitalbot\commands\play.js:24:24 {
code: 'ERR_INVALID_ARG_TYPE' -
Discord.py rewrite play audio from youtube into voice chat
23 avril 2021, par John Henry 5I'm trying to get a bot that can join a voice chat on command and then play some audio extracted from a youtube video. I don't know how to do this and all the code that I've gotten does not seem to work. Does anyone know how to do this ?


@client.command() async def play(ctx):
 channel = ctx.message.author.voice.channel
 voice_client = await channel.connect()

 opts = {'format': 'bestaudio'}
 FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 - 
 reconnect_delay_max 5', 'options': '-vn'}

 with youtube_dl.YoutubeDL(opts) as ydl:
 song_info = ydl.extract_info('video', download=False)
 URL = song_info['formats'][0]['url']
 
 voice_client.play(FFmpegPCMAudio(URL, **FFMPEG_OPTIONS))