Recherche avancée

Médias (0)

Mot : - Tags -/formulaire

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

Autres articles (58)

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

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (8513)

  • Process is not exiting ffmpeg.exe only for the command which detects the silences from a video

    20 juillet 2015, par Jitender Kumar

    The job of the method ExecuteCommandSync is to detect the silences from a video and return the output as string but when I run this code it never bring the value of proc.HasExited as true. If I forcefully drag the debugger to the line

    result =proc.StandardOutput.ReadToEnd()

    then it never exit the ffmpeg.exe so as a result control never returns back.

    Although the same method is working fine for a different command like creating an audio file from a video. In this case proc.HasExited also returns false but it also generates the audio file successfully.

    public static string ExecuteCommandSync(string fileName, int timeoutMilliseconds)
       {
           string result = String.Empty;
           string workingDirectory = Directory.GetCurrentDirectory();
           try
           {
               string command = string.Format("ffmpeg -i {0} -af silencedetect=noise=-20dB:d=0.2 -f null -", "\"" + fileName + "\"");                
               System.Diagnostics.ProcessStartInfo procStartInfo =
                   new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);

               procStartInfo.WorkingDirectory = workingDirectory;                
               procStartInfo.RedirectStandardOutput = true;
               procStartInfo.RedirectStandardError = true;
               procStartInfo.UseShellExecute = false;                
               procStartInfo.CreateNoWindow = false;                
               System.Diagnostics.Process proc = new System.Diagnostics.Process();
               proc.StartInfo = procStartInfo;
               proc.Start();                
               proc.WaitForExit(timeoutMilliseconds);
               // Get the output into a string
               if (proc.HasExited)
               {
                   if (!proc.StandardOutput.EndOfStream)
                   {
                       result = proc.StandardOutput.ReadToEnd();
                   }
                   else if (!proc.StandardError.EndOfStream)
                   {
                       result = "Error:: " + proc.StandardError.ReadToEnd();
                   }
               }
           }
           catch (Exception)
           {
               throw;
           }
           return result;
       }

    So please advice.

  • How to join webcam FLVs

    18 mars 2015, par Marc-André Lafortune

    I want my website to join some webcam recordings in FLV files (like this one). This needs to be done on Linux without user input. How do I do this ? For simplicity’s sake, I’ll use the same flv as both inputs in hope of getting a flv that plays the same thing twice in a row.

    That should be easy enough, right ? There’s even a full code example in the ffmpeg FAQ.

    Well, pipes seem to be giving me problems (both on my mac running Leopard and on Ubuntu 8.04) so let’s keep it simple and use normal files. Also, if I don’t specify a rate of 15 fps, the visual part plays extremely fast. The example script thus becomes :

    ffmpeg -i input.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 \
     - > temp.a < /dev/null
    ffmpeg -i input.flv -an -f yuv4mpegpipe - > temp.v < /dev/null
    cat temp.v temp.v > all.v
    cat temp.a temp.a > all.a
    ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
     -f yuv4mpegpipe -i all.v -sameq -y output.flv

    Well, using this will work for the audio, but I only get the video the first time around. This seems to be the case for any flv I throw as input.flv, including the movie teasers that come with red5.

    a) Why doesn’t the example script work as advertised, in particular why do I not get all the video I’m expecting ?

    b) Why do I have to specify a framerate while Wimpy player can play the flv at the right speed ?

    The only way I found to join two flvs was to use mencoder. Problem is, mencoder doesn’t seem to join flvs :

    mencoder input.flv input.flv -o output.flv -of lavf -oac copy \
    -ovc lavc -lavcopts vcodec=flv

    I get a Floating point exception...

    MEncoder 1.0rc2-4.0.1 (C) 2000-2007 MPlayer Team
    CPU: Intel(R) Xeon(R) CPU 5150 @ 2.66GHz (Family: 6, Model: 15, Stepping: 6)
    CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

    success: format: 0 data: 0x0 - 0x45b2f
    libavformat file format detected.
    [flv @ 0x697160]Unsupported audio codec (6)
    [flv @ 0x697160]Could not find codec parameters (Audio: 0x0006, 22050 Hz, mono)
    [lavf] Video stream found, -vid 0
    [lavf] Audio stream found, -aid 1
    VIDEO: [FLV1] 240x180 0bpp 1000.000 fps 0.0 kbps ( 0.0 kbyte/s)
    [V] filefmt:44 fourcc:0x31564C46 size:240x180 fps:1000.00 ftime:=0.0010
    ** MUXER_LAVF *****************************************************************
    REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
    INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
    will play these INCORRECT files as if nothing were wrong!
    *******************************************************************************
    OK, exit
    Opening video filter: [expand osd=1]
    Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Selected video codec: [ffflv] vfm: ffmpeg (FFmpeg Flash video)
    ==========================================================================
    audiocodec: framecopy (format=6 chans=1 rate=22050 bits=16 B/s=0 sample-0)
    VDec: vo config request - 240 x 180 (preferred colorspace: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is undefined - no prescaling applied.
    videocodec: libavcodec (240x180 fourcc=31564c46 [FLV1])
    VIDEO CODEC ID: 22
    AUDIO CODEC ID: 10007, TAG: 0
    Writing header...
    [NULL @ 0x67d110]codec not compatible with flv
    Floating point exception

    c) Is there a way for mencoder to decode and encode flvs correctly ?

    So the only way I’ve found so far to join flvs, is to use ffmpeg to go back and forth between flv and avi, and use mencoder to join the avis :

    ffmpeg -i input.flv -vcodec rawvideo -acodec pcm_s16le -r 15 file.avi
    mencoder -o output.avi -oac copy -ovc copy -noskip file.avi file.avi
    ffmpeg -i output.avi output.flv

    d) There must be a better way to achieve this... Which one ?

    e) Because of the problem of the framerate, though, only flvs with constant framerate (like the one I recorded through facebook) will be converted correctly to avis, but this won’t work for the flvs I seem to be recording (like this one or this one). Is there a way to do this for these flvs too ?

    Any help would be very appreciated.

  • Writing data to a Node.js child process's stdin fails due to ECONNRESET

    8 juillet 2015, par Swoth

    Problem
    Passing data to a child process’s stdin seems to fail. It fails due to an ECONNRESET after writing the data.

    Context
    I am developing a small programm that is supposed to render a video, as fast as possible, based on frames captured from a canvas. The animation is rendered to a headless canvas implementation using Rekapi (JavaScript animation framework). The headless canvas is a Node.js module called node-canvas by Automattic. The animation frames are rendered one after another, after each rendering the frame is retrieved using canvas.getImageData().data (Uint8ClampedArray - rgba, faster than canvas.toDataUrl) and put into an array. Every frame is supposed to be send to ffmpeg to create a video.

    Rekapi -> canvas -> getImageData -> array -> ffmpeg

    What I do
    I already tried various possibilities to pipe that data to ffmpeg. In general I created a child process in Node.js executing ffmpeg :

    var spawn = require('child_process').spawn;    
    var child = spawn('ffmpeg', [
           '-pix_fmt', 'rgba',
           '-s','1280x720',
           '-r', 25,
           '-f', 'rawvideo',
           '-vcodec', 'rawvideo',
           '-i', '-', // read frames from stdin
           '-threads', 0, // use all cores
           'test.mpg']);

    Now I write my array data to the child’s stdin :

    for(var i = 0; i < dataArray.length; ++i){
       var buffer = new Buffer(dataArray[i]);
       child.stdin.write(buffer);
       console.log('wrote: ' + i);
    }

    I wrote 25 frames this way. The console displays the following :

    wrote: 24
    wrote: 25
    events.js:85
         throw er; // Unhandled 'error' event
               ^
    Error: read ECONNRESET
       at exports._errnoException (util.js:746:11)
       at Pipe.onread (net.js:559:26)

    ffmpeg generated a 0 byte test.mpg.
    I am very new to Node.js, thus I might not understand the big picture of it’s child processes.