Recherche avancée

Médias (91)

Autres articles (67)

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

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

  • How do I receive buffered files or streams from the fluent-ffmpeg module ?

    26 février 2021, par yahoo2344

    Logic was created to replace gif files with mp4 files. However, after saving the gif file to the server, the file is imported and converted to an mp4 file, the mp4 file is saved to the server and the file is read to return the buffer.

    


    Here's a question.

    


      

    1. When I recall files from the fmpeg module, can I receive them in a buffer or stream instead of a path ?

      


    2. 


    3. Is there a way to receive the converted file as a buffer or stream without saving it ?

      


    4. 


    


    return new Promise((resolve, reject) => {
        fs.writeFile(path.join(__dirname, `input.gif`), file, (err) => {
            if (err) {
                reject(null)
            }
            ffmpegg(path.join(__dirname, `input.gif`))
                .size(`500x500`)
                .format('mp4')
                .outputOptions([
                    '-movflags faststart',
                    '-pix_fmt yuv420p',
                    //'-vf scale=trunc(iw/2)*2:trunc(ih/2)*2'
                ]).on('end', () => {
                    fs.readFile(path.join(__dirname, `output.mp4`), (err, mp4Buffer) => {
                        fs.unlink(path.join(__dirname, `input.gif`), (e) => { if (e) console.log('error delete!') })
                        fs.unlink(path.join(__dirname, `output.mp4`), (e) => { if (e) console.log('error delete!') })
                        if (err) {
                            reject(null)
                        }
                        resolve(mp4Buffer)
                    });
                }).save(path.join(__dirname, `output.mp4`))
        });
    })


    


  • Can't install the ffmpeg module

    24 février 2021, par Cursed

    I'm trying to install ffmpeg-binaries it works perfectly local but when I go to hiroku it starts to say that he can't find the modules.

    



    This is for a Discord bot, running node.js I tried to install with npm other ffmpeg's but only that works without implementing the ffmpeg itself

    



    Installing node modules (package.json + package-lock)

    



       > lzma-native@3.0.8 install /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native&#xA;   > node-pre-gyp install --fallback-to-build &amp;&amp; node node_modules/rimraf/bin.js build&#xA;&#xA;   node-pre-gyp ERR! Tried to download(404): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v67-linux-x64.tar.gz &#xA;   node-pre-gyp ERR! Pre-built binaries not found for lzma-native@3.0.8 and node@11.6.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp) &#xA;   node-pre-gyp ERR! Tried to download(undefined): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v67-linux-x64.tar.gz &#xA;   node-pre-gyp ERR! Pre-built binaries not found for lzma-native@3.0.8 and node@11.6.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp) &#xA;   gyp: Call to &#x27;sh liblzma-config.sh "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/build" "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/deps/xz-5.2.3.tar.bz2"&#x27; returned exit status 1 while in binding.gyp. while trying to load binding.gyp&#xA;   gyp ERR! configure error &#xA;   gyp ERR! stack Error: `gyp` failed with exit code: 1&#xA;   gyp ERR! stack     at ChildProcess.onCpExit (/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)&#xA;   gyp ERR! stack     at ChildProcess.emit (events.js:188:13)&#xA;   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)&#xA;   gyp ERR! System Linux 4.4.0-1031-aws&#xA;   gyp ERR! command "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/bin/node" "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64"&#xA;   gyp ERR! cwd /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native&#xA;   gyp ERR! node -v v11.6.0&#xA;   gyp ERR! node-gyp -v v3.8.0&#xA;   gyp ERR! not ok &#xA;   node-pre-gyp ERR! build error &#xA;   node-pre-gyp ERR! stack Error: Failed to execute &#x27;/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/bin/node /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64&#x27; (1)&#xA;   node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/compile.js:83:29)&#xA;   node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:188:13)&#xA;   node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)&#xA;   node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)&#xA;   node-pre-gyp ERR! System Linux 4.4.0-1031-aws&#xA;   node-pre-gyp ERR! command "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/bin/node" "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"&#xA;   node-pre-gyp ERR! cwd /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native&#xA;   node-pre-gyp ERR! node -v v11.6.0&#xA;   node-pre-gyp ERR! node-pre-gyp -v v0.6.39&#xA;   node-pre-gyp ERR! not ok &#xA;   Failed to execute &#x27;/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/bin/node /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64&#x27; (1)&#xA;   gyp: Call to &#x27;sh liblzma-config.sh "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/build" "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/deps/xz-5.2.3.tar.bz2"&#x27; returned exit status 1 while in binding.gyp. while trying to load binding.gyp&#xA;   gyp ERR! configure error &#xA;   gyp ERR! stack Error: `gyp` failed with exit code: 1&#xA;   gyp ERR! stack     at ChildProcess.onCpExit (/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)&#xA;   gyp ERR! stack     at ChildProcess.emit (events.js:188:13)&#xA;   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)&#xA;   gyp ERR! System Linux 4.4.0-1031-aws&#xA;   gyp ERR! command "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/bin/node" "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64"&#xA;   gyp ERR! cwd /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native&#xA;   gyp ERR! node -v v11.6.0&#xA;   gyp ERR! node-gyp -v v3.8.0&#xA;   gyp ERR! not ok &#xA;   npm ERR! code ELIFECYCLE&#xA;   npm ERR! errno 1&#xA;   npm ERR! lzma-native@3.0.8 install: `node-pre-gyp install --fallback-to-build &amp;&amp; node node_modules/rimraf/bin.js build`&#xA;   npm ERR! Exit status 1&#xA;   npm ERR! &#xA;   npm ERR! Failed at the lzma-native@3.0.8 install script.&#xA;   npm ERR! This is probably not a problem with npm. There is likely additional logging output above.&#xA;&#xA;   npm ERR! A complete log of this run can be found in:&#xA;   npm ERR!     /tmp/npmcache.85YKx/_logs/2019-01-13T20_55_48_321Z-debug.log&#xA;</anonymous>

    &#xA;

  • Nodejs couldn't find the ffmpeg module for some reason

    29 décembre 2020, par Chawchawchaw

    I need to display the live streaming vidoe(rtsp) on a website(http, vue framework) with nodejs and vue framework.

    &#xA;

    I've looked it up a lot and got the basic logic of what they are and how it works.&#xA;So I'm planning on to convert rtsp to hls with nodejs using socket.io and display it on a web.(let me know if there's more efficient way way to do it)

    &#xA;

    The thing is, for some reason, when I try to develop it in my backend(nodejs), node just keep sends me an error that FFMpeg module wasn't found. It's been over a week.. please help.

    &#xA;

    Btw, all works with ffmpeg cmd(window powerShell).

    &#xA;

    How I set up(ffmpeg) :

    &#xA;

      &#xA;
    1. downloaded ffmpeg from https://ffmpeg.org/

      &#xA;

    2. &#xA;

    3. added to system path : C :\Users\Marie\Desktop\ffmpeg-4.3.1-2020-11-19-full_build\bin

      &#xA;

    4. &#xA;

    5. tested with window powerShell and converted rstp to m3u8 :

      &#xA;

      ffmpeg -i 'rtsp ://ip.ip.ip/media/video1' -hls_time 3 -hls_wrap 10 'C :\Users\Marie\Desktop\tmp\hls/streaming.m3u8'

      &#xA;

    6. &#xA;

    &#xA;

    below is a screen shot of no. 3 result&#xA;enter image description here

    &#xA;


    &#xA;

    how I set up(nodejs)

    &#xA;

      &#xA;
    1. npm i ffmpeg fluent-ffmpeg rtsp-ffmpeg
    2. &#xA;

    3. I've just copied and pasted the example working code and changed rtsp link to mine. e.g : (https://www.npmjs.com/package/rtsp-ffmpeg)
    4. &#xA;

    &#xA;

    => didn't work out, error says can't find ffmpeg module

    &#xA;

      &#xA;
    1. set up path manually e.g.) ffmpeg.setFfmpegPath(path)
    2. &#xA;

    &#xA;

    => didn't work out. error says can't find ffmpeg module

    &#xA;

    ...&#xA;I've seriously tried almost everything like delete, re-install ffmpeg, changed path, added path manyally, .. Please help....

    &#xA;

    Edited :&#xA;package.json

    &#xA;

    {&#xA;  "name": "streaming",&#xA;  "version": "1.0.0",&#xA;  "description": "",&#xA;  "main": "index.js",&#xA;  "scripts": {&#xA;    "start": "node app.js"&#xA;  },&#xA;  "author": "",&#xA;  "license": "ISC",&#xA;  "dependencies": {&#xA;    "express": "^4.17.1",&#xA;    "ffmpeg": "0.0.4",&#xA;    "fluent-ffmpeg": "^2.1.2",&#xA;    "jsmpeg": "^1.0.0",&#xA;    "node-media-server": "^2.2.4",&#xA;    "node-onvif": "^0.1.7",&#xA;    "node-rtsp-stream": "0.0.9",&#xA;    "rtsp-ffmpeg": "0.0.15",&#xA;    "socket.io": "^3.0.4",&#xA;    "ws": "^7.4.1"&#xA;  }&#xA;}&#xA;

    &#xA;

    app.js

    &#xA;

    const Stream = require(&#x27;node-rtsp-stream&#x27;)&#xA;&#xA;// let path = &#x27;C:/Users/Marie/Desktop/ffmpeg-4.3.1-2020-11-19-full_build/bin/ffmpeg.exe&#x27;&#xA;// let path = &#x27;C:/Users/Marie/Desktop/ffmpeg-4.3.1-2020-11-19-full_build/bin/&#x27;&#xA;let path = &#x27;C:/Users/Marie/Desktop/ffmpeg-4.3.1-2020-11-19-full_build/bin&#x27;&#xA;const ffmpeg = require(&#x27;fluent-ffmpeg&#x27;)&#xA;&#xA;ffmpeg.setFfmpegPath(path)&#xA;&#xA;stream = new Stream({&#xA;  name: &#x27;name&#x27;,&#xA;  streamUrl: &#x27;rtsp://ip.ip.ip.ip/media/video1&#x27;,&#xA;  wsPort: 9999,&#xA;  ffmpegOptions: { // options ffmpeg flags&#xA;    &#x27;-stats&#x27;: &#x27;&#x27;, // an option with no neccessary value uses a blank string&#xA;    &#x27;-r&#x27;: 30 // options with required values specify the value after the key&#xA;  }&#xA;})&#xA;

    &#xA;

    Error : spawn ffmpeg ENOENT

    &#xA;

    app.js (for another test)

    &#xA;

    const app = require( &#x27;express&#x27; )(),&#xA;    server = require( &#x27;http&#x27; ).Server( app ),&#xA;    io = require( &#x27;socket.io&#x27; )( server ),&#xA;    rtsp = require( &#x27;rtsp-ffmpeg&#x27; )&#xA;&#xA;process.env.FFMPEG_PATH = &#x27;C:/Users/Marie/Desktop/ffmpeg-4.3.1-2020-11-19-full_build/bin/ffmpeg.exe&#x27;&#xA;// console.log( rtsp.FFMpeg )&#xA;&#xA;server.listen( 6147 )&#xA;var uri = &#x27;rtsp://ip.ip.ip.ip/media/video1&#x27;,&#xA;    stream = new rtsp.FFMpeg( { input: uri } )&#xA;io.on( &#x27;connection&#x27;, function ( socket )&#xA;{&#xA;    var pipeStream = function ( data )&#xA;    {&#xA;        socket.emit( &#x27;data&#x27;, data.toString( &#x27;base64&#x27; ) )&#xA;    }&#xA;    stream.on( &#x27;data&#x27;, pipeStream )&#xA;    socket.on( &#x27;disconnect&#x27;, function ()&#xA;    {&#xA;        stream.removeListener( &#x27;data&#x27;, pipeStream )&#xA;    } )&#xA;} )&#xA;app.get( &#x27;/&#x27;, function ( req, res )&#xA;{&#xA;    res.sendFile( __dirname &#x2B; &#x27;/index.html&#x27; )&#xA;} )&#xA;

    &#xA;

    error :&#xA;FMpeg executable wasn't found. Install this package and check FFMpeg.cmd property

    &#xA;

    nodejs version = 10.16.3

    &#xA;