Recherche avancée

Médias (91)

Autres articles (26)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

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

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (3329)

  • Discord.js Music bot TypeError [ERR_INVALID_ARG_TYPE] : The "file" argument must be of type string. Received type object

    21 février 2020, par Cole Perry

    I’m new to Discord.js and I’m trying to have the bot join a voice channel and play an audio file on my computer. I have been following this guide : https://discord.js.org/#/docs/main/stable/topics/voice . Here is the Index.js page :

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

    const token = '***********************************************';



    Colesbot.on('ready', () =>{
       console.log('Slamsbot is online.');
    })

    Colesbot.on('message', msg=>{
      if(msg.content == "What up bot?"){
          msg.reply("Whats good pimp?")
      }
    });

    Colesbot.on('message', message=>{
       if (message.content === '/join') {
           // Only try to join the sender's voice channel if they are in one themselves
           if (message.member.voiceChannel) {
               message.member.voiceChannel.join().then(connection => {
                   message.reply('I have successfully connected to the channel!');

                   // To play a file, we need to give an absolute path to it
                   const dispatcher = connection.playFile('C:\Users\bobal\Documents\GitHub\Spotify-Playlist-Discord-bot\Assets\Glory.mp3');

                   dispatcher.on('end', () => {
                       // The song has finished
                       console.log('Finished playing!');
                     });

                   dispatcher.on('error', e => {
                       // Catch any errors that may arise
                       console.log(e);
                     });

                     dispatcher.setVolume(0.5); // Set the volume to 50%
               }).catch(console.log);
       } else {
           message.reply('You need to join a voice channel first!');
         }
       }
    });



    //Event listener for new guild members
    Colesbot.on('guildMemberAdd', member =>{
       // Send the message to a designated channel on a server:
       const channel = member.guild.channels.find(ch => ch.name === 'general');
       // Do nothing if the channel wasn't found on this server
       if (!channel) return;
       // Send the message, mentioning the member
       channel.send(`Welcome to the server, ${member}. Please use the bot-commands channel to assign yourself a role.`);
    })

    Colesbot.login(token);



    exports.run = (client, message, args) => {

       let user = message.mentions.users.first || message.author;


    }

    FFMPEG is installed and I have set the environment path for it. When I type FFMPEG in the command line I get the proper response.

    Some have said I need to install the ffmpeg binaries but when I run npm install ffmpeg-binaries I get this error message :

    npm WARN deprecated ffmpeg-binaries@4.0.0: ffmpeg-binaries is no longer being maintained. use ffmpeg-static, or just install ffmpeg

    > lzma-native@3.0.8 install C:\Users\bobal\Documents\GitHub\Spotify-Playlist-Discord-bot\node_modules\lzma-native
    > node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build

    node-pre-gyp ERR! Tried to download(404): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v72-win32-x64.tar.gz
    node-pre-gyp ERR! Pre-built binaries not found for lzma-native@3.0.8 and node@12.14.1 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
    node-pre-gyp ERR! Tried to download(undefined): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v72-win32-x64.tar.gz
    node-pre-gyp ERR! Pre-built binaries not found for lzma-native@3.0.8 and node@12.14.1 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
    gyp ERR! find Python
    gyp ERR! find Python Python is not set from command line or npm configuration
    gyp ERR! find Python Python is not set from environment variable PYTHON
    gyp ERR! find Python checking if "python" can be used
    gyp ERR! find Python - "python" is not in PATH or produced an error
    gyp ERR! find Python checking if "python2" can be used
    gyp ERR! find Python - "python2" is not in PATH or produced an error
    gyp ERR! find Python checking if "python3" can be used
    gyp ERR! find Python - "python3" is not in PATH or produced an error
    gyp ERR! find Python checking if the py launcher can be used to find Python 2
    gyp ERR! find Python - "py.exe" is not in PATH or produced an error
    gyp ERR! find Python checking if Python is C:\Python27\python.exe
    gyp ERR! find Python - "C:\Python27\python.exe" could not be run
    gyp ERR! find Python checking if Python is C:\Python37\python.exe
    gyp ERR! find Python - "C:\Python37\python.exe" could not be run
    gypgyp ERR!  find PythonERR!
    find Pythongyp
    gyp ERR!ERR!  find Pythonfind Python Python is not set from command line or npm configuration
    **********************************************************
    gypgyp  ERR!ERR!  find Pythonfind Python Python is not set from environment variable PYTHON
    You need to install the latest version of Python.
    gypgyp  ERR!ERR!  find Pythonfind Python checking if "python" can be used
    Node-gyp should be able to find and use Python. If not,
    gypgyp  ERR!ERR!  find Pythonfind Python - "python" is not in PATH or produced an error
    you can try one of the following options:
    gypgyp  ERR!ERR!  find Pythonfind Python checking if "python2" can be used
    - Use the switch --python="C:\Path\To\python.exe"
    gypgyp ERR!  ERR!find Python  - "python2" is not in PATH or produced an error
    find Pythongyp   (accepted by both node-gyp and npm)
    gypERR!  ERR!find Python  checking if "python3" can be used
    find Pythongyp - Set the environment variable PYTHON
    gypERR!  ERR!find Python  - "python3" is not in PATH or produced an error
    find Pythongyp - Set the npm configuration variable python:
    gypERR!  ERR!find Python  checking if the py launcher can be used to find Python 2
    find Pythongyp   npm config set python "C:\Path\To\python.exe"
    gypERR!  ERR!find Python  - "py.exe" is not in PATH or produced an error
    find Pythongyp For more information consult the documentation at:
    gypERR!  ERR!find Python  checking if Python is C:\Python27\python.exe
    gypfind Python  https://github.com/nodejs/node-gyp#installation
    ERR!gyp  find PythonERR! - "C:\Python27\python.exe" could not be run
    gypfind Python  **********************************************************
    ERR!gyp  find PythonERR! checking if Python is C:\Python37\python.exe
    gypfind Python
    ERR! find Python - "C:\Python37\python.exe" could not be run
    gypgyp  ERR!ERR!  configure errorfind Python

    gypgyp  ERR!ERR!  stackfind Python Error: Could not find any Python installation to use
    **********************************************************
    gyp gypERR!  ERR!stack      at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
    find Pythongyp  You need to install the latest version of Python.
    ERR!gyp stack      at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
    ERR!gyp  ERR!find Python  Node-gyp should be able to find and use Python. If not,
    stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
    gypgyp  ERR!ERR!  find Pythonstack you can try one of the following options:
        at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
    gypgyp  ERR!ERR!  stackfind Python     at exithandler (child_process.js:302:5)
    gyp - Use the switch --python="C:\Path\To\python.exe"
    gypERR!  stackERR!     at ChildProcess.errorhandler (child_process.js:314:5)
    gyp find PythonERR!    (accepted by both node-gyp and npm)
    stack     at ChildProcess.emit (events.js:223:5)
    gypgyp  ERR!ERR!  stackfind Python     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
    - Set the environment variable PYTHON
    gypgyp  ERR!ERR! stack      at onErrorNT (internal/child_process.js:456:16)
    find Pythongyp - Set the npm configuration variable python:
    gypERR!  ERR!stack      at processTicksAndRejections (internal/process/task_queues.js:81:21)
    find Python   npm config set python "C:\Path\To\python.exe"
    gypgyp  ERR!ERR!  find PythonSystem For more information consult the documentation at:
    Windows_NT 10.0.17763
    gypgyp  ERR!ERR!  find Pythoncommand https://github.com/nodejs/node-gyp#installation
    "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\bobal\\Documents\\GitHub\\Spotify-Playlist-Discord-bot\\node_modules\\lzma-native\\binding-v3.0.8-node-v72-win32-x64\\lzma_native.node" "--module_name=lzma_native" "--module_path=C:\\Users\\bobal\\Documents\\GitHub\\Spotify-Playlist-Discord-bot\\node_modules\\lzma-native\\binding-v3.0.8-node-v72-win32-x64"
    gypgyp  ERR!ERR!  find Pythoncwd **********************************************************
    C:\Users\bobal\Documents\GitHub\Spotify-Playlist-Discord-bot\node_modules\lzma-native
    gypgyp  ERR!ERR!  find Pythonnode -v
    v12.14.1
    gyp ERR! node-gyp -vgyp v5.0.5
    gyp ERR!ERR!  configure errornot ok

    gyp ERR! stack Error: Could not find any Python installation to use
    gyp ERR! stack     at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
    gyp ERR! stack     at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
    gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
    gyp ERR! stack     at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
    gyp ERR! stack     at exithandler (child_process.js:302:5)
    gyp ERR! stacknode-pre-gyp     at ChildProcess.errorhandler (child_process.js:314:5)
    gypERR!  ERR!build error
    stack     at ChildProcess.emit (events.js:223:5)
    node-pre-gypgyp  ERR!ERR!  stackstack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
    Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\bobal\Documents\GitHub\Spotify-Playlist-Discord-bot\node_modules\lzma-native\binding-v3.0.8-node-v72-win32-x64\lzma_native.node --module_name=lzma_native --module_path=C:\Users\bobal\Documents\GitHub\Spotify-Playlist-Discord-bot\node_modules\lzma-native\binding-v3.0.8-node-v72-win32-x64' (1)
    node-pre-gypgyp  ERR! ERR!stack      at ChildProcess.<anonymous> (C:\Users\bobal\Documents\GitHub\Spotify-Playlist-Discord-bot\node_modules\lzma-native\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
    stacknode-pre-gyp     at onErrorNT (internal/child_process.js:456:16)
    gypERR!  ERR!stack      at ChildProcess.emit (events.js:223:5)
    stacknode-pre-gyp     at processTicksAndRejections (internal/process/task_queues.js:81:21)
    ERR! stackgyp     at maybeClose (internal/child_process.js:1021:16)
    node-pre-gypERR!  ERR!System stack Windows_NT 10.0.17763
        at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
    gyp ERR! node-pre-gypcommand  "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\bobal\\Documents\\GitHub\\Spotify-Playlist-Discord-bot\\node_modules\\lzma-native\\binding-v3.0.8-node-v72-win32-x64\\lzma_native.node" "--module_name=lzma_native" "--module_path=C:\\Users\\bobal\\Documents\\GitHub\\Spotify-Playlist-Discord-bot\\node_modules\\lzma-native\\binding-v3.0.8-node-v72-win32-x64"
    ERR!gyp  SystemERR! Windows_NT 10.0.17763
    node-pre-gypcwd  C:\Users\bobal\Documents\GitHub\Spotify-Playlist-Discord-bot\node_modules\lzma-native
    ERR!gyp  commandERR! "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\bobal\\Documents\\GitHub\\Spotify-Playlist-Discord-bot\\node_modules\\lzma-native\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
    node-pre-gypnode -v  v12.14.1
    ERR!gyp  cwdERR! C:\Users\bobal\Documents\GitHub\Spotify-Playlist-Discord-bot\node_modules\lzma-native
    node-pre-gypnode-gyp -v  v5.0.5
    ERR!gyp  ERR!node -v  v12.14.1
    not ok
    node-pre-gyp ERR! node-pre-gyp -v v0.6.39
    node-pre-gyp ERR! not ok
    Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\bobal\Documents\GitHub\Spotify-Playlist-Discord-bot\node_modules\lzma-native\binding-v3.0.8-node-v72-win32-x64\lzma_native.node --module_name=lzma_native --module_path=C:\Users\bobal\Documents\GitHub\Spotify-Playlist-Discord-bot\node_modules\lzma-native\binding-v3.0.8-node-v72-win32-x64' (1)
    npm WARN discord.js@11.5.1 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.
    npm WARN spotifybot@1.0.0 No description
    npm WARN spotifybot@1.0.0 No repository field.

    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! lzma-native@3.0.8 install: `node-pre-gyp install --fallback-to-build &amp;&amp; node node_modules/rimraf/bin.js build`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the lzma-native@3.0.8 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\bobal\AppData\Roaming\npm-cache\_logs\2020-02-21T19_25_47_323Z-debug.log
    </anonymous></anonymous></anonymous>

    So then I tried installing an older version and I’m now using ffmpeg-binaries@3.2.2-3 but when I type /join I get this : [ERR_INVALID_ARG_TYPE] : The "file" argument must be of type string. Received type object

  • OCI runtime exec failed : exec failed : (...) executable file not found in $PATH" : unknown

    12 octobre 2024, par Uğur Kaya

    I have dockerized an app which has ffmpeg installed in it via libav-tools. The app launches without problem, yet the problem occured when fluent-ffmpeg npm module tried to execute ffmpeg command, which was not found. When I wanted to check the version of the ffmpeg and the linux distro set up in the image, I used sudo docker exec -it c44f29d30753 "lsb_release -a" command, but it gave the following error : OCI runtime exec failed: exec failed: container_linux.go:296: starting container process caused "exec: \"lsb_release -a\": executable file not found in $PATH": unknown

    &#xA;&#xA;

    Then I realized that it gives me the same error with all the commands that I try to run inside the image or the container.

    &#xA;&#xA;

    OCI runtime exec failed: exec failed: container_linux.go:296: starting container process caused "exec: \"ffmpeg -a\": executable file not found in $PATH": unknown&#xA;

    &#xA;&#xA;

    This is my Dockerfile :

    &#xA;&#xA;

    FROM ubuntu:xenial&#xA;FROM node&#xA;RUN apt-get -y update&#xA;RUN apt-get --yes install libav-tools&#xA;RUN mkdir -p /usr/src/app&#xA;WORKDIR /usr/src/app&#xA;COPY package.json /usr/src/app&#xA;RUN npm install&#xA;COPY . /usr/src/app&#xA;RUN npm run build&#xA;ENV NODE_ENV production&#xA;EXPOSE 8000&#xA;CMD ["npm", "run", "start:prod"]&#xA;

    &#xA;&#xA;

    I would kindly ask for your help. Thank you very much !

    &#xA;

  • "Error : FFMPEG not found" : Error with simple Discord Bot

    23 décembre 2019, par Robin Seerig

    I’m using Windows (64-bit) with Node.js and npm installed.
    In my project file, I have run the following commands :

    npm init
    npm install discord.js --save
    npm install ffmpeg --save

    Now i just created the code for a basic bot here is the main code.
    I list here the important :

    if (message.content === '!play' &amp;&amp; message.member.roles.has(message.guild.roles.find("name", config.role_name).id)) {
       if (!message.member.voiceChannel) return log("?");
          message.member.voiceChannel.join().then(function (connection){      
          });
    }

    Then, in Discord, I say the following :

    [1517932146]  Musik bot loaded
       (node:35760) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: FFMPEG not found

    I have already tested the following :

    • reinstallation of everything
    • others of the require names e.t.z.
    • simplify the code

    So if you have any ideas then let me know.

    Solution

    npm i ffmpeg-binaries@3.2.2-3

    link