
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (112)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (8402)
-
FFmpegPCMaudio doesn't work on my server but it works on my computer
4 mai 2023, par AlexI am developing a Discord bot with python that can play music. When I do the tests on my computer all work find but when I take all the files to put there in my server it stop working. So I tried to run it on an other computer and no, it still does not work.


First I was thinking it was a power problems but the other computer is almost the same. I tried to install all the packages that I have on my computer to the second but the music part still not work. It's not a Discord API problem because my others commands work find.


import discord
from discord.ext import commands
from youtube_dl import YoutubeDL


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'}
 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].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 = discord.utils.get(ctx.guild.voice_channels, name='General')
 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()
 # try to play next in the queue if it exists
 await self.play_music()

 @commands.command(name="disconnect", help="Disconnecting bot from VC")
 async def dc(self, ctx):
 await self.vc.disconnect()

 @commands.command(name="pause")
 async def pause(self, ctx):
 voice = discord.utils.get(self.bot.voice_clients, guild=ctx.guild)
 if voice.is_playing():
 voice.pause()
 else:
 await ctx.send("Currently no audio is playing.")

 @commands.command(name="resume")
 async def resume(self, ctx):
 voice = discord.utils.get(self.bot.voice_clients, guild=ctx.guild)
 if voice.is_paused():
 voice.resume()
 else:
 await ctx.send("The audio is not paused.")



There are not any error messages, the bot just joins the voice chat and does nothing.


If someone can tell me we it work just on my computer I will be very grateful.




-
Trouble with CoCCA Registry
7 octobre 2012, par Multimedia Mike — GeneralI’ve been rather despondent all week. People who see me daily could readily identify this fact. Unfortunately, the exact reason was difficult to adequately explain. The problems that nerds deal with…
When A Domain Expires
As a few people noticed, the multimedia.cx domain and all of it’s subdomains didn’t work this last week. The problem started on Monday, October 1. Whose fault ? Well, fundamentally, I neglected to renew the domain name in time. However, I prefer to place the blame on the .cx domain registrar, CoCCA Registry. You see, they have never developed the technology to email a domain holder with a notice that their domain is about to expire or has already expired.This domain is the only one I have ever held so I don’t have a lot of experience in this matter. I wondered if I was crazy for thinking it would be normal for a registrar to send an email or 2 with status updates about your domain. I get the impression from speaking with others that this is indeed normal. I have 3 different email addresses listed under my account at the registrar– 2 at multimedia.cx and a backup gmail account. I checked spam folders after this incident. Then I remembered that I have never received any email notifications from them (although password reset emails show up, so that part thankfully works). Also, their support emails are black holes.
So, I guess the moral is : be wary of dealing with CoCCA Registry. However, they seem to be the only way to register domains under a wide variety of uncommon country codes.
By Friday, the domain appeared to have been reinstated, even through the status was officially listed as “renewal-pending” according to the web-based management console. Eventually, as cached DNS results started to time out throughout the day, I started seeing subdomains come back. I excitedly used the ‘dig’ command to count down the seconds until gamemusic.multimedia.cx was accessible on the network I was on (the number after the domain name is the time-to-live or ‘TTL’ value) :
$ dig +nocmd gamemusic.multimedia.cx +noall +answer gamemusic.multimedia.cx. 3 IN A 174.143.152.251 $ dig +nocmd gamemusic.multimedia.cx +noall +answer gamemusic.multimedia.cx. 2 IN A 174.143.152.251 $ dig +nocmd gamemusic.multimedia.cx +noall +answer gamemusic.multimedia.cx. 1 IN A 174.143.152.251 $ dig +nocmd gamemusic.multimedia.cx +noall +answer gamemusic.multimedia.cx. 12962 IN A 207.45.186.114
Finally, today (Saturday), I received a receipt confirming that the domain has been renewed.
8 Years Old
Incidentally, happy eighth birthday to multimedia.cx. It was September, 2004 when I decided to branch out from a simple ISP-based web presence.People often ask why I went with the .cx TLD. When I decided I wanted a proper domain name 8 years ago, I found that multimedia.X was already taken for just about every TLD value of X. .cx was a notable exception and was distinctive enough (speaking of .X, though, I see that multimedia.xxx is still up for grabs as of this writing ; I imagine that would come with a whole other set of problems).
It’s funny that tech nerds often rail against outsourcing too much — email, storage, computing power, web hosting — all to some type of cloud provider under the premise that it could easily be taken away. But this episode teaches me that even having your own domain name is no guarantee of a solid online presence.
Meanwhile, I have taken proactive steps to avert this same situation from arising again :
Barring a lack of automated emails from the registrar, I hope a Google Calendar reminder set up a month ahead of expiration will do the trick.
-
Videoconverter.js simple help command not working in node.js
13 juin 2014, par Vinz243I am trying tu run a basic help command with videoconverter.js
eval(fs.readFileSync("./ffmpeg-all-codecs.js", "utf-8"))
var result = ffmpeg_run({
print: console.log,
printErr: console.log,
files: [],
arguments: ["-h"],
TOTAL_MEMORY: 268435456
// Can play around with this option - must be a power of 2
// TOTAL_MEMORY: 268435456
});
console.log(result);
console.log("Done");And the output
$ node test
ffmpeg version 2.2.1 Copyright (c) 2000-2014 the FFmpeg developers
built on Jun 9 2014 20:24:32 with emcc (Emscripten GCC-like replacement) 1.12.0 (commit 6960d2296299e96d43e694806f5d35799ef8d39c)
configuration: --cc=emcc --prefix=/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist --extra-cflags='-I/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/include -v' --enable-cross-compile --target-os=none --arch=x86_32 --cpu=generic --disable-ffplay --disable-ffprobe --disable-ffserver --disable-asm --disable-doc --disable-devices --disable-pthreads --disable-w32threads --disable-network --disable-hwaccels --disable-parsers --disable-bsfs --disable-debug --disable-protocols --disable-indevs --disable-outdevs --enable-protocol=file --enable-libvpx --enable-gpl --extra-libs='/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/lib/libx264.a /Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/lib/libvpx.a'
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
ffmpeg version 2.2.1 Copyright (c) 2000-2014 the FFmpeg developers
built on Jun 9 2014 20:24:32 with emcc (Emscripten GCC-like replacement) 1.12.0 (commit 6960d2296299e96d43e694806f5d35799ef8d39c)
configuration: --cc=emcc --prefix=/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist --extra-cflags='-I/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/include -v' --enable-cross-compile --target-os=none --arch=x86_32 --cpu=generic --disable-ffplay --disable-ffprobe --disable-ffserver --disable-asm --disable-doc --disable-devices --disable-pthreads --disable-w32threads --disable-network --disable-hwaccels --disable-parsers --disable-bsfs --disable-debug --disable-protocols --disable-indevs --disable-outdevs --enable-protocol=file --enable-libvpx --enable-gpl --extra-libs='/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/lib/libx264.a /Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/lib/libvpx.a'
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
undefined
DoneSo I am not getting the help like here https://bgrins.github.io/videoconverter.js/demo/. Why ? How to solve that ?
I am using nodejs x64 under windows 7 x64