
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (53)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...)
Sur d’autres sites (9219)
-
After a while of being idle, my bot, hosted on CentOS 7, can no longer find ffmpeg and requires a restart
14 août 2019, par Liam McMillen-MeyersSo I have a discord bot running with discord.js on a CentOS 7 machine. After a while (I’m not exactly sure how long) it will start throwing errors when I try to play a song, saying it can’t find ffmpeg, except that ffmpeg is installed. After I quickly restart the bot it works fine again.
I genuinely have no idea what causes this, I have a little experience with CentOS but I’m by no means an experienced user, is it something I did when it installed ? I have tried searching for answers online but I can’t find anything
Error : FFMPEG not found
at Function.selectFfmpegCommand (/user/DiscordBot/folder1/node_modules/prism-media/src/transcoders/ffmpeg/Ffmpeg.js:46:13)
at new FfmpegTranscoder (/user/DiscordBot/folder1/node_modules/prism-media/src/transcoders/ffmpeg/Ffmpeg.js:7:37)
at new MediaTranscoder (/user/DiscordBot/folder1/node_modules/prism-media/src/transcoders/MediaTranscoder.js:10:19)
at new Prism (/user/DiscordBot/folder1/node_modules/prism-media/src/Prism.js:5:23)
at new VoiceConnection (/user/DiscordBot/folder1/node_modules/discord.js/src/client/voice/VoiceConnection.js:46:18)
at Promise (/user/DiscordBot/folder1/node_modules/discord.js/src/client/voice/ClientVoiceManager.js:63:22)
at new Promise ()
at ClientVoiceManager.joinChannel (/user/DiscordBot/folder1/node_modules/discord.js/src/client/voice/ClientVoiceManager.js:45:12)
at VoiceChannel.join (/user/DiscordBot/folder1/node_modules/discord.js/src/structures/VoiceChannel.js:130:30)
at execute (/user/DiscordBot/folder1/bot.js:467:40) -
Using ffmpeg to get a passthrough stream and create an audio resource for discordjs/voice ?
5 novembre 2022, par Zer0I have access to an hls manifest file which i can use to download a song.
I use the following command to download it/pipe it to stdout :

ffmpeg -i 'https://api.someurl.com/1/2/3/stream.ismd/manifest.m3u8' -vn -sn -f flv -c copy -|ffmpeg -i - -b:a 192k -f mp3 -
.

I am successfully able to output a playable mp3 from this command.


I am looking for a way to get the same kind of result in nodejs and get a readable stream from the final download and then pipe it to
createAudioResource()
to make it playable in a discord voice channel.

There is a nodejs module called
m3u8stream
which i tried using with the code mentioned below but i couldnt get it to work as my knowledge of nodejs streams is limited and the documentation is confusing to understand.

const stream = new PassThrough()
let resource
const stream = m3u8stream('https://api.someurl.com/1/2/3/stream.ismd/manifest.m3u8', {parser : 'm3u8',
requestOptions : {headers : {"content-type" : "video/mp4"}}
}).pipe(stream)
stream.on('data', d=>{resource = createAudioResource(d)})
player.play(resource)



This code did not work and i am assuming this has something to do with
m3u8stream
itself because piping the stream tofs.createWriteStream('file.mp4')
as shown in their example results in a zero kb mp4 file.

I am sure there is be a better tool or a way to get a stream from the manifest and get it to play on discord and i would be happy to know about them as i am not bound to use ffmpeg for this.
Any help to make this work is appreciated. Thanks !


-
find the timestamp of a sound sample of an mp3 with linux or python
23 juin 2020, par cardamomI am slowly working on a project which where it would be very useful if the computer could find where in an mp3 file a certain sample occurs. I would restrict this problem to meaning a fairly exact snippet of the audio, not just for example the chorus in a song on a different recording by the same band where it would become more some kind of machine learning problem. Am thinking if it has no noise added and comes from the same file, it should somehow be possible to locate the time at which it occurs without machine learning, just like grep can find the lines in a textfile where a word occurs.


In case you don't have an mp3 lying around, can set up the problem with some music available on the net which is in the public domain, so nobody complains :


curl https://web.archive.org/web/20041019004300/http://www.navyband.navy.mil/anthems/ANTHEMS/United%20Kingdom.mp3 --output godsavethequeen.mp3



It's a minute long :


exiftool godsavethequeen.mp3 | grep Duration
Duration : 0:01:03 (approx)



Now cut out a bit between 30 and 33 seconds (the bit which goes la la la la..) :


ffmpeg -ss 30 -to 33 -i godsavethequeen.mp3 gstq_sample.mp3



both files in the folder :


$ ls -la
-rw-r--r-- 1 cardamom cardamom 48736 Jun 23 00:08 gstq_sample.mp3
-rw-r--r-- 1 cardamom cardamom 1007055 Jun 22 23:57 godsavethequeen.mp3



This is what am after :


$ findsoundsample gstq_sample.mp3 godsavethequeen.mp3
start 30 end 33



Am happy if it is a bash script or a python solution, even using some kind of python library. Sometimes if you use the wrong tool, the solution might work but look horrible, so whichever tool is more suitable. This is a one minute mp3, have not thought yet about performance just about getting it done at all, but would like some scalability, eg find ten seconds somewhere in half an hour.