Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (11566)

  • 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.

    


  • Internet Explorer 11 HTML5 audio duration = infinity issue

    27 février 2016, par unbirth

    Today I’ve met an unpleasant issue. There is a website with a custom HTML5 audio player. After the page loads, I try to echo document.getElementById("myAudioId").duration, it is needed in order to make navigation possible. In every other browser it works just fine, the duration is showed, but IE11 works differently - it shows that duration equals Infinity. But as I noticed, when the song is buffered to the end, the duration magically appers and the navigation works. In other browsers everything works from the start. The content-length headers are set up. What could it be ?

    UPD : Other sites with HTML5 audio let me see the duration from the very start. The duration, I guess, is part of metadata and could be loaded even without preloading the audio file using preload="metadata", but it also doesn’t work.

    UPD2 : I’ve also tried playing around with jsfiddle and created the same audio tag there with same MP3 audio - there was the same situation. But then I’ve inserted link to another MP3 there, from another site - and it worked !. More than that, I’ve uploaded this second song to the first problematic website and after that the song that worked perfectly couldn’t also show me its duration and stuff. So now I think it’s something on server side. But don’t know what it is.

    UPD3 : Finally, I’ve been told that files are converted using FFMPEG to MP3 128bit, then they stop being OK. Now I need to find how should I convert MP3s so they are OK.

  • Replace blank spaces from arguments to run command

    12 août 2017, par ChrisBlp

    I’m using Runtime.getRuntime.exec(String) to cut some songs with ffmpeg.
    But when my song has a name with a blankspace it doesn’t work ...

    So before I cut the song, I want to replace every blank space of my songs by "\ ".

    I did that :

    String in = directory+songs.get(i);
    String out = directory+"trimed_"+songs.get(i);
    in.replaceAll(" "," \\ ");
    out.replaceAll(" ", "\\ ");
    String str = "ffmpeg -t 1 -i "+in+" -vcodec copy "+out;
    Runtime.getRuntime().exec(str);

    But it doesn’t replace anything at all when I print str, am I missing something ?

    Update : I tried every ideas given bellow and I didn’t find a way to fix the problem. Hence, I replaced the blankspaces by "_" and it’s working great.