Recherche avancée

Médias (0)

Mot : - Tags -/tags

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (106)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (15100)

  • I got that error when i try to play music with my bot on discord

    20 septembre 2020, par TheKillerBoss 27

    (node:10076) UnhandledPromiseRejectionWarning : TypeError : Cannot read property 'id' of undefined
at play (C :\Users\USER\Desktop\Giochi e Programmi\Foto video ecc\Proggetti\Discord-bot\Akagi-chan\Akagi_chan.js:49:51)
at C :\Users\USER\Desktop\Giochi e Programmi\Foto video ecc\Proggetti\Discord-bot\Akagi-chan\Akagi_chan.js:89:17
    
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:10076) UnhandledPromiseRejectionWarning : Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id : 1)
(node:10076) [DEP0018] DeprecationWarning : Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

    


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

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

const token = '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'

var versione = '1.0.1';
var autore = 'TheKillerBoss';
var servers = {};

const PREFIX = '!';

bot.on('ready', () =>{
    console.log('Online!');
    bot.user.setActivity('Kawaii!', {type: "PLAYING"});
})

bot.on('message', message=>{

    let args = message.content.substring(PREFIX.length).split(" ");

    switch(args[0])
    {
        case 'help':
            message.channel.send('ping --> pong!')
            message.channel.send('twitch --> canale twitch')
            message.channel.send('twitter --> pagina twitter')
            break;
        case 'ping':
            message.channel.send('pong!')
            break;
        case 'twitch':
            message.channel.send('Segui TheKilleBoss su Twitch! https://twitch.tv/thekillerboss_27')
            break;
        case 'twitter':
            message.channel.send('Segui TheKilleBoss su Twitter https://twitter.com/TheKillerBoss27')
            break;
        case 'versione':
            message.channel.send('Versione: ' + versione)
            break;
        case 'autore':
            message.channel.send('Autore: ' + autore)
            break;
        case 'play':
            function play(connection, message)
            {
                var server = servers(message.guid.id);

                server.dispatcher = connection.play(ytdl(server.queue[0], {filter: "audioonly"}));

                server.queue.shift();

                server.dispatcher.on("end", function()
                {
                    if(server.queue[0])
                    {
                        play(connection, message);
                    }
                    else
                    {
                        connection.disconnect();
                    }
                });
            
             }
            if(!args[1])
            {
                message.channel.send("Devi inserire un link!");
                return;
            }

            if(!message.member.voice.channel)
            {
                message.channel.send("Devi essere in un canale vocale!");
                return;
            }

            if (!servers[message.guild.id]) servers[message.guild.id] = {
                queue: []
            }

            var server = servers[message.guild.id];

            server.queue.push(args[1]);

    if(!message.member.voice.connection)message.member.voice.channel.join().then(function(connection){
            play(connection, message);
        })

    
        break;
    
}
})


bot.login(token);


    


    so the bot enters the voice channel but does not start the music and it give me that error.
I removed the token for privacy.

    


  • FFMPEG - Error during conversion : Input stream error : Status code : 403

    18 août 2024, par SOURABH UPRETI
    const express = require('express');
const ytdl = require('ytdl-core');
const ffmpeg = require('fluent-ffmpeg');
const ffmpegStatic = require('ffmpeg-static');

const app = express();
app.use(express.static('public'));

app.get('/videoInfo', async (req, res) => {
    const { url } = req.query;
    if (!ytdl.validateURL(url)) {
        return res.status(400).send('Invalid URL');
    }

    const requestOptions = {
        headers: {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'
        }
    };

    try {
        const info = await ytdl.getInfo(url, requestOptions);
        const audioFormats = ytdl.filterFormats(info.formats, 'audioonly');
        const highestQualityAudio = audioFormats.reduce((prev, curr) => (prev.audioBitrate > curr.audioBitrate ? prev : curr));

        res.json({
            videoTitle: info.videoDetails.title,
            videoThumbnail: info.videoDetails.thumbnails[info.videoDetails.thumbnails.length - 1].url, 
            audioFormat: highestQualityAudio
        });
    } catch (error) {
        console.error('Error fetching video info:', error);
        res.status(500).send('Failed to retrieve video info.');
    }
});

app.get('/download', (req, res) => {
    const { url } = req.query;

    function downloadAndConvertAudio(retryCount = 0) {
        const requestOptions = {
            headers: {
                'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'
            }
        };

        res.header('Content-Disposition', 'attachment; filename="audio.mp3"');
        const videoStream = ytdl(url, { quality: 'highestaudio', requestOptions: requestOptions });

        ffmpeg(videoStream)
            .setFfmpegPath(ffmpegStatic)
            .audioBitrate(128)
            .toFormat('mp3')
            .on('error', (error) => {
                console.error('Error in ffmpeg conversion:', error);
                if (error.message.includes('403') && retryCount < 3) {
                    console.log('Retrying download...');
                    setTimeout(() => downloadAndConvertAudio(retryCount + 1), 2000); 
                } else {
                    res.status(500).send(`Error during conversion: ${error.message}`);
                }
            })
            .pipe(res);
    }

    downloadAndConvertAudio();
});

const PORT = 3000;
app.listen(PORT, () => {
    console.log(`Server running on http://localhost:${PORT}`);
});


    


    Getting Error during conversion on this server. I tried running it on replit but giving the error all the time. I'm new to this and can't figure out the issue. CHATGPT-4 couldn't help.
Can someone help me with this ???

    


    ChatGPT said - The "Error during conversion : Input stream error : Status code : 410" indicates a "Gone" error, which means the resource you were trying to access is no longer available at the specified URL. This can occur in situations where YouTube content has been removed or is no longer accessible due to changes in YouTube's policy or the specific video's availability.

    


  • Streaming MP4 frames to HTML5, what am I doing wrong ?

    5 septembre 2014, par mczarnek

    Currently I am generating a MP4 Bitstream using Intel’s Media SDK library, which uses ffmpeg underneath the covers. I can generate a mp4 file, and play it and it works.

    However, when I try to stream that mp4 across the network, it doesn’t play within the HTML5 video player, as tested within Chrome, Firefox, or IE.

    This much is sent back and forth across the network :

    Sent by Chrome:
    GET / HTTP/1.1
    Host: localhost:8085
    Connection: keep-alive
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.102 Safari/537.36
    Accept-Encoding: identity;q=1, *;q=0
    Accept: */*
    Accept-Language: en-US,en;q=0.8
    Range: bytes=0-

    From my video player:
    HTTP/1.1 200 OK
    Server: Microsoft-HTTPAPI/2.0
    Date: Thu, 09 Jan 2014 17:28:14 GMT
    Content-type: video/mp4

    After this, I send a newline, and all the video frames, one after another, while listening to see if I receive anything back from the browser.

    Then nothing happens. Any suggestions to get this playing video ? Thank you !