Recherche avancée

Médias (0)

Mot : - Tags -/albums

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

Autres articles (77)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

Sur d’autres sites (6816)

  • webcam displayed on LAN not to the internet

    9 juin 2015, par Francois Baret

    OK, this is not due to a dumb mistake : I have forwarded the port and there is no firewall in between.
    I try to make the "live streaming" section of jsmpeg (https://github.com/phoboslab/jsmpeg) to work on the Internet. To get the webcam stream on my webpage I modify "stream-server.js"

    if( process.argv.length < 3 ) {
            console.log(
                    'Usage: \n' +
                    'node stream-server.js <secret> [ ]'
            );
            process.exit();
    }

    var STREAM_SECRET = process.argv[2],
            STREAM_PORT = process.argv[3] || 8082,
            WEBSOCKET_PORT = process.argv[4] || 8084,
            STREAM_MAGIC_BYTES = 'jsmp'; // Must be 4 bytes

    var width = 320,
            height = 240;

    // Websocket Server
    var socketServer = new (require('ws').Server)({port: WEBSOCKET_PORT});
    socketServer.on('connection', function(socket) {
            // Send magic bytes and video size to the newly connected socket
            // struct { char magic[4]; unsigned short width, height;}
            var streamHeader = new Buffer(8);
            streamHeader.write(STREAM_MAGIC_BYTES);
            streamHeader.writeUInt16BE(width, 4);
            streamHeader.writeUInt16BE(height, 6);
            socket.send(streamHeader, {binary:true});

            console.log( 'New WebSocket Connection ('+socketServer.clients.length+' total)' );
           
            socket.on('close', function(code, message){
                    console.log( 'Disconnected WebSocket ('+socketServer.clients.length+' total)' );
            });
    });

    socketServer.broadcast = function(data, opts) {
            for( var i in this.clients ) {
                    if (this.clients[i].readyState == 1) {
                            this.clients[i].send(data, opts);
                    }
                    else {
                            console.log( 'Error: Client ('+i+') not connected.' );
                    }
            }
    };


    // HTTP Server to accept incomming MPEG Stream
    var streamServer = require('http').createServer( function(request, response) {
            var params = request.url.substr(1).split('/');

            if( params[0] == STREAM_SECRET ) {
                    width = (params[1] || 320)|0;
                    height = (params[2] || 240)|0;
                   
                    console.log(
                            'Stream Connected: ' + request.socket.remoteAddress +
                            ':' + request.socket.remotePort + ' size: ' + width + 'x' + height
                    );
                    request.on('data', function(data){
                            socketServer.broadcast(data, {binary:true});
                    });
            }
            else {
                    console.log(
                            'Failed Stream Connection: '+ request.socket.remoteAddress +
                            request.socket.remotePort + ' - wrong secret.'
                    );
                    response.end();
            }
    }).listen(STREAM_PORT);

    console.log('Listening for MPEG Stream on http://127.0.0.1:'+STREAM_PORT+'/<secret>/<width>/<height>');
    console.log('Awaiting WebSocket connections on ws://127.0.0.1:'+WEBSOCKET_PORT+'/');

    var servi = require('servi'),                // include the servi library
            app = new servi(false);                // servi instance

    // configure the server's behavior:
    app.port(8080);                                                // port number to run the server on
    app.serveFiles("public");                        // serve all static HTML files from /public
    app.start();       
    console.log("Listening for new clients on port 8080");</height></width></secret></secret>
           
           
           


    <h1>
    The Canvas size specified
    </h1>
           
            <canvas width="640" height="480">
                    <p>
                            Please use a browser that supports the Canvas Element, like
                            <a href="http://www.google.com/chrome">Chrome</a>,
                            <a href="http://www.mozilla.com/firefox/">Firefox</a>,
                            <a href="http://www.apple.com/safari/">Safari</a> or Internet Explorer 10
                    </p>
            </canvas>
            <code class="echappe-js">&lt;script type=&quot;text/javascript&quot; src=&quot;http://stackoverflow.com/feeds/tag/jsmpg.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;<br />
                    // Show loading notice<br />
                    var canvas = document.getElementById('videoCanvas');<br />
                    var ctx = canvas.getContext('2d');<br />
                    ctx.fillStyle = '#444';<br />
                    ctx.fillText('Loading...', canvas.width/2-30, canvas.height/3);<br />
    <br />
                    // Setup the WebSocket connection and start the player<br />
                    var client = new WebSocket( 'ws://192.168.1.15:8084/' );<br />
                    var player = new jsmpeg(client, {canvas:canvas});<br />
            &lt;/script&gt;

    The "index.html" is included in a "public" folder.

    Then I start ffmpeg with :

    `ffmpeg -s 640x480 -f video4linux2 -i /dev/video0 -f mpeg1video -b:v 800k -r 30 http://192.168.1.15:8082/1693/640/480/`

    When I open, on any station of the lan, url 192.168.1.x:8080 I get the webcam streaming on my page "jsmpeg streaming webcam" ; but if use the public ip 41.142.x.y:8080 from outside the local network (using 3G) I get the page (with the h1 line "The Canvas size specified") but no video it just says in the frame "loading".
    I do not understand why it works locally and not globally. Why the page is streaming on the internet but not the webcam ?
    Thanks for your help !

  • webcam displayed on LAN not to the internet

    6 novembre 2017, par Francois Baret

    OK, this is not due to a dumb mistake : I have forwarded the port and there is no firewall in between.
    I try to make the "live streaming" section of jsmpeg (https://github.com/phoboslab/jsmpeg) to work on the Internet. To get the webcam stream on my webpage I modify "stream-server.js"

    if( process.argv.length &lt; 3 ) {
            console.log(
                    'Usage: \n' +
                    'node stream-server.js <secret> [ ]'
            );
            process.exit();
    }

    var STREAM_SECRET = process.argv[2],
            STREAM_PORT = process.argv[3] || 8082,
            WEBSOCKET_PORT = process.argv[4] || 8084,
            STREAM_MAGIC_BYTES = 'jsmp'; // Must be 4 bytes

    var width = 320,
            height = 240;

    // Websocket Server
    var socketServer = new (require('ws').Server)({port: WEBSOCKET_PORT});
    socketServer.on('connection', function(socket) {
            // Send magic bytes and video size to the newly connected socket
            // struct { char magic[4]; unsigned short width, height;}
            var streamHeader = new Buffer(8);
            streamHeader.write(STREAM_MAGIC_BYTES);
            streamHeader.writeUInt16BE(width, 4);
            streamHeader.writeUInt16BE(height, 6);
            socket.send(streamHeader, {binary:true});

            console.log( 'New WebSocket Connection ('+socketServer.clients.length+' total)' );
           
            socket.on('close', function(code, message){
                    console.log( 'Disconnected WebSocket ('+socketServer.clients.length+' total)' );
            });
    });

    socketServer.broadcast = function(data, opts) {
            for( var i in this.clients ) {
                    if (this.clients[i].readyState == 1) {
                            this.clients[i].send(data, opts);
                    }
                    else {
                            console.log( 'Error: Client ('+i+') not connected.' );
                    }
            }
    };


    // HTTP Server to accept incomming MPEG Stream
    var streamServer = require('http').createServer( function(request, response) {
            var params = request.url.substr(1).split('/');

            if( params[0] == STREAM_SECRET ) {
                    width = (params[1] || 320)|0;
                    height = (params[2] || 240)|0;
                   
                    console.log(
                            'Stream Connected: ' + request.socket.remoteAddress +
                            ':' + request.socket.remotePort + ' size: ' + width + 'x' + height
                    );
                    request.on('data', function(data){
                            socketServer.broadcast(data, {binary:true});
                    });
            }
            else {
                    console.log(
                            'Failed Stream Connection: '+ request.socket.remoteAddress +
                            request.socket.remotePort + ' - wrong secret.'
                    );
                    response.end();
            }
    }).listen(STREAM_PORT);

    console.log('Listening for MPEG Stream on http://127.0.0.1:'+STREAM_PORT+'/<secret>/<width>/<height>');
    console.log('Awaiting WebSocket connections on ws://127.0.0.1:'+WEBSOCKET_PORT+'/');

    var servi = require('servi'),                // include the servi library
            app = new servi(false);                // servi instance

    // configure the server's behavior:
    app.port(8080);                                                // port number to run the server on
    app.serveFiles("public");                        // serve all static HTML files from /public
    app.start();       
    console.log("Listening for new clients on port 8080");</height></width></secret></secret>
           
           
           


    <h1>
    The Canvas size specified
    </h1>
           
            <canvas width="640" height="480">
                    <p>
                            Please use a browser that supports the Canvas Element, like
                            <a href="http://www.google.com/chrome">Chrome</a>,
                            <a href="http://www.mozilla.com/firefox/">Firefox</a>,
                            <a href="http://www.apple.com/safari/">Safari</a> or Internet Explorer 10
                    </p>
            </canvas>
            <code class="echappe-js">&lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/jsmpg.js'&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;<br />
                    // Show loading notice<br />
                    var canvas = document.getElementById('videoCanvas');<br />
                    var ctx = canvas.getContext('2d');<br />
                    ctx.fillStyle = '#444';<br />
                    ctx.fillText('Loading...', canvas.width/2-30, canvas.height/3);<br />
    <br />
                    // Setup the WebSocket connection and start the player<br />
                    var client = new WebSocket( 'ws://192.168.1.15:8084/' );<br />
                    var player = new jsmpeg(client, {canvas:canvas});<br />
            &lt;/script&gt;

    The "index.html" is included in a "public" folder.

    Then I start ffmpeg with :

    `ffmpeg -s 640x480 -f video4linux2 -i /dev/video0 -f mpeg1video -b:v 800k -r 30 http://192.168.1.15:8082/1693/640/480/`

    When I open, on any station of the lan, url 192.168.1.x:8080 I get the webcam streaming on my page "jsmpeg streaming webcam" ; but if use the public ip 41.142.x.y:8080 from outside the local network (using 3G) I get the page (with the h1 line "The Canvas size specified") but no video it just says in the frame "loading".
    I do not understand why it works locally and not globally. Why the page is streaming on the internet but not the webcam ?
    Thanks for your help !

  • How do I buffer and capture an RTSP stream to disk based on a trigger ?

    2 septembre 2022, par SJoshi

    I think what I'm asking about is similar to this ffmpeg post about how to capture a lightning strike (https://trac.ffmpeg.org/wiki/Capture/Lightning).

    &#xA;

    I have a Raspberry Pi with an IP cam over RTSP, and what I'm wondering is how to maintain a continual 5 second live video buffer, until I trigger a "save" command which will pipe that 5 second buffer to disk, and continue streaming the live video to disk until I turn it off.

    &#xA;

    Essentially, Pi boots up, this magic black box process starts and is saving live video into a fixed-size, 5-second buffer, and then let's say an hour later - I click a button, and it flushes that 5-second buffer to a file on disk and continues to pipe the video to disk, until I click cancel.

    &#xA;

    In my environment, I'm able to use ffmpeg, gstreamer, or openRTSP. For each of these, I can connect to my RTSP stream and save it to disk, but I'm not sure how to create this ever-present 5 second cache.

    &#xA;

    I feel like the gstreamer docs are alluding to it here (https://gstreamer.freedesktop.org/documentation/application-development/advanced/buffering.html?gi-language=c), but I guess I'm just not grokking how the buffering fits in with a triggered save. From that article, I get the impression that the end-time of the video is known in advance (I could artificially limit mine, I guess).

    &#xA;

    I'm not in a great position to post-process the file, so using something like openRTSP, saving a whole bunch of video segments, and then merging them isn't really an option.

    &#xA;

    Note : After a successful save, I wouldn't need to save another video for a minute or so, so that 5 second cache has plenty of time to fill back up before the next

    &#xA;

    This is the closest similar question that I've found : https://video.stackexchange.com/questions/18514/ffmpeg-buffered-recording

    &#xA;