Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (86)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (14753)

  • extract subtitle from video ffmpeg. Unrecognized option 'subs.srt'

    2 juillet 2019, par evgeni fotia
       // file.path can be like this folder1/folder2/.../folderN/filename
       let filename = file.path.split('.').slice(0, file.path.split('.').lenght-1).join('.')
       filename = filename.split('/').pop()
       var result = ffmpeg({
         MEMFS: [{name: file.path, data: buffer}],
         arguments: ["-i", file.path, "-map", "0:s:0", filename + "-subs.srt"],
         // Ignore stdin read requests.
         stdin: function() {},
       });
       // Write out.webm to disk.
       var out = result.MEMFS[0];
       fs.outputFile(pathname + '/' + out.name, Buffer(out.data), 'binary');

    I get the following

    ffmpeg version n3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
     built with emcc (Emscripten gcc/clang-like replacement) 1.36.7 ()
     configuration: --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=png --enable-decoder=mjpeg --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable-decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegps --enable-demuxer=image2 --enable-demuxer=mp3 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --enable-filter=overlay --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disable-zlib --enable-encoder=libvpx_vp8 --enable-encoder=libopus --enable-encoder=mjpeg --enable-muxer=webm --enable-muxer=ogg --enable-muxer=null --enable-muxer=image2 --enable-filter=subtitles --enable-libass --enable-libopus --enable-libvpx --extra-cflags=-I../libvpx/dist/include --extra-ldflags=-L../libvpx/dist/lib
     libavutil      55. 28.100 / 55. 28.100
     libavcodec     57. 48.101 / 57. 48.101
     libavformat    57. 41.100 / 57. 41.100
     libavfilter     6. 47.100 /  6. 47.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
    Unrecognized option 'subs.srt'.
    Error splitting the argument list: Option not found
  • How to get the correct result file data if I use Web Worker on ffmpeg.js ?

    23 avril 2019, par SuperBerry

    I have tried to use FFMPEG.js (https://github.com/Kagami/ffmpeg.js) to convert mp3 files on the browser/client side, and I followed the usage of the page of Web Worker. However, the worker works well on the converting and it seems the file has been converted, but I cannot get the correct result file data back.

    Here my code is :

    <code class="echappe-js">&lt;script&gt;<br />
    <br />
    var stdout = &quot;&quot;;<br />
    var outputhtml=&quot;&quot;;<br />
    var stderr = &quot;&quot;;<br />
    var outputfile;<br />
    <br />
    var sampleVideoData;<br />
    <br />
    function retrieveSampleVideo() {<br />
     var oReq = new XMLHttpRequest();<br />
     oReq.open(&quot;GET&quot;, &quot;short.mp3&quot;, true);<br />
     oReq.responseType = &quot;arraybuffer&quot;;<br />
    <br />
     oReq.onload = function (oEvent) {<br />
       var arrayBuffer = oReq.response;<br />
       if (arrayBuffer) {<br />
         sampleVideoData = new Uint8Array(arrayBuffer);<br />
       }<br />
     };<br />
    <br />
     oReq.send(null);<br />
    }<br />
    <br />
    function getDownloadLink(fileData, fileName) {<br />
     var a = document.createElement('a');<br />
     a.download = fileName;<br />
     var blob = new Blob([fileData]);<br />
     var src = window.URL.createObjectURL(blob);<br />
     a.href = src;<br />
     a.textContent = 'Click here to download ' + fileName + &quot;!&quot;;<br />
     document.body.appendChild(a);<br />
    }<br />
    <br />
    var worker = new Worker(&quot;ffmpeg-worker-mp4.js&quot;);<br />
    <br />
    retrieveSampleVideo();<br />
    <br />
    var memfs =[];  <br />
    <br />
    //[, {name: &quot;input.mp3&quot;, data: output}];<br />
    <br />
    worker.onmessage = function(e) {<br />
     var msg = e.data;<br />
    <br />
     switch (msg.type) {<br />
     case &quot;ready&quot;:<br />
       console.log(&quot;ready: &quot; + msg.data);<br />
       alert(sampleVideoData.length);<br />
       memfs.push({name: &quot;input.mp3&quot;, data: sampleVideoData});<br />
       memfs.push({name: &quot;output.mp3&quot;, data: outputfile});<br />
    <br />
       worker.postMessage({type: &quot;run&quot;, MEMFS: memfs, arguments: [&quot;-i&quot;, &quot;input.mp3&quot;, &quot;-y&quot;, &quot;output.mp3&quot;]});<br />
    <br />
    <br />
       break;<br />
     case &quot;stdout&quot;:<br />
       console.log(&quot;stdout: &quot; + msg.data);<br />
       stdout += msg.data + &quot;\n&quot;;<br />
       outputhtml+=msg.data + &quot;&lt;br&gt;&quot;;<br />
    <br />
       break;<br />
     case &quot;stderr&quot;:<br />
       console.log(&quot;stderr: &quot; + msg.data);<br />
       stderr += msg.data + &quot;\n&quot;;<br />
       outputhtml+=msg.data + &quot;&lt;br&gt;&quot;;<br />
    <br />
       break;<br />
    <br />
     case &quot;exit&quot;:<br />
    <br />
       console.log(&quot;Process exited with code &quot; + msg.data);<br />
       console.log(stdout);<br />
       document.write(outputhtml);<br />
    <br />
       getDownloadLink(outputfile, &quot;output.mp3&quot;);<br />
       worker.terminate();<br />
    <br />
    <br />
       break;<br />
     }<br />
    };<br />
    <br />
       &lt;/script&gt;

    And the console output looks good :

    stderr: ffmpeg version n3.1.2 Copyright (c) 2000-2016 the FFmpeg developers index.html:66:4
    stderr:   built with emcc (Emscripten gcc/clang-like replacement) 1.36.7 () index.html:66:4
    stderr:   configuration: --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=png --enable-decoder=mjpeg --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable-decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegps --enable-demuxer=image2 --enable-demuxer=mp3 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --enable-filter=overlay --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disable-zlib --enable-encoder=libx264 --enable-encoder=libmp3lame --enable-encoder=aac --enable-muxer=mp4 --enable-muxer=mp3 --enable-muxer=null --enable-gpl --enable-libmp3lame --enable-libx264 --extra-cflags=-I../lame/dist/include --extra-ldflags=-L../lame/dist/lib index.html:66:4
    stderr:   libavutil      55. 28.100 / 55. 28.100 index.html:66:4
    stderr:   libavcodec     57. 48.101 / 57. 48.101 index.html:66:4
    stderr:   libavformat    57. 41.100 / 57. 41.100 index.html:66:4
    stderr:   libavfilter     6. 47.100 /  6. 47.100 index.html:66:4
    stderr:   libswscale      4.  1.100 /  4.  1.100 index.html:66:4
    stderr:   libswresample   2.  1.100 /  2.  1.100 index.html:66:4
    stderr: [mp3 @ 0x812380] Warning: not compiled with thread support, using thread emulation index.html:66:4
    stderr: Input #0, mp3, from 'input.mp3': index.html:66:4
    stderr:   Metadata: index.html:66:4
    stderr:     encoder         : Lavf57.66.101 index.html:66:4
    stderr:   Duration: 00:00:03.02, start: 0.023021, bitrate: 128 kb/s index.html:66:4
    stderr:     Stream #0:0: Audio: mp3, 48000 Hz, stereo, s16p, 128 kb/s index.html:66:4
    stderr:     Metadata: index.html:66:4
    stderr:       encoder         : Lavc57.75 index.html:66:4
    stderr: [mp3 @ 0x8240f0] Warning: not compiled with thread support, using thread emulation index.html:66:4
    stderr: [libmp3lame @ 0x81b8a0] Warning: not compiled with thread support, using thread emulation index.html:66:4
    stderr: [mp3 @ 0x80b0f0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead. index.html:66:4
    stderr: Output #0, mp3, to 'output.mp3': index.html:66:4
    stderr:   Metadata: index.html:66:4
    stderr:     TSSE            : Lavf57.41.100 index.html:66:4
    stderr:     Stream #0:0: Audio: mp3 (libmp3lame), 48000 Hz, stereo, s16p index.html:66:4
    stderr:     Metadata: index.html:66:4
    stderr:       encoder         : Lavc57.48.101 libmp3lame index.html:66:4
    stderr: Stream mapping: index.html:66:4
    stderr:   Stream #0:0 -> #0:0 (mp3 (native) -> mp3 (libmp3lame)) index.html:66:4
    stderr: Press [q] to stop, [?] for help index.html:66:4
    stderr: size=      47kB time=00:00:03.00 bitrate= 129.6kbits/s speed=10.9x    index.html:66:4
    stderr: video:0kB audio:47kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.489831% index.html:66:4
    Process exited with code 0

    I have set the output into the memfs in the code :

    memfs.push(name : "output.mp3", data : outputfile) ;

    But I cannot get the result file data in outputfile to create the blob downloadd link.

  • SDL2.0 Alternative for SDL_Overlay

    19 juin 2019, par Josh

    So I’ve been trying to go through the following tutorial on ffmpeg : http://dranger.com/ffmpeg/tutorial02.html

    However, when I try to compile using gcc, I get the following output :

    root:/Users/mbrodeur/Downloads/HACKATHON CONTENT/Tutorials-> gcc -o tutorial02 tutorial02.c -lavutil -lavformat -lavcodec -lz -lavutil -lm -lswscale -D_THREAD_SAFE -lSDL2
    tutorial02.c: In function ‘main’:
    tutorial02.c:41: error: ‘SDL_Overlay’ undeclared (first use in this function)
    tutorial02.c:41: error: (Each undeclared identifier is reported only once
    tutorial02.c:41: error: for each function it appears in.)
    tutorial02.c:41: error: ‘bmp’ undeclared (first use in this function)
    tutorial02.c:98: warning: assignment makes pointer from integer without a cast
    tutorial02.c:110: error: ‘SDL_YV12_OVERLAY’ undeclared (first use in this function)

    Now, I read that SDL_Overlay is no longer used in SDL2, so therein lies the problem. I’ve been poking around, but can’t seem to find anything helpful. Is there a replacement for SDL_Overlay ? Is it necessary ?

    SDL_Overlay is used in the following context :

    SDL_Overlay     *bmp;
    bmp = SDL_CreateYUVOverlay(pCodecCtx->width, pCodecCtx->height,
                          SDL_YV12_OVERLAY, screen);