Recherche avancée

Médias (0)

Mot : - Tags -/upload

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

Autres articles (112)

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (15995)

  • How to stream to a element using fluent-ffmpeg

    19 mai 2017, par Lukas

    I am writing on an electron application and I am trying to use fluent-ffmpeg to create a streaming server and use a <video></video> element to consume that stream. I wonder how to set up fluent-ffmpeg and the <video></video> using flowplayer like this :

    Server :

    const express = require('express');
    const ffmpeg = require('fluent-ffmpeg');

    const app = express();

    app.use(express.static(__dirname + '/flowplayer'));

    app.get('/', function(req, res) {
       res.send('index.html');
    });

    app.get('/video/:filename', function(req, res) {
       res.contentType('flv');
       // make sure you set the correct path to your video file storage
       const pathToMovie = '/Users/luke/Movies/' + req.params.filename;
       const proc = ffmpeg(pathToMovie)
       // use the 'flashvideo' preset (located in /lib/presets/flashvideo.js)
           .preset('divx')
           // setup event handlers
           .on('end', function() {
               console.log('file has been converted succesfully');
           })
           .on('error', function(err) {
               console.log('an error happened: ' + err.message);
           })
           // save to stream
           .pipe(res, {end:true});
    });

    app.listen(4000);

    Webseite with <video></video> element :

     
       
       <code class="echappe-js">&lt;script src=&quot;https://code.jquery.com/jquery-1.11.2.min.js&quot;&gt;&lt;/script&gt;

    &lt;script src='http://stackoverflow.com/feeds/tag/flowplayer-7.0.4/flowplayer.min.js'&gt;&lt;/script&gt;

    &lt;script&gt;<br />
       require('./ffmpeg-server.js');<br />
     &lt;/script&gt;

    The main problem I see right now is to find a way to set up the right settings for ffmpeg (currently I am using the divx preset together with the video type video/mpeg4 in the HTML which (of course) does not work.

  • "Error opening filters !" when using fluent-ffmpeg with Node

    3 février 2015, par doremi

    I’m trying to get a basic example of html5 video streaming working in an express node app, but I keep running into ffmpeg errors that I’m unsure of how to resolve.

    The input file/stream is the sample.mp4 located here.

    Complete example :

    var ffmpeg = require('fluent-ffmpeg');
    var express    = require('express');
    var fs         = require('fs');
    var sampleApp  = express();
    var videoApp   = express();

    var SAMPLE_SERVER_PORT = 3000;
    var VIDEO_SERVER_PORT  = 5000;

    sampleApp.get('/:video', function (req, res) {
     var videoURL = 'http://localhost:' + VIDEO_SERVER_PORT + '/' + req.params.video;
     return res.end('<video controls="controls" src=" + videoURL +"></video>');
    });

    videoApp.get('/:video', function(req, res) {

     res.statusCode = 200;
     res.setHeader('content-type','video/mp4');

     var stream = fs.createReadStream('./samples/' + req.params.video);

     var proc = ffmpeg(stream)

       .format('mp4')
       .size('320x?')
       .videoBitrate('512k')
       .videoCodec('libx264')
       .fps(24)
       .audioBitrate('96k')
       .audioCodec('aac')
       .audioFrequency(22050)
       .audioChannels(2)

       .on('error', function(err) {
         console.log('an error happened: ' + err.message);
       })

       .pipe(res, { end:true });
    });

    var server = sampleApp.listen(SAMPLE_SERVER_PORT, function () {
     console.log('Example app listening at http://%s:%s', server.address().address, SAMPLE_SERVER_PORT);
    });


    var videoServer = videoApp.listen(VIDEO_SERVER_PORT, function () {
     console.log('Video Server listening at http://%s:%s', server.address().address, VIDEO_SERVER_PORT);
    });

    The error (via console) :

    an error happened: ffmpeg exited with code 1: Error opening filters!

    ffmpeg configuration :

    ./configure  --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass \                                                                        
    --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus \
    --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-libfaac --enable-libfdk-aac

    Any input would be greatly appreciated.

  • FFmpeg skips rendering frames

    18 août 2018, par Srdjan M.

    While I extract frames from a video I noticed that ffmpeg wont finish rendering certain images. The problem ended up being byte "padding" between two jpeg images. If my buffer size is 4096 and if in that buffer are located bytes from previous image and next image and if they are not separated by any number of bytes, then next image is not rendered properly. Why is that ?

    -i path -f image2pipe -c:v mjpeg -q:v 2 -vf fps=25 pipe:1

    enter image description here

    Rendered frame :

    enter image description here

    Code sample :

    public void ExtractFrames()
    {
       string FFmpegPath = "Path...";
       string Arguments = $"-i { VideoPath } -f image2pipe -c:v mjpeg -q:v 2 -vf fps=25/1 pipe:1";
       using (Process cmd = GetProcess(FFmpegPath, Arguments))
       {
           cmd.Start();
           FileStream fStream = cmd.StandardOutput.BaseStream as FileStream;

           bool Add = false;
           int i = 0, n = 0, BufferSize = 4096;
           byte[] buffer = new byte[BufferSize + 1];

           MemoryStream mStream = new MemoryStream();

           while (true)
           {
               if (i.Equals(BufferSize))
               {
                   i = 0;
                   buffer[0] = buffer[BufferSize];
                   if (fStream.Read(buffer, 1, BufferSize) == 0)
                       break;
               }

               if (buffer[i].Equals(255) &amp;&amp; buffer[i + 1].Equals(216))
               {
                   Add = true;
               }

               if (buffer[i].Equals(255) &amp;&amp; buffer[i + 1].Equals(217))
               {
                   n++;
                   Add = false;
                   mStream.Write(new byte[] { 255, 217 }, 0, 2);
                   File.WriteAllBytes($@"C:\Path...\{n}.jpg", mStream.ToArray());
                   mStream = new MemoryStream();
               }

               if (Add)
                   mStream.WriteByte(buffer[i]);

               i++;
           }
           cmd.WaitForExit();
           cmd.Close();
       }
    }

    private Process GetProcess(string FileName, string Arguments)
    {
       return new Process
       {
           StartInfo = new ProcessStartInfo
           {
               FileName = FileName,
               Arguments = Arguments,
               UseShellExecute = false,
               RedirectStandardOutput = true,
               CreateNoWindow = false,
           }
       };
    }

    Video sample (> 480p) with length of 60 seconds or higher should be used for testing purposes.