Recherche avancée

Médias (1)

Mot : - Tags -/portrait

Autres articles (55)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Prérequis à l’installation

    31 janvier 2010, par

    Préambule
    Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
    Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
    Il (...)

Sur d’autres sites (9949)

  • Discord bot returning odd error message and not playing sound

    26 février 2020, par Ravenr_

    I am attempting to create a function of my discord bot that will join your voice channel then play something from youtube as specified in the command

    i.e. $play <youtube link="link"></youtube>

    The problem is that my bot joins the voice channel but doesn’t play any sound and outputs an error to the console that I dont know how to fix

    My Code :

    const ytdl = require("ytdl-core");
    module.exports = {
       name: 'play',
       description: 'initiates music methods of the bot',
       execute(msg, args){
           var servers = {};

           function play(connection, msg){
               var server = servers[msg.guild.id];

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

               server.dispatcher.on("end", function(){
                   if(server.queue[0]){
                       play(connection, msg);
                   }else{
                       connection.disconnect();
                   }
               });


           }
           if(!args[1]){
               return msg.channel.send("you need to provide a link");
           }
           if(!msg.member.voiceChannel){
               return msg.channel.send("You must be in a voice channel to use this feature");
           }
           if(!servers[msg.guild.id]) servers[msg.guild.id] = {
               queue: []
           }
           var server = servers[msg.guild.id];
           server.queue.push(args[1]);
           if(!msg.guild.voiceConnection) msg.member.voiceChannel.join().then(function(connection){
               play(connection, msg);
           })
       }
    }

    The Error :

    2020-02-26T16:31:59.458215+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received an instance of Object
    2020-02-26T16:31:59.458223+00:00 app[worker.1]:     at validateString (internal/validators.js:117:11)
    2020-02-26T16:31:59.458224+00:00 app[worker.1]:     at normalizeSpawnArguments (child_process.js:406:3)
    2020-02-26T16:31:59.458224+00:00 app[worker.1]:     at Object.spawn (child_process.js:542:16)
    2020-02-26T16:31:59.458225+00:00 app[worker.1]:     at new FfmpegProcess (/app/node_modules/prism-media/src/transcoders/ffmpeg/FfmpegProcess.js:14:33)
    2020-02-26T16:31:59.458225+00:00 app[worker.1]:     at FfmpegTranscoder.transcode (/app/node_modules/prism-media/src/transcoders/ffmpeg/Ffmpeg.js:34:18)
    2020-02-26T16:31:59.458226+00:00 app[worker.1]:     at MediaTranscoder.transcode (/app/node_modules/prism-media/src/transcoders/MediaTranscoder.js:27:31)
    2020-02-26T16:31:59.458226+00:00 app[worker.1]:     at Prism.transcode (/app/node_modules/prism-media/src/Prism.js:13:28)
    2020-02-26T16:31:59.458227+00:00 app[worker.1]:     at AudioPlayer.playUnknownStream (/app/node_modules/discord.js/src/client/voice/player/AudioPlayer.js:97:35)
    2020-02-26T16:31:59.458231+00:00 app[worker.1]:     at VoiceConnection.playStream (/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:478:24)
    2020-02-26T16:31:59.458232+00:00 app[worker.1]:     at play (/app/commands/play.js:11:44)

    for reference these are the links I tested it with 1 & 2

    I’m not sure how to make queue[0] a string, which is what I assume the problem is.

    I was thinking of using a toString() i.e. server.queue[0].toString() but I think that will just return the memory address.

    If anyone can help me know what the issue is or how to fix it, that would be great.

  • Which directory should i put FFmpeg ? [duplicate]

    25 juillet 2020, par Panda Gaming23

    I am making a discord bot and I get the following error

    &#xA;

    node:4) UnhandledPromiseRejectionWarning: Error: FFmpeg/avconv not found!&#xA;&#xA;2020-07-25T01:00:13.991518&#x2B;00:00 app[worker.1]:     at Function.getInfo (/app/node_modules/prism-media/src/core/FFmpeg.js:130:11)&#xA;&#xA;2020-07-25T01:00:13.991519&#x2B;00:00 app[worker.1]:     at Function.create (/app/node_modules/prism-media/src/core/FFmpeg.js:143:38)&#xA;&#xA;2020-07-25T01:00:13.991519&#x2B;00:00 app[worker.1]:     at new FFmpeg (/app/node_modules/prism-media/src/core/FFmpeg.js:44:27)&#xA;&#xA;2020-07-25T01:00:13.991520&#x2B;00:00 app[worker.1]:     at AudioPlayer.playUnknown (/app/node_modules/discord.js/src/client/voice/player/BasePlayer.js:47:20)&#xA;&#xA;2020-07-25T01:00:13.991520&#x2B;00:00 app[worker.1]:     at VoiceConnection.play (/app/node_modules/discord.js/src/client/voice/util/PlayInterface.js:71:28)&#xA;&#xA;2020-07-25T01:00:13.991522&#x2B;00:00 app[worker.1]:     at play (/app/commands/play.js:14:34)&#xA;&#xA;2020-07-25T01:00:13.991522&#x2B;00:00 app[worker.1]:     at /app/commands/play.js:42:5&#xA;&#xA;2020-07-25T01:00:13.991522&#x2B;00:00 app[worker.1]:     at processTicksAndRejections (internal/process/task_queues.js:97:5)&#xA;&#xA;2020-07-25T01:00:13.991629&#x2B;00:00 app[worker.1]: (node:4) 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: 6)&#xA;&#xA;

    &#xA;

    Here is the code

    &#xA;

    const ytdl = require("ytdl-core");&#xA;const Discord = require("discord.js");&#xA;&#xA;var servers = {};&#xA;&#xA;module.exports = {&#xA;  name: "play",&#xA;  description: "this is a music play command!",&#xA;  execute(message, args) {&#xA;  &#xA;  function play(connection, message) {&#xA;        var server = servers[message.guild.id];&#xA;        &#xA;        server.dispatcher = connection.play(ytdl(server.queue[0], {filter: "audioonly"}));&#xA;        &#xA;        server.queue.shift();&#xA;        &#xA;        server.dispatcher.on("end", function () {&#xA;            if(server.queue[0]){&#xA;                play(connection, message);&#xA;            }&#xA;            else {connection.disconnect();}&#xA;        })&#xA;    }&#xA;    if (!args[0]) {&#xA;      message.channel.send("you need to provide a link!");&#xA;      return;&#xA;    }&#xA;&#xA;    if (!message.member.voice.channel) {&#xA;      message.channel.send("you must be in ||a|| voice channel to play the bot!");&#xA;      return;&#xA;    }&#xA;&#xA;    if (!servers[message.guild.id]) servers[message.guild.id] = { queue: [] };&#xA;    &#xA;    var server = servers[message.guild.id];&#xA;    &#xA;    server.queue.push(args[0]);&#xA;     &#xA;    if (!message.member.voice.connection) message.member.voice.channel.join().then(function(connection) {&#xA;    play(connection, message);&#xA;    })&#xA;  },&#xA;};&#xA;

    &#xA;

    I would like to know which directory I should put FFmpeg.

    &#xA;

    I would also like to know if the FFmpeg executable has to be in a folder or compressed or if i can just place the executable in a certain directory

    &#xA;

    I am hosting my bot using Heroku on a Mac using Discord.js V12

    &#xA;

    Please help.

    &#xA;

    Thanks !

    &#xA;

  • Nomenclature #4519 (Nouveau) : Renommage de terminologie (blacklist / whitelist)

    13 juillet 2020

    En lisant la compilation [PHP Annotated – June 2020](https://blog.jetbrains.com/phpstorm/2020/06/php-annotated-june-2020/) on tombe sur ce point :

    [[RFC] Change terminology to ExcludeList](https://wiki.php.net/rfc/change-terminology-to-excludelist) — The topic of renaming offensive terms has not been overlooked by the PHP world either. There have been [heated discussions](https://externals.io/message/110515) in the Internals.
    In the PHP core, the change affects only one thing : the configuration directive `opcache.blacklist_filename` should be renamed to `opcache.exclude_list_filename`.
    Many other PHP tools have already made changes in this regard : [PHPUnit](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.3.md#930---2020-08-07), [Drupal](https://www.drupal.org/project/drupal/issues/2993575), [Xdebug](https://github.com/xdebug/xdebug/commit/63b43b51e43b794cf8cd740e54089b2b7320fbe1), [Yii](https://github.com/yiisoft/yii2/pull/18104), [Composer](https://github.com/composer/composer/pull/8957) (+ [working with non-master Git branches](https://blog.packagist.com/composer-and-default-git-branches/)).

    C’est certainement intéressant aussi de songer à ces renommages chez nous également, utilisés à quelques endroits.