Recherche avancée

Médias (91)

Autres articles (60)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

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

  • FFMPEG get stuck when transcoding too many FLAC audios [closed]

    6 juin 2024, par user25436721

    I'm currently using Editly for create some videos from code, but there are some bugs with ffmpeg(latest).

    


    Nothing returns after hours processing(460 audios files during test), I already tried with flac, aac, libshine and libmp3lame encoders, already tried a different a ffmpeg version(static).

    


    From the editly code, I already changed the ffmpeg query, slicing in chunks(75), the results were :

    


      

    • 0, 75 ok
    • 


    • 0, 80 stuck
    • 


    • 75, 150 ok
    • 


    • 150, 225 ok
    • 


    • 225, 300 stuck
    • 


    • 300, 375 ok
    • 


    • 375, 450 ok
    • 


    


    Stuck screen(directly from terminal) :

    


    built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
  configuration: --pkg-config-flags=--static --prefix='~/ffmpeg/dyn' --extra-cflags='-I/~/ffmpeg/dyn/include' --extra-ldflags='-L/~/ffmpegffmpeg/dyn/lib' --bindir='~/ffmpeg/dyn/bin' --enable-debug=3 --enable-vaapi --enable-libvorbis --enable-libvpx --enable-gpl --cpu=native --enable-opengl --enable-libfdk-aac --enable-libx264 --enable-nonfree --enable-libmp3lame --enable-libshine
  libavutil      59. 21.100 / 59. 21.100
  libavcodec     61.  6.100 / 61.  6.100
  libavformat    61.  3.104 / 61.  3.104
  libavdevice    61.  2.100 / 61.  2.100
  libavfilter    10.  2.102 / 10.  2.102
  libswscale      8.  2.100 /  8.  2.100
  libswresample   5.  2.100 /  5.  2.100
  libpostproc    58.  2.100 / 58.  2.100

Input #n..., flac, from 'editly-tmp-.../clip...-audio.flac':
  Metadata:
    encoder         : Lavf61.3.104
  Duration: 00:01:53.62, start: 0.000000, bitrate: 1 kb/s
  Stream #458:0: Audio: flac, 48000 Hz, stereo, s32 (24 bit)
