Recherche avancée

Médias (91)

Autres articles (51)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (6572)

  • avutil/common : Move everything inside inclusion guards

    4 février 2021, par Andreas Rheinhardt
    avutil/common : Move everything inside inclusion guards
    

    libavutil/common.h is a public header that provides generic math
    functions whereas libavutil/intmath.h is a private header that contains
    plattform-specific optimized versions of said math functions. common.h
    includes intmath.h (when building the FFmpeg libraries) so that the
    optimized versions are used for them.

    This interdependency sometimes causes trouble : intmath.h once contained
    an inlined ff_sqrt function that relied upon av_log2_16bit. In case there
    was no optimized logarithm available on this plattform, intmath.h needed
    to include common.h to get the generic implementation and this has been
    done after the optimized versions (if any) have been provided so that
    common.h used the optimized versions ; it also needed to be done before
    ff_sqrt. Yet when intmath.h was included from common.h and if an ordinary
    inclusion guard was used by common.h, the #include "common.h" in intmath.h
    was a no-op and therefore av_log2_16bit was still unknown at the end of
    intmath.h (and also in ff_sqrt) if no optimized version was available.

    Before a955b5965825631986ba854d007d4e934e466c7d this was solved by
    duplicating the #ifndef av_log2_16bit check after the inclusion of
    common.h in intmath.h ; said commit instead moved these checks to the
    end of common.h, outside the inclusion guards and made common.h include
    itself to get these unguarded defines. This is still the current
    state of affairs.

    Yet this is unnecessary since 9734b8ba56d05e970c353dfd5baafa43fdb08024
    as said commit removed ff_sqrt as well as the #include "common.h" from
    intmath.h. Therefore this commit moves everything inside the inclusion
    guards and makes common.h not include itself.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavutil/common.h
  • 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;

  • Unable to find a suitable output format for ' -framerate 5' -framerate 5 : Invalid argument

    7 décembre 2020, par Rashmi N

    I am trying to create .ts files from a set of images. My ffmpeg command is

    &#xA;

     [/usr/bin/ffmpeg,  -framerate 5,  -re -f image2pipe ,  -i - ,  -pix_fmt yuv420p ,  -preset veryfast ,  -c:v libx264 ,  -profile:v main ,  -crf 20 ,  -sc_threshold 0 ,  -g 48 ,  -keyint_min 48 ,  -hls_time 5 ,  -hls_list_size 0 ,  -hls_flags append_list&#x2B;omit_endlist&#x2B;round_durations ,  -b 800k ,  -maxrate 1100k ,  -bufsize 2200k , /home/rashmi/Music/output.m3u8]&#xA;

    &#xA;

    Im calling this from a java function

    &#xA;

    List<string> command = new ArrayList&lt;>();&#xA;            command.add(PATH);&#xA;            command.add(" -framerate " &#x2B; streamInput.getVideoFPS());&#xA;            command.add(" -re -f image2pipe ");&#xA;            command.add(" -i - ");&#xA;            command.add(" -pix_fmt yuv420p ");&#xA;            command.add(" -preset veryfast ");&#xA;            command.add(" -c:v libx264 ");&#xA;            command.add(" -profile:v main ");&#xA;            command.add(" -crf 20 ");&#xA;            command.add(" -sc_threshold 0 ");&#xA;            command.add(" -g 48 ");&#xA;            command.add(" -keyint_min 48 ");&#xA;            command.add(" -hls_time " &#x2B; streamInput.getSegmentLength() &#x2B; " ");&#xA;            command.add(" -hls_list_size 0 ");&#xA;            command.add(" -hls_flags append_list&#x2B;omit_endlist&#x2B;round_durations ");&#xA;            command.add(" -b 800k ");&#xA;            command.add(" -maxrate 1100k ");&#xA;            command.add(" -bufsize 2200k ");&#xA;            command.add(streamInput.getManifestFilePath());&#xA;&#xA;&#xA;            System.out.println("FFMPEG COMMAND:\n"&#x2B; command.toString());&#xA;            ProcessBuilder pb = new ProcessBuilder(command);&#xA;            pb.redirectInput(ProcessBuilder.Redirect.PIPE);&#xA;            pb.directory(Paths.get(streamInput.getFolderPath()).toFile());&#xA;            Process ffmpegProcess = pb.inheritIO().start();&#xA;&#xA;            OutputStream ffmpegInput = ffmpegProcess.getOutputStream();&#xA;&#xA;&#xA;&#xA;            for(File frame: frames){&#xA;//                System.out.println(frame.getAbsolutePath());&#xA;&#xA;                byte[] image;&#xA;                image = new byte[(int)frame.length()];&#xA;&#xA;                FileInputStream fileInputStream = new FileInputStream(frame);&#xA;                fileInputStream.read(image);&#xA;                ImageInputStream iis = ImageIO.createImageInputStream(&#xA;                        new ByteArrayInputStream(image));&#xA;                BufferedImage img = ImageIO.read(iis);&#xA;                ImageIO.write(img, "PNG", ffmpegInput);&#xA;&#xA;&#xA;&#xA;            }&#xA;</string>

    &#xA;

    I am getting

    &#xA;

    [/usr/bin/ffmpeg,  -framerate 5,  -re -f image2pipe ,  -i - ,  -pix_fmt yuv420p ,  -preset veryfast ,  -c:v libx264 ,  -profile:v main ,  -crf 20 ,  -sc_threshold 0 ,  -g 48 ,  -keyint_min 48 ,  -hls_time 5 ,  -hls_list_size 0 ,  -hls_flags append_list&#x2B;omit_endlist&#x2B;round_durations ,  -b 800k ,  -maxrate 1100k ,  -bufsize 2200k , /home/rashmi/Music/output.m3u8]&#xA;ffmpeg version 4.3-2~18.04.york0 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)&#xA;  configuration: --prefix=/usr --extra-version=&#x27;2~18.04.york0&#x27; --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 51.100 / 56. 51.100&#xA;  libavcodec     58. 91.100 / 58. 91.100&#xA;  libavformat    58. 45.100 / 58. 45.100&#xA;  libavdevice    58. 10.100 / 58. 10.100&#xA;  libavfilter     7. 85.100 /  7. 85.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  7.100 /  5.  7.100&#xA;  libswresample   3.  7.100 /  3.  7.100&#xA;  libpostproc    55.  7.100 / 55.  7.100&#xA;[NULL @ 0x55a3c18a3e40] Unable to find a suitable output format for &#x27; -framerate 5&#x27;&#xA; -framerate 5: Invalid argument&#xA;javax.imageio.IIOException: I/O error writing PNG file!&#xA;    at java.desktop/com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1277)&#xA;    at java.desktop/javax.imageio.ImageWriter.write(ImageWriter.java:613)&#xA;    at java.desktop/javax.imageio.ImageIO.doWrite(ImageIO.java:1628)&#xA;    at java.desktop/javax.imageio.ImageIO.write(ImageIO.java:1594)&#xA;    at com.streaming.hls.utils.StreamSegmentGenerator.buildStreamSegmet(StreamSegmentGenerator.java:81)&#xA;    at com.streaming.hls.utils.StreamSegmentGenerator.main(StreamSegmentGenerator.java:110)&#xA;Caused by: java.io.IOException: Stream closed&#xA;    at java.base/java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:442)&#xA;    at java.base/java.io.OutputStream.write(OutputStream.java:162)&#xA;    at java.desktop/javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:255)&#xA;    at java.desktop/com.sun.imageio.plugins.png.ChunkStream.finish(PNGImageWriter.java:142)&#xA;    at java.desktop/com.sun.imageio.plugins.png.PNGImageWriter.write_IHDR(PNGImageWriter.java:487)&#xA;    at java.desktop/com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1244)&#xA;    ... 5 more&#xA;

    &#xA;

    I tried replacing -framerate with -r, that also threw the same error. But when I run the command directly in the terminal its working. I am not sure what is wrong.&#xA;[NULL @ 0x55a3c18a3e40] Unable to find a suitable output format for ' -framerate 5'&#xA;-framerate 5 : Invalid argument

    &#xA;