Recherche avancée

Médias (0)

Mot : - Tags -/upload

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (93)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

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

Sur d’autres sites (5810)

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

  • C# FFmpeg Command Prompt | Weird Result

    16 février 2018, par sword1st

    I have really weird problem with ffmpeg when it’s running with process in C#. Here is my code for video splitting :

           private void splitVideo()
       {
           Label.CheckForIllegalCrossThreadCalls = false;
           vlcControl1.Stop();
           label1.Text = "Process Started!";

           for (int i = 0; i &lt; listBox2.Items.Count; i++)
           {


               string first = listBox2.Items[i].ToString().Split('-').First();
               string last = listBox2.Items[i].ToString().Split('-').Last();

               Directory.CreateDirectory(paths[listBox1.SelectedIndex].ToString() + "\\tempSplitFolder");


               string parameter2 = "-i " + paths[listBox1.SelectedIndex].ToString() + "\\" + "clip.mp4" + " -ss " + first + " -to " + last + " -async 1 " + "-c copy "
                   + paths[listBox1.SelectedIndex].ToString() + "\\tempSplitFolder\\" + i + ".mp4";

               Control.CheckForIllegalCrossThreadCalls = false;
               process1.StartInfo.UseShellExecute = false;
               process1.StartInfo.RedirectStandardOutput = true;
               process1.StartInfo.FileName = "ffmpeg";
               process1.StartInfo.Arguments = parameter2;
               process1.StartInfo.RedirectStandardError = true;
               process1.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
               process1.StartInfo.CreateNoWindow = true;
               process1.Start();


               ffreader = process1.StandardError;
               label1.Text = ffreader.ReadLine();

               while (!process1.HasExited)
               {
                   label1.Text = ffreader.ReadLine();
               }

           }

    But all output videos 262 bayt sized and corrupted. I can’t play that clips. When i remove "-c copy" part from my parameter2 variable it’s fine. But i don’t wanna re-encode videos cuz it’s time consuming. I can use this code with "-c copy" on ffmpeg there is no problem with the code. But why it’s acting weird and giving me corrupted videos i have no idea. Here my parameter2 variable in debug mode :

    -i D:\TestMainFolder\TestFolder\clip.mp4 -ss 00:22:00 -to 00:22:20 -async 1 -c copy D:\TestMainFolder\TestFolder\tempSplitFolder\0.mp4

    If i run this command manually with ffmpeg -i D :\etcetcetc.. it’s working. I’m really lost i need fresh eyes guys. Thanks a lot ! :)

  • FFMPEG - cut video result in longer cut

    27 octobre 2023, par Pier Giorgio Misley

    I'm trying to cut the last 8 seconds of a video I got ; the problem is that ffmpeg is picking the last 10 seconds instead and I don't really know why. I checked and there is no offset between "0:00:00" and the effective start of the video, so why should it take more seconds ?

    &#xA;

    this is my code :

    &#xA;

    ffmpeg.exe -ss 00:01:02 -i "F:\temp\input.mp4" -c copy -t 00:00:08 "D:\temp\1_output.mp4"&#xA;

    &#xA;

    this is the output :

    &#xA;

    &#xA;

    ffmpeg version N-90893-gcae6f806a6 Copyright (c) 2000-2018 the FFmpeg

    &#xA;

    developers built with gcc 7.3.0 (GCC) configuration : —enable-gpl

    &#xA;

    —enable-version3 —enable-sdl2 —enable-bzlib —enable-fontconfig —enable-gnutls —enable-iconv —enable-libass —enable-libbluray —enable-libfreetype —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-libopus —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libtheora —enable-libtwolame —enable-libvpx —enable-libwavpack —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxml2 —enable-libzimg —enable-lzma —enable-zlib —enable-gmp —enable-libvidstab —enable-libvorbis —enable-libvo-amrwbenc —enable-libmysofa —enable-libspeex —enable-libxvid —enable-libaom —enable-libmfx —enable-amf —enable-ffnvcodec —enable-cuvid —enable-d3d11va —enable-nvenc —enable-nvdec —enable-dxva2 —enable-avisynth libavutil 56. 17.100 / 56. 17.100 libavcodec 58. 19.100 / 58. 19.100 libavformat 58. 13.100 / 58. 13.100 libavdevice 58. 4.100 /

    &#xA;

      &#xA;
    1. 4.100 libavfilter 7. 21.100 / 7. 21.100 libswscale 5. 2.100 / 5. 2.100 libswresample 3. 2.100 / 3. 2.100 libpostproc 55. 2.100 / 55. 2.100 Input #0,
    2. &#xA;

    &#xA;

    mov,mp4,m4a,3gp,3g2,mj2, from 'F :\temp\input.mp4' : Metadata :

    &#xA;

    major_brand : isom

    &#xA;

    minor_version : 512

    &#xA;

    compatible_brands : isomiso2avc1mp41

    &#xA;

    encoder : Lavf58.13.100 Duration : 00:01:10.34, start : 0.000000, bitrate : 14542 kb/s

    &#xA;

    Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 576x1024, 14346 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)

    &#xA;

    Metadata :

    &#xA;

    handler_name : VideoHandler

    &#xA;

    Stream #0:1(und) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 193 kb/s (default)

    &#xA;

    Metadata :

    &#xA;

    handler_name : SoundHandler Output #0, mp4, to 'D :\temp\1_output.mp4' : Metadata :

    &#xA;

    major_brand : isom

    &#xA;

    minor_version : 512

    &#xA;

    compatible_brands : isomiso2avc1mp41

    &#xA;

    encoder : Lavf58.13.100

    &#xA;

    Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 576x1024, q=2-31, 14346 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc

    &#xA;

    (default)

    &#xA;

    Metadata :

    &#xA;

    handler_name : VideoHandler Stream #0:1(und) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 193 kb/s (default)

    &#xA;

    Metadata :

    &#xA;

    handler_name : SoundHandler Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 252

    &#xA;

    fps=0.0 q=-1.0 Lsize= 3089kB time=00:00:07.99 bitrate=3164.7kbits/s

    &#xA;

    speed=1e+003x video:2841kB audio:240kB subtitle:0kB other

    &#xA;

    streams:0kB global headers:0kB muxing overhead : 0.283155%

    &#xA;

    &#xA;

    I don't really understand what i'm doing wrong

    &#xA;

    Thanks

    &#xA;