Recherche avancée

Médias (91)

Autres articles (37)

  • Les notifications de la ferme

    1er décembre 2010, par

    Afin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
    Les notifications de changement de statut
    Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
    À la demande d’un canal
    Passage au statut "publie"
    Passage au (...)

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

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (5671)

  • webcam displyed 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 !

  • How to utilize hardware decode for audio ?

    20 mars 2014, par jAckOdE

    I have a buffer that contain packets read by ffmpeg from a video file encoded using H264/AAC
    According to Apple document, audio stream encoded in AAC can be decode with hardware support,

    how to decode the audio stream with hardware support ?

    UPDATE : I use Audio Queue Service to output the audio. Right now i decode AAC packet using ffmpeg and send LPCM audio to AQS. According to the Apple document, I can send directly AAC audio to AQ and it will take care of decoding task. Does it decode with hardware ? Do i need, and how to set Audio Queue's parameter to enable audio hardware decoding ?

  • avfilter/drawtext : fix box sizing

    10 juillet 2018, par Gyan Doshi
    avfilter/drawtext : fix box sizing
    

    At present, box size is clipped to frame size before being drawn,
    which can lead to the box not fully covering animated text which is
    longer than one or both frame dimensions.

    Since ff_blend_rectangle correctly takes care of clipping, it is skipped
    here which results in correct box sizing

    • [DH] libavfilter/vf_drawtext.c