
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (63)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
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
Sur d’autres sites (11248)
-
Init improvement : Don’t fail if Flash URL is null in normal include + init case. Instead, show note in debug input and wait for soundManager.setup() with url param, then treat as delayed init case. Improved experience if including , then trying to do setup() after DOM Ready (common jQuery case)
9 septembre 2012, par Scott Schillerm script/soundmanager2-jsmin.js m script/soundmanager2-nodebug-jsmin.js m script/soundmanager2-nodebug.js m script/soundmanager2.js Init improvement : Don’t fail if Flash URL is null in normal include + init case. Instead, show note in debug input and wait for soundManager.setup() with url (...)
-
tests/fate-run.sh : Show packet flags for fate gapless tests.
26 septembre 2016, par Sasi Inguvatests/fate-run.sh : Show packet flags for fate gapless tests.
Signed-off-by : Sasi Inguva <isasi@google.com>
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc> -
Skipping extractors execution since zero extractors were registered (Use `node —trace-warnings ...` to show where the warning was created)
28 septembre 2023, par Parkster00I'm following a Discord Music Bot tutorial that uses ffmpeg, here is index.js


require("dotenv").config();

const { REST } = require("@discordjs/rest");
const { Routes } = require("discord-api-types/v9");
const { Client, Collection, Intents } = require('discord.js');
const { Player } = require("discord-player");

const fs = require("node:fs");
const path = require("node:path");

const client = new Client({
 intents: ["Guilds", "GuildMessages", "GuildVoiceStates"]
});

// Set up our commands into an array
const commands = [];
client.commands = new Collection();

const commandsPath = path.join(__dirname, "commands");
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith(".js"));

for (const file of commandFiles) {
 console.log(`${file}`)
 console.log(`${commandsPath}`)
 const filePath = path.join(commandsPath, file);
 console.log(`${filePath}`)
 const command = require(filePath);

 client.commands.set(command.data.name, command);
 commands.push(command.data.toJSON());
}

// Create the player, highest quality audio
client.player = new Player(client, {
 ytdlOptions: {
 quality: "highestaudio",
 highWaterMark: 1 << 25
 }
});

// Commands are registered
client.on("ready", () => {
 const guild_ids = client.guilds.cache.map(guild => guild.id);

 const rest = new REST({ version: "9" }).setToken(process.env.TOKEN);
 for (const guildId of guild_ids) {
 rest.put(Routes.applicationGuildCommands(process.env.CLIENT_ID, guildId), {
 body: commands
 })
 .then(() => console.log(`Added commands to ${guildId}`))
 .catch(console.error);
 }

});

client.on("interactionCreate", async interaction => {
 if (!interaction.isCommand()) return;

 const command = client.commands.get(interaction.commandName);
 if (!command) return;

 try {
 await command.execute({ client, interaction });
 }
 catch (err) {
 console.error(err);
 await interaction.reply("An error occured while executing that command.");
 }
});

console.log(process.env.TOKEN);
client.login(process.env.TOKEN);



And here is play.js where I think the error originates :


const { SlashCommandBuilder } = require("@discordjs/builders");
const { EmbedBuilder } = require("discord.js");
const { QueryType } = require('discord-player');


module.exports = {
 data: new SlashCommandBuilder()
 .setName("play")
 .setDescription("Plays a song.")
 .addSubcommand(subcommand => {
 return subcommand
 .setName("search")
 .setDescription("Searches for a song.")
 .addStringOption(option => {
 return option
 .setName("searchterms")
 .setDescription("search keywords")
 .setRequired(true);
 })
 })
 .addSubcommand(subcommand => {
 return subcommand
 .setName("playlist")
 .setDescription("Plays playlist from YT")
 .addStringOption(option => {
 return option
 .setName("url")
 .setDescription("playlist url")
 .setRequired(true);

 })
 })
 .addSubcommand(subcommand => {
 return subcommand
 .setName("song")
 .setDescription("Plays song from YT")
 .addStringOption(option => {
 return option
 .setName("url")
 .setDescription("url of song")
 .setRequired(true);

 })
 }),
 execute: async ({ client, interaction }) => {

 if (!interaction.member.voice.channel) {
 await interaction.reply("You must be in a voice channel to use this command.");
 return;
 }

 const queue = await client.player.nodes.create(interaction.guild);

 if (!queue.connection) await queue.connect(interaction.member.voice.channel)

 let embed = new EmbedBuilder();
 if (interaction.options.getSubcommand() === "song") {
 let url = interaction.options.getString('url');

 const result = await client.player.search(url, {
 requestedBy: interaction.user,
 searchEngine: QueryType.YOUTUBE_VIDEO
 });

 console.log(result.tracks);

 if (result.tracks.length === 0) {
 await interaction.reply("no results found");
 return
 }

 const song = result.tracks[0];
 await queue.addTrack(song);

 embed
 .setDescription(`Added **[${song.title}](${song.url})** to the queue.`)
 .setThumbnail(song.thumbnail)
 .setFooter({ text: `Duration: ${song.duration}` });
 }

 else if (interaction.options.getSubcommand() === "playlist") {
 let url = interaction.options.getString('url');

 const result = await client.player.search(url, {
 requestedBy: interaction.SlashCommandBuilder,
 searchEngine: QueryType.YOUTUBE_PLAYLIST,
 });

 if (result.tracks.length === 0) {
 await interaction.reply("no playlist found");
 return
 }

 const playlist = result.playlist;
 await queue.addTracks(playlist);

 embed
 .setDescription(`Added **[${playlist.title}](${playlist.url})** to the queue.`)
 .setThumbnail(playlist.thumbnail)
 .setFooter({ text: `Duration: ${playlist.duration}` });
 }

 else if (interaction.options.getSubcommand() === "search") {
 let url = interaction.options.getString('searchterms');

 const result = await client.player.search(url, {
 requestedBy: interaction.SlashCommandBuilder,
 searchEngine: QueryType.AUTO,
 });

 if (result.tracks.length === 0) {
 await interaction.reply("no results found");
 return
 }

 const song = result.tracks[0]
 await queue.addTrack(song);

 embed
 .setDescription(`Added **[${song.title}](${song.url})** to the queue.`)
 .setThumbnail(song.thumbnail)
 .setFooter({ text: `Duration: ${song.duration}` });
 }

 if (!queue.playing) await queue.play();

 await interaction.reply({
 embeds: [embed]
 })
 }
}



Is ffmpeg called differently now ? Am I doing something wrong ?


I've tried different installs of Ffmpeg and none seem to work, so I'd imagine it originates somewhere in my code.