Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (93)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (7248)

  • avcodec/dovi_rpu{enc,dec} : fix ms_weight handling

    25 mai 2024, par Niklas Haas
    avcodec/dovi_rpuenc,dec : fix ms_weight handling
    

    The code as written was wrong. In the spec, these fields are treated
    merely as plain integers in the range 0 to 4095. The only difference
    between L2 and L8 is that L2.ms_weight also accepts an additional value
    of -1, hence the extra sign bit. While it's likely that these are still
    shifted integers in disguise, since all real-world samples seem to use
    a value of 2048 here, the offset used in the code was wrong.

    In addition, because the l8.ms_weight struct member is unsigned, these
    wrong shifting semantics ended up overflowing the field, leading to
    undefined behavior when transcoding. Fortunately, the damage was
    relatively contained in practice, because it just corrupts the coding of
    this field, which is ignored in practice in all implementations I have
    seen.

    • [DH] libavcodec/dovi_rpudec.c
    • [DH] libavcodec/dovi_rpuenc.c
  • Discord slash command music bot stops playing unexpectedly

    29 juillet 2023, par Shelby

    This is a bot I am using to play music and it worked just fine for a while until it didn't. Simply loaded the bot and played for about a minute and quits. From what I see it destroys the entire queue of songs, no matter how many are there. And after that it won't respond to any command and it needs to be reloaded. I don't get any error in the terminal and all the other commands seem to work just fine. Also, this happens to whatever query I use, whether it's 'search', 'url' or 'playlist'.

    


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

module.exports = {
    data: new SlashCommandBuilder()
        .setName("play")
        .setDescription("Asculta muzica")
        .addSubcommand((subcommand)=>
            subcommand
                .setName("song")
                .setDescription("Incarca o singura melodie printr-un url")
                .addStringOption((option) => option.setName("url").setDescription("url-ul melodiei").setRequired(true)))
        .addSubcommand((subcommand) =>
            subcommand
                .setName("playlist")
                .setDescription("Incarca un playlist printr-un url")
                .addStringOption((option) => option.setName("url").setDescription("url-ul playlist-ului").setRequired(true)))
        .addSubcommand((subcommand) =>
            subcommand
                .setName("search")
                .setDescription("Cauta o melodie pe baza cuvintelor-cheie")
                .addStringOption((option) => 
                    option.setName("cautare").setDescription("cauta dupa titlu si autor").setRequired(true))),
        
        run: async ({ client, interaction }) => {
            if (!interaction.member.voice.channel)
                return interaction.editReply("Trebuie sa fii pe un voice channel pentru a folosi aceasta comanda!")

            const queue = await client.player.createQueue(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
                })

                if (result.tracks.length === 0)
                    return interaction.editReply("Niciun rezultat")

                const song = result.tracks[0]
                await queue.addTrack(song)
                embed
                    .setColor(0xF07459)
                    .setDescription(`**[${song.title}](${song.url})** a fost adaugata`)
                    .setThumbnail(song.thumbnail)
                    .setFooter({ text: `Durata: ${song.duration}`})

            } else if (interaction.options.getSubcommand() === "playlist"){
                let url = interaction.options.getString("url")
                const result = await client.player.search(url, {
                    requestedBy: interaction.user,
                    searchEngine: QueryType.YOUTUBE_PLAYLIST
                })

                if (result.tracks.length === 0)
                    return interaction.editReply("Niciun rezultat")

                const playlist = result.playlist
                await queue.addTracks(result.tracks)
                embed
                    .setColor(0xF07459)
                    .setDescription(`**${result.tracks.length} melodii din [${playlist.title}](${playlist.url})** au fost adaugate`)

            } else if (interaction.options.getSubcommand() === "search"){
                let url = interaction.options.getString("cautare")
                const result = await client.player.search(url, {
                    requestedBy: interaction.user,
                    searchEngine: QueryType.AUTO
                })

                if (result.tracks.length === 0)
                    return interaction.editReply("Niciun rezultat")

                const song = result.tracks[0]
                await queue.addTrack(song)
                embed
                    .setColor(0xF07459)
                    .setDescription(`**[${song.title}](${song.url})** a fost adaugata`)
                    .setThumbnail(song.thumbnail)
                    .setFooter({ text: `Durata: ${song.duration}`})
            }
            if (!queue.playing) await queue.play()
            await interaction.editReply({
                embeds: [embed]
            })
                
        }
}


    


    This is the code for the [play] command. No change was done since it worked perfectly.

    


    After some research I found out that there might be a problem with the ffmpeg or the ytdl. I tried updating or reinstalling them, but the problem still remains. I would like to know if I'll need to rework the bot to find an alternative to these two.

    


  • ffmpeg / avconv error while using a discord bot slash cmd

    30 novembre 2022, par Ema R

    Code

    


    const {
    SlashCommandBuilder,
    PermissionFlagsBits,
    PermissionsBitField,
    EmbedBuilder,
  } = require("discord.js");

    const { generateDependencyReport, AudioPlayerStatus, joinVoiceChannel, createAudioPlayer, createAudioResource  } = require('@discordjs/voice'); 
  const googleTTS = require("google-tts-api");