Stream mapping:
  Stream #n1:0 (flac) -> acrossfade
  Stream #n2:0 (flac) -> acrossfade
  Stream #n3:0 (flac) -> acrossfade
  Stream #n...:0 (flac) -> acrossfade
  acrossfade:default -> Stream #0:0 (libshine)
  Press [q] to stop, [?] for help


    


    if I quit then returns :

    


    [fc#0 @] [ao0->#0:0 @] No filtered frames for output stream, trying to initialize anyway.
Output #0, mp3, to 'editly-tmp-.../audio-concat.mp3':
  Metadata:
    TSSE            : Lavf61.3.104
  Stream #0:0: Audio: mp3, 48000 Hz, stereo, s16p, 128 kb/s
      Metadata:
        encoder         : Lavc61.6.100 libshine
[out#0/mp3 @ 0x60633b423480] video:0KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
[out#0/mp3 @ 0x60633b423480] Output file is empty, nothing was encoded(check -ss / -t / -frames parameters if used)
size=       0KiB time=N/A bitrate=N/A speed=N/A    


    


    Editly code for generating FFMPEG query :

    


        let inStream = '[0:a]';
    const filterGraph = clipAudio.slice(0, -1).map(({ transition }, i) => {
      const outStream = `[concat${i}]`;

      const epsilon = 0.0001; // If duration is 0, ffmpeg seems to default to 1 sec instead, hence epsilon.
      let ret = `${inStream}[${i + 1}:a]acrossfade=d=${Math.max(epsilon, transition.duration)}:c1=${transition.audioOutCurve || 'tri'}:c2=${transition.audioInCurve || 'tri'}`;

      inStream = outStream;

      if (i < clipAudio.length - 2) ret += outStream;
      return ret;
    }).join(',');

    const args = [
      ...getFfmpegCommonArgs({ enableFfmpegLog }),
      ...(flatMap(clipAudio, ({ path }) => ['-i', path])),
      '-filter_complex',
      filterGraph,
      '-c', 'flac',
      '-y',
      outPath,
    ];
    await execa(ffmpegPath, args);


    


    FFMPEG query structure :

    


    ffmpeg -i /editly-tmp-.../clip000-audio.flac -i /editly-tmp-.../clip226-audio.flac -i ... -filter_complex [0:a][1:a]acrossfade=d=1:c1=tri:c2=tri[concat0],[concat0][2:a]acrossfade=d=0.425:c1=tri:c2=tri[concat1],[concat1][3:a]acrossfade=d=0.425:c1=tri:c2=tri[concat2],... -c flac -y /editly-tmp-.../audio-concat-3.mp3


    


    My hardware :

    


    Ubuntu 24.04 LTS
AMD Ryzen™ 5 5600G
Only 8gb(the other slot is broken)
AMD Radeon™ RX 580 2048SP


    


    Sorry my poor english :P

    


    Change Codecs, FFMPEG version, node version, slice the files in chunks, change SO(worked in Windows).

    


  • avcodec/bitpacked_dec : optimize bitpacked_decode_yuv422p10

    5 mai 2023, par Devin Heitmueller
    avcodec/bitpacked_dec : optimize bitpacked_decode_yuv422p10
    

    Rework the code a bit to speed up the 10-bit bitpacked decoding
    routine. This is probably about as fast as I can get it without
    switching to assembly language.

    Demonstratable with :

    ./ffmpeg -f lavfi -i "smptehdbars=size=3840x2160" -c bitpacked -f image2 -frames:v 1 source.yuv
    ./ffmpeg -f bitpacked -pix_fmt yuv422p10le -s 3840x2160 -c:v bitpacked -i source.yuv -pix_fmt yuv422p10le out.yuv

    On my development system, it went from 80ms for a 2160p frame
    down to 20ms (i.e. a 4X speedup). Good enough for now, I hope...

    Comments from Marton :

    Originally on my system better performance could be achieved by simply
    switching to the cached bitstream reader, but for Devin it was slower than
    his direct byte operations.

    I changed the order of writing output from u/y/v/y to u/v/y/y, and that made
    the code faster than the cached bitstream reader on my system as well.

    TIMER measurement of the decode loop on Ryzen 5 3600 with command line :

    ./ffmpeg -stream_loop 256 -threads 1 -f bitpacked -pix_fmt yuv422p10le -s 3840x2160 -c:v bitpacked -i source.yuv -pix_fmt yuv422p10le -f null none -loglevel error

    Before : 823204127 decicycles in YUV, 256 runs, 0 skips
    After : 315070524 decicycles in YUV, 256 runs, 0 skips

    Signed-off-by : Devin Heitmueller <dheitmueller@ltnglobal.com>
    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] libavcodec/bitpacked_dec.c
  • ffmpeg opencl filters with nvenc encoding [closed]

    3 décembre 2023, par David Hajes

    I am trying to denoise HD video with GPU acceleration :

    &#xA;

    ffmpeg.exe -init_hw_device opencl=gpu:0.0 -filter_hw_device gpu -i $FileBrowser.FileName -vf "hwupload, nlmeans_opencl=5:7:5:3:3, hwdownload, format=yuv420p" -c:v libx265 -c:a copy -crf 20 $f_output

    &#xA;

    filtering is fast, but encode is slowed down by CPU Ryzen 9 5950X @ 4GHz + RTX 3060 Ti 1.8x

    &#xA;

    I can also fast encode with cuda nvenc 5x on above by mentioned GPU without filtering

    &#xA;

    ffmpeg.exe -hwaccel nvdec -init_hw_device cuda=cuda:0 -hwaccel_output_format cuda -i $FileBrowser.FileName -c:v hevc_nvenc -preset slow -tune hq -rc vbr_hq -b:v 6M -maxrate:v 12M -c:a copy -crf 20 $f_output

    &#xA;

    Is there a way to combine opencl filtering & cuda encode on same GPU, please ?

    &#xA;

    I tried to combine both together, but there is filter format=yuv420p error

    &#xA;