Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (39)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (8595)

  • Error compiling FFMPEG / libav code after adding avfilter

    9 mai 2020, par Daniel Kobe

    My encoding and decoding was working fine using ffmpeg and libav, but then I added a filter in the encoding step to rotate my video and it no longer works in my docker machine, BUT it does work locally.

    



    The error message when compiling in docker is

    



    //usr/local/lib/libavfilter.a(vf_pp.o): In function `pp_init':
/var/tmp/ffmpeg/libavfilter/vf_pp.c:56: undefined reference to `pp_get_mode_by_name_and_quality'
//usr/local/lib/libavfilter.a(vf_pp.o): In function `pp_uninit':
/var/tmp/ffmpeg/libavfilter/vf_pp.c:161: undefined reference to `pp_free_mode'
/var/tmp/ffmpeg/libavfilter/vf_pp.c:163: undefined reference to `pp_free_context'
//usr/local/lib/libavfilter.a(vf_pp.o): In function `pp_filter_frame':
/var/tmp/ffmpeg/libavfilter/vf_pp.c:142: undefined reference to `pp_postprocess'
//usr/local/lib/libavfilter.a(vf_pp.o): In function `pp_config_props':
/var/tmp/ffmpeg/libavfilter/vf_pp.c:115: undefined reference to `pp_get_context'
collect2: error: ld returned 1 exit status


    



    These are my relevant configurations in docker file

    



    # Install libx264 for video encoding.
RUN cd /var/tmp && curl -L http://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20190103-2245-stable.tar.bz2 > x264.tar.bz2 && \
    echo "21cb6e2bb660f863713fb9f752654c65191e032dac1329ec113786c69f0f75c1  x264.tar.bz2" > x264.sha256sum && \
    shasum -a 256 -c x264.sha256sum && \
    tar xjf x264.tar.bz2 && \
    cd x264-snapshot-20190103-2245-stable && \
    ./configure \
        --enable-static \
        --enable-pic \
        --disable-cli \
        --disable-avs \
        --disable-opencl && \
    make -j8 && \
    make install-lib-static

# Compile ffmpeg.
COPY ffmpeg.tar /var/tmp/ffmpeg.tar
RUN cd /var/tmp && tar xf ffmpeg.tar && \
    cd ffmpeg && \
    ./configure \
        --cc=/usr/bin/clang-6.0 \
        --cxx=/usr/bin/clang++-6.0 \
        --extra-libs="-lpthread" \
        --enable-gpl \
        # without pic - opencv will throw up errors
        --enable-pic \
        --enable-libx264 \
        --disable-network && \
     make -j 8 && \
     make install


    



    Not sure this is relevant but here are my flags

    



    LDFLAGS: -lavcodec -lavfilter -lswscale -lavutil -lswresample -lx264 -lm -lz


    



    Here's my local ffmpeg configuration and version

    



    ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100


    



    Here's the output from my docker machine

    



    ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with clang version 6.0.0-1~bpo9+1 (tags/RELEASE_600/final)
  configuration: --cc=/usr/bin/clang-6.0 --cxx=/usr/bin/clang++-6.0 --extra-libs=-lpthread --enable-gpl --enable-pic --enable-libx264 --disable-network
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100


    



    How can I get my configuration fixed so it works like in local ? I didn't specifically configure my local environment so it's going to be using default configuration.

    


  • FFmpeg/MP4 - Force all existing frames to play at fixed frame rate

    16 mai 2020, par MJoseph

    I have an MP4 video file that I suspect is corrupt, in that mediainfo reports a variable frame rate, but I believe the frames present are meant to be played at a fixed frame rate. This discrepancy causes video stuttering. Is there any way to force an MP4 container (by editing header info, or frame timing tables) to simply play back all existing frames at a fixed frame rate (i.e. 24fps). Every tip I've read assumes you want to drop and/or add frames to achieve a new frame rate, while keeping all the old frame timings (i.e. ffmpeg -r or ffmpeg -filter). These methods end up preserving the stutter and altering the size of the file. I would like to throw out the frame timings, but keep all frames, and just play them back at a constant rate. Is this possible ?

    


  • Nodejs : I want to use url as source of ffmpeg

    8 mars 2021, par user10204688

    I want to use url as source of ffmpeg. url is like https://192.168.1.103:6666/stream.mjpg.
I checked ffmpeg working on MacOS shell

    



    ffmpeg  -f mjpeg -y -use_wallclock_as_timestamps 1 -i 'http://192.168.1.103:6535/stream.mjpg' -r 5 -reconnect 1 -loglevel 16 -c:v copy -an -qscale 10 '2.mp4'


    



    But I want it to use in nodejs. So make it automatic. However it doesn't work when I put url in ffmpeg object as init.

    



    var ffmpeg = new ffmpeg(url)


    



    So this is my code

    



    const imagePath = "http://192.168.1.103:6535/stream.mjpg"

 function mjpegVideoRecoder () {
     try {
         var process = new ffmpeg({source: imagePath})
         console.log("te");
         process
           .inputFormat('mjpeg')
           .outputOptions([
             '-y',
             '-r 25',
             '-c:v copy',
             '-an',
             '-qscale 10',
           ])
           .ouput('testtest.avi')
           .seek(30)
      } catch {
         console.log("errpr")
     }
  }
  mjpegVideoRecoder()*/


    



    and I tried this

    



      1 var spawn = require('child_process').spawn
  2 var request = require('request')
  3 var args = "-f mjpeg -y -use_wallclock_as_timestamps 1 -i 'http://192.168.1.103:6535/stream.mjpg' -r 5 -reconne    ct 1 -loglevel 16 -c:v copy -an -qscale 10 '3.mp4'"
  4 var ffmpeg = require('fluent-ffmpeg')
  5 var encoder = spawn('ffmpeg', args.split(' '));
  6 encoder.stderr.pipe(process.stdout);
  7
  8 var interval = function(){
  9     request('http://192.168.1.103:6535/stream.mjpg',function(er){
 10         if(er){console.log(er)}
 11         setTimeout(function(){interval()},1000)
 12     }).pipe(encoder.stdin,{end:false})
 13 }
 14 interval();


    



    But it also failed

    



    this is error msg

    



    'http://192.168.1.103:6535/stream.mjpg': No such file or directory
internal/streams/legacy.js:61
      throw er; // Unhandled stream error in pipe.
      ^

Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}


    



    How can I handle it. plz help me.