module.exports = {
  data: new SlashCommandBuilder()
    .setName(`tts`)
    .setDescription(`Fai ripetere al bot un messaggio in un canale vocale`)
    .addStringOption((option) =>
        option
          .setName("messaggio")
          .setDescription("Scrivi il messaggio da far ripetere dal bot in vocale")
          .setRequired(true)
      )
    .addBooleanOption((option) =>
    option
      .setName("rallentatore")
      .setDescription("Vuoi che il messaggio sia mandato a rallentatore?")
      .setRequired(true)
  ),  
  async execute(interaction, client) {

    const testo = interaction.options.getString("messaggio");
    const slow = interaction.options.getBoolean("rallentatore");



     const url = googleTTS.getAudioUrl(testo, {
        lang: "it",
        slow: slow,
        host: 'https://translate.google.com',
      });

      


      const { generateDependencyReport, AudioPlayerStatus, joinVoiceChannel, createAudioPlayer, createAudioResource  } = require('@discordjs/voice');



      const voiceChannelId = interaction.member.voice.channel.id
        const voiceChannel = interaction.member.voice.channel
        const guildId = interaction.guild.id

        
        const player = createAudioPlayer();

    

        const resource = createAudioResource(url);
        player.play(resource);

        
        const connection = joinVoiceChannel({
            channelId: voiceChannelId,
            guildId: guildId,
            adapterCreator: voiceChannel.guild.voiceAdapterCreator,
        });    



        const subscription = connection.subscribe(player);


        if (subscription) {
            setTimeout(() => subscription.unsubscribe(), 30_000);
        }

 
    
  },
};



    


    Error

    


    Error: FFmpeg/avconv not found!&#xA;    at Function.getInfo (C:\Users\Casa\OneDrive\Desktop\Discord\eKicks\eKicks Bot v14\node_modules\prism-media\src\core\FFmpeg.js:143:11)&#xA;    at Function.create (C:\Users\Casa\OneDrive\Desktop\Discord\eKicks\eKicks Bot v14\node_modules\prism-media\src\core\FFmpeg.js:156:38)&#xA;    at new FFmpeg (C:\Users\Casa\OneDrive\Desktop\Discord\eKicks\eKicks Bot v14\node_modules\prism-media\src\core\FFmpeg.js:45:27)&#xA;    at Object.transformer (C:\Users\Casa\OneDrive\Desktop\Discord\eKicks\eKicks Bot v14\node_modules\@discordjs\voice\dist\index.js:1699:27)&#xA;    at C:\Users\Casa\OneDrive\Desktop\Discord\eKicks\eKicks Bot v14\node_modules\@discordjs\voice\dist\index.js:1855:58&#xA;    at Array.map (<anonymous>)&#xA;    at createAudioResource (C:\Users\Casa\OneDrive\Desktop\Discord\eKicks\eKicks Bot v14\node_modules\@discordjs\voice\dist\index.js:1855:39)&#xA;    at Object.execute (C:\Users\Casa\OneDrive\Desktop\Discord\eKicks\eKicks Bot v14\src\commands\tools\tts.js:56:26)&#xA;    at Object.execute (C:\Users\Casa\OneDrive\Desktop\Discord\eKicks\eKicks Bot v14\src\events\client\interactionCreate.js:13:23)&#xA;    at Client.<anonymous> (C:\Users\Casa\OneDrive\Desktop\Discord\eKicks\eKicks Bot v14\src\functions\handlers\handleEvents.js:20:23)&#xA;</anonymous></anonymous>

    &#xA;

    i am making a command to play a message in a voice channel. Once this error was returned from the terminal I installed ffmpeg by creating an environment variable and installed python. I don't understand why it keeps giving this error. below I am attaching a picture of the npm list

    &#xA;

    npm list

    &#xA;

    maybe I also have to install avconv but I don't know how to do it, could you please attach the link ? do i need to add avconv to the environment variables as well ?

    &#xA;