Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (37)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

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

Sur d’autres sites (3008)

  • IIS Worker Process memory keeps increasing while asp.net run ffmpag process

    27 mars 2016, par cheinan

    I am running this code every 4 second

    protected string output = string.Empty;
    protected Process process;
    protected StreamReader sr;

    protected void Page_Load(object sender, EventArgs e)
    {
       process = new Process();
       process.StartInfo.Arguments = "-an -flv_metadata 1 -analyzeduration 1 -i \"rtmp://localhost/test/testStream live=1\" -s 700*394 -r 5 -vframes 10 -f image2pipe -";
       process.StartInfo.FileName = Page.MapPath("ffmpeg.exe");
       process.StartInfo.UseShellExecute = false;
       process.StartInfo.RedirectStandardOutput = true;
       process.StartInfo.CreateNoWindow = true;
       process.EnableRaisingEvents = true;
       process.Start();

       sr = process.StandardOutput;
       output = sr.ReadToEnd();
       process.WaitForExit();

       if (output.Length > 200)
       {
           process.Close();
           if (process != null)
           {
               process.Dispose();
               if (process != null)
               {
                   try { process.Kill(); }
                   catch { }
                   process = null;
               }
           }
       }
    }

    I using asp.net c# to run a FFmpeg process in order to get image data
    from rtmp stream
    the code is working fine but the problem is
    IIS Worker Process memory keeps increasing.

    I tried to use the using statement
    and :
    Close,
    Dispose,
    Kill,
    process = null
    but nothing help

    How I can stop this memory from increasing ?
    Is there a better way to control IIS Worker Process memory
    from asp.net c# code ?

  • Revision 783107fd45 : Merge "silence unused parm warning for worker thread in loop filter"

    30 juin 2014, par Jim Bankoski

    Merge "silence unused parm warning for worker thread in loop filter"

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