
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (100)
-
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 (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (16650)
-
I tried programming a discord bot for music, it joins the channel, it apparently "speaks" but i can't hear anything
2 avril 2020, par boraxI tried to code it alone, but I got the same problem, then I copied the code from https://gabrieltanner.org/blog/dicord-music-bot and it persists. I have downloaded FFmpeg, but I still think the problem lies there. Any suggestions ? (it's my first time here, I don't know how much of the code is relevant, also, i get this Error : FFmpeg/avconv not found !)



const Discord = require('discord.js');
const client = new Discord.Client();

const ytdl = require("ytdl-core");

const token = 'REDACTED';

const prefix = '$';

var version = '1.1.2';

var servers = {};

const queue = new Map();

client.on('ready', () => {
 console.log('BOT is online');
})
client.once("ready", () => {
 console.log("Ready!");
 });

 client.once("reconnecting", () => {
 console.log("Reconnecting!");
 });

 client.once("disconnect", () => {
 console.log("Disconnect!");
 });

 client.on("message", async message => {
 if (message.author.bot) return;
 if (!message.content.startsWith(prefix)) return;

 const serverQueue = queue.get(message.guild.id);

 if (message.content.startsWith(`${prefix}play`)) {
 execute(message, serverQueue);
 return;
 } else if (message.content.startsWith(`${prefix}skip`)) {
 skip(message, serverQueue);
 return;
 } else if (message.content.startsWith(`${prefix}stop`)) {
 stop(message, serverQueue);
 return;
 } else {
 message.channel.send("You need to enter a valid command!");
 }
 });

 async function execute(message, serverQueue) {
 const args = message.content.split(" ");

 const voiceChannel = message.member.voice.channel;
 if (!voiceChannel)
 return message.channel.send(
 "You need to be in a voice channel to play music!"
 );
 const permissions = voiceChannel.permissionsFor(message.client.user);
 if (!permissions.has("CONNECT") || !permissions.has("SPEAK")) {
 return message.channel.send(
 "I need the permissions to join and speak in your voice channel!"
 );
 }

 const songInfo = await ytdl.getInfo(args[1]);
 const song = {
 title: songInfo.title,
 url: songInfo.video_url
 };

 if (!serverQueue) {
 const queueContruct = {
 textChannel: message.channel,
 voiceChannel: voiceChannel,
 connection: null,
 songs: [],
 volume: 5,
 playing: true
 };

 queue.set(message.guild.id, queueContruct);

 queueContruct.songs.push(song);

 try {
 var connection = await voiceChannel.join();
 queueContruct.connection = connection;
 play(message.guild, queueContruct.songs[0]);
 } catch (err) {
 console.log(err);
 queue.delete(message.guild.id);
 return message.channel.send(err);
 }
 } else {
 serverQueue.songs.push(song);
 return message.channel.send(`${song.title} has been added to the queue!`);
 }
 }

 function skip(message, serverQueue) {
 if (!message.member.voice.channel)
 return message.channel.send(
 "You have to be in a voice channel to stop the music!"
 );
 if (!serverQueue)
 return message.channel.send("There is no song that I could skip!");
 serverQueue.connection.dispatcher.end();
 }

 function stop(message, serverQueue) {
 if (!message.member.voice.channel)
 return message.channel.send(
 "You have to be in a voice channel to stop the music!"
 );
 serverQueue.songs = [];
 serverQueue.connection.dispatcher.end();
 }

 function play(guild, song) {
 const serverQueue = queue.get(guild.id);
 if (!song) {
 serverQueue.voiceChannel.leave();
 queue.delete(guild.id);
 return;
 }

 const dispatcher = serverQueue.connection
 .play(ytdl(song.url))
 .on("finish", () => {
 serverQueue.songs.shift();
 play(guild, serverQueue.songs[0]);
 })
 .on("error", error => console.error(error));
 dispatcher.setVolumeLogarithmic(serverQueue.volume / 5);
 serverQueue.textChannel.send(`Start playing: **${song.title}**`);
 }

client.login(token);



-
ffmpeg "filtergraph join" to use copy of channels and preserve input channel configuration (format - s32_le)
29 avril 2020, par vishwanath patilCommand that I am using is below, with that command I am getting 8 channel output.wav.



ffmpeg.exe -i one.wav -i two.wav -i three.wav -i four.wav \
-i five.wav -i six.wav -i seven.wav -i eight.wav \
-filter_complex '[0:0][1:0][2:0][3:0][4:0][5:0][6:0] \
[7:0]join=8:channel_layout=octagonal' output.wav




All input files one.wav, two.wav so on eight.wav are 32khz,s32le and one channel. but, output generated is output.wav which is s16le, 32khz.



I can make output s32le with below command,



ffmpeg.exe -i one.wav -i two.wav -i three.wav -i four.wav \
-i five.wav -i six.wav -i seven.wav -i eight.wav \
-filter_complex '[0:0][1:0][2:0][3:0][4:0][5:0][6:0] \
[7:0]join=8:channel_layout=octagonal' -acodec pcm_s32le output.wav




But, above command seems todo conversion from s16_le to s32_le (i.e one.wav doesn't match with output.wav first channel completely). However what I want is to directly copy data from input channels since audio format of all input files is same as expected audio format of output file channels (output.wav)



is there way to instruct filter_graph todo processing at pcm_s32le ?



Here is link to log with loglevel set to debug,
https://pastebin.com/ms4x1fLz



MediaInfo.exe one.wav
General
Complete name : one.wav
Format : Wave
File size : 6.50 MiB
Duration : 53 s 280 ms
Overall bit rate mode : Constant
Overall bit rate : 1 024 kb/s

Audio
Format : PCM
Format settings : Little / Signed
Codec ID : 1
Duration : 53 s 280 ms
Bit rate mode : Constant
Bit rate : 1 024 kb/s
Channel(s) : 1 channel
Sampling rate : 32.0 kHz
Bit depth : 32 bits
Stream size : 6.50 MiB (100%)



-
Why is ffmpeg warning "Guessed Channel Layout for Input Stream #0.0 : mono" ? [closed]
14 janvier, par chasep255I am using ffmpeg to read and write raw audio to/from my python script. Both the save and load commands I use produce the warning "Guessed Channel Layout for Input Stream #0.0 : mono" ? This is despite that fact that I am telling ffmpeg using
-ac 1
before both the input and output that there is only one channel. I saw some other answers where I should set-guess_layout_max 0
but this seems like a hack since I don't want ffmpeg to guess ; I am telling it exactly how many channels there are with-ac 1
. It should not need to make any guess.

My save command is formatted as follows with
r
being the sample rate andf
being the file I want to save the raw audio to. I am sending raw audio via stdin from python over a pipe.

ffmpeg_cmd = 'ffmpeg -hide_banner -loglevel warning -y -ar %d -ac 1 -f u16le -i pipe: -ac 1 %s' % (r, shlex.quote(f))


Likewise my load command is the following with ffmpeg reading from
f
and writing raw audio to stdout.

ffmpeg_cmd = 'ffmpeg -hide_banner -loglevel warning -i %s -ar %d -ac 1 -f u16le -c:a pcm_u16le -ac 1 pipe:' % (shlex.quote(f), r)