Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (77)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (9797)

  • Need Help Making Java Script Discord Music Bot

    2 février 2017, par Gambino

    I have tried to use this code to make a discord music bot but i am getting error telling me i need ffmpeg, but how would I implement it into this code ?

    index.js file

    const Discord = require('discord.js');
    const bot = new Discord.Client();
    const config = require("./config.json");
    const ytdl = require('ytdl-core');

    var youtube = require('./youtube.js');


    var ytAudioQueue = [];
    var dispatcher = null;

    bot.on('message', function(message) {
       var messageParts = message.content.split(' ');
       var command = messageParts[0].toLowerCase();
       var parameters = messageParts.splice(1, messageParts.length);

       switch (command) {

           case "-join" :
           message.reply("Attempting to join channel " + parameters[0]);
           JoinCommand(parameters[0], message);
           break;
       
           case "-play" :
           PlayCommand(parameters.join(" "), message);
           break;

           case "-playqueue":
           PlayQueueCommand(message);
           break;
       }
    });


       function PlayCommand(searchTerm) {
           if(bot.voiceConnections.array().length == 0) {
               var defaultVoiceChannel = bot.channels.find(val => val.type === 'voice').name;
               JoinCommand(defaultVoiceChannel);
           }
           youtube.search(searchTerm, QueueYtAudioStream);
       }

       function PlayQueueCommand(message) {
           var queueString = "";

           for(var x = 0; x < ytAudioQueue.length; x++) {
               queueString += ytAudioQueue[x].videoName + ", ";
           }
           queueString = queueString.substring(0, queueString.length - 2);
           message.reply(queueString);
       }

       function JoinCommand(ChannelName) {
           var voiceChannel = GetChannelByName(ChannelName);

           if (voiceChannel) {
               voiceChannel.join();
               console.log("Joined " + voiceChannel.name);
           }
           
           return voiceChannel;
           
       }

       /* Helper Methods */

       function GetChannelByName(name) {
           var channel = bot.channels.find(val => val.name === name);
           return channel;
       }

     

       function QueueYtAudioStream(videoId, videoName) {
           var streamUrl = youtube.watchVideoUrl + videoId;

           if (!ytAudioQueue.length) {
               ytAudioQueue.push(
                   {
                       'streamUrl' : streamUrl,
                       'videoName' : videoName
                   }
               );
               console.log('Queued audio ' + videoName);
               PlayStream(ytAudioQueue[0].streamUrl);
           }
           else {
               ytAudioQueue.push(
                   {
                       'streamUrl' : streamUrl,
                       'videoName' : videoName
                   }
               );
           }
           console.log("Queued audio " + videoName);
       }

       function PlayStream(streamUrl) {
           const streamOptions = {seek: 0, volume: 1};

           if (streamUrl) {
               const stream = ytdl(streamUrl, {filter: 'audioonly'});

               if (dispatcher == null) {
                   var voiceConnection = bot.voiceConnections.first();

                   if(voiceConnection) {
                       console.log("Now Playing " + ytAudioQueue[0].videoname);
                       dispatcher = bot.voiceConnections.first().playStream(stream, streamOptions);

                       dispatcher.on('end', () => {
                           dispatcher = null;
                           PlayNextStreamInQueue();
                       });

                       dispatcher.on('error', (err) => {
                           console.log(err);
                       });
                   }
               } else {
                   dispatcher = bot.voiceConnections.first().playStream(stream, streamOptions);
               }
               
           }
       }

       function PlayNextStreamInQueue() {
           ytAudioQueue.splice(0, 1);

           if (ytAudioQueue.length != 0) {
               console.log("now Playing " + ytAudioQueue[0].videoName);
               PlayStream(ytAudioQueue[0].streamUrl);
           }
       }


    bot.login(config.token);

    youtube.js file

    var request = require('superagent');

    const API_KEY = "My API KEY";
    const WATCH_VIDEO_URL = "https://www.youtube.com/watch?v=";

    exports.watchVideoUrl = WATCH_VIDEO_URL;

    exports.search = function search(searchKeywords, callback) {
     var requestUrl = 'https://www.googleapis.com/youtube/v3/search' + '?part=snippet&q=' + escape(searchKeywords) + '&key=' + API_KEY;

     request(requestUrl, (error, response) => {
       if (!error && response.statusCode == 200) {

         var body = response.body;
         if (body.items.length == 0) {
           console.log("I Could Not Find Anything!");
           return;
         }
         for (var item of body.items) {
           if (item.id.kind == 'youtube#video') {
             callback(item.id.videoId, item.snippet.title);
             return;
           }
         }
       } else {
         console.log("Unexpected error!");
         return;
       }
     });

     return;

    };

    Error I am getting when I try to run code :

    Joined General

    C :\Discord Bot\node_modules\discord.js\src\client\voice\pcm\FfmpegConverterEngine.

    js:80

    throw new Error(

    ^

    Error : FFMPEG was not found on your system, so audio cannot be played. Please make
    sure FFMPEG is installed and in your PATH.

  • Discord music Bot Python starts ffmpeg, green light appears around bot but no audio plays [closed]

    27 avril 2023, par QuestionHaver99

    I've tried using FFmpegOpusAudio and FFMPEGPCMaudio instead, but it gives the same issue. FFMPEG starts and the green light of the bot in the channel shows, but no audio plays, and then the bot exits the channel when the song should be over and FFMPEG terminates. I've tried streaming the audio and playing from a local file, and the same issue.

    


    and just as a quick checklist of confirmed not the issues : the volume is fine and the permissions are fine and ffmpeg is in environment variables and set up correctly.

    


    any advice would be greatly appreciated

    


  • Heroku Python Discord music bot no sound [closed]

    15 septembre 2022, par olfis

    I just created python discord bot using youtube_dl and discord.py
I wanted to keep it live 24/7 on Heroku but there is one issue...
My bot is working good on my PC, but when I run it from Heroku bot just joins voice channel, adds songs to queue but I can't hear anything, his audio it's always off...

    


    Here's a screenshot of installe buildpacks on heroku.
Buildpakcs screenshot