
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (10)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...)
Sur d’autres sites (3322)
-
I want to create the discord bot by use python,but ffmpeg always had problem
12 décembre 2023, par Botasync def play(ctx, *, song_name): 

 if ctx.author.voice is None or ctx.author.voice.channel is None:
 await ctx.send("nobody")
 return

 voice_channel = ctx.author.voice.channel
 channel = None
 if ctx.voice_client is None:
 channel = await voice_channel.connect()
 else:
 await ctx.voice_client.move_to(voice_channel)

 ydl_opts = {'format': 'bestaudio'}
 videosSearch = VideosSearch(song_name, limit=1) 
 results = videosSearch.result()
 
 url = results['result'][0]['link']
 
 if voice_channel.guild.id in queues:
 queues[voice_channel.guild.id].append(url)
 
 else:
 queues[voice_channel.guild.id] = [url]
 
 if not ctx.voice_client.is_playing():
 await play_next(ctx.voice_client, voice_channel.guild.id)



ffmpeg has this error detail :


discord.player ffmpeg process 17656 successfully terminated with return code of 3199971767.


I found the internet ,lots of people got the code of 1 or -1.


But i get 3199971767 ,i don't know the meaning of this.


BTW, my url is correct.


Hoping someone can help me.


TY


-
How do I playback .m4s files. And turn them into a binary stream for a Discord Bot
30 octobre 2020, par HarveyI want to download the BBC radio 2 and stream it to a discord server. Each request is https://as-dash-uk-live.akamaized.net/pool_904/live/uk/bbc_radio_two/bbc_radio_two.isml/dash/bbc_radio_two-audio=320000-250636302.m4s However the Time stamp will change and they regularly delete content. I found a .dash file as well https://as-dash-uk-live.akamaized.net/pool_904/live/uk/bbc_radio_two/bbc_radio_two.isml/dash/bbc_radio_two-audio=320000.dash which is seems to request. However I can't find how to send it through a discord bot to a discord server. My code is


const axios = require('axios')


module.exports = {
 play: async function (guild,message) {
 const serverQueue = {};
 const voiceChannel = message.member.voice.channel
 serverQueue.connection = await voiceChannel.join();
 plays(guild)
 
 async function plays(guild) {
 let data1 = new Date(1353439725);
 let data2 = new Date(Date.now()/1000);
 console.log(`https://as-dash-uk-live.akamaized.net/pool_904/live/uk/bbc_radio_two/bbc_radio_two.isml/dash/bbc_radio_two-audio=320000-${Math.floor((data2 - data1))-4000}.m4s`)
 const dispatcher = serverQueue.connection.play((await axios.get(`https://as-dash-uk-live.akamaized.net/pool_904/live/uk/bbc_radio_two/bbc_radio_two.isml/dash/bbc_radio_two-audio=320000-${Math.floor((data2 - data1))-4000}.m4s`)).data)
 .on('finish', () => {
 console.log('Music ended!');
 plays(guild);
 return
 })
 .on('error', error => {
 console.error(error);
 plays(guild);
 return
 });
 dispatcher.setVolumeLogarithmic(serverQueue.volume / 5);
 }
 }
}



However no audio plays and the audio end event is always being called. Am I being really stupid or is there a way to do this.


-
Discord.py music_cog, bot joins channel but plays no sound
20 juin 2021, par OzzyI have started using python a week ago or so. I have watched all the related videos on YT and checked google pages etc. But still no luck. My bot perfectly joins to the voice channel and when i use play it downloads and presumebly starts the play function but there is no sound or anything, it just joins and waits 1-2 mins then leaves with timeout error.


from discord.ext import commands
import logging

from youtube_dl import YoutubeDL

logging.basicConfig(level=logging.INFO)


class music_cog(commands.Cog):
 def __init__(self, bot):
 self.bot = bot

 # all the music related stuff
 self.is_playing = False

 # 2d array containing [song, channel]
 self.music_queue = []
 self.YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True', 'no_warnings': 'False'}
 self.FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
 'options': '-vn'}

 self.vc = ""

 # searching the item on youtube
 def search_yt(self, item):
 with YoutubeDL(self.YDL_OPTIONS) as ydl:
 try:
 info = ydl.extract_info("ytsearch:%s" % item, download=False)['entries'][0]
 except Exception:
 return False

 return {'source': info['formats'][0]['url'], 'title': info['title']}

 def play_next(self):
 if len(self.music_queue) > 0:
 self.is_playing = True

 # get the first url
 m_url = self.music_queue[0][0]['source']

 # remove the first element as you are currently playing it
 self.music_queue.pop(0)

 self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
 else:
 self.is_playing = False

 # infinite loop checking
 async def play_music(self):
 if len(self.music_queue) > 0:
 self.is_playing = True

 m_url = self.music_queue[0][0]['source']

 # try to connect to voice channel if you are not already connected

 if self.vc == "" or not self.vc.is_connected() or self.vc == None:
 self.vc = await self.music_queue[0][1].channel.connect()
 else:
 await self.vc.move_to(self.music_queue[0][1])

 print(self.music_queue)
 # remove the first element as you are currently playing it
 self.music_queue.pop(0)

 self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
 else:
 self.is_playing = False

 @commands.command(name="play", help="Plays a selected song from youtube")
 async def p(self, ctx, *args):
 query = " ".join(args)

 voice_channel = ctx.author.voice
 if voice_channel is None:
 # you need to be connected so that the bot knows where to go
 await ctx.send("Connect to a voice channel!")
 else:
 song = self.search_yt(query)
 if type(song) == type(True):
 await ctx.send(
 "Could not download the song. Incorrect format try another keyword. This could be due to playlist or a livestream format.")
 else:
 await ctx.send("Song added to the queue")
 self.music_queue.append([song, voice_channel])

 if self.is_playing == False:
 await self.play_music()

 @commands.command(name="queue", help="Displays the current songs in queue")
 async def q(self, ctx):
 retval = ""
 for i in range(0, len(self.music_queue)):
 retval += self.music_queue[i][0]['title'] + "\n"

 print(retval)
 if retval != "":
 await ctx.send(retval)
 else:
 await ctx.send("No music in queue")

 @commands.command(name="skip", help="Skips the current song being played")
 async def skip(self, ctx):
 if self.vc != "" and self.vc:
 self.vc.stop()
 await ctx.send("Stopped!")
 # try to play next in the queue if it exists
 await self.play_music()
 await ctx.send("Skipped!")


def setup(bot):
 bot.add_cog(music_cog(bot))



I enabled logs to be sure, when it connects there's just that info :


INFO:discord.voice_client:Connecting to voice... | INFO:discord.voice_client:Starting voice handshake... (connection attempt 1)


I have also checked FFMPEG and its Path, tried different codes and methods but even though they work there is no sound. Also I installed discord.py[voice] too.


I appreciate help already, thanks.