Recherche avancée

Médias (0)

Mot : - Tags -/upload

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

Autres articles (53)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

  • 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

Sur d’autres sites (5825)

  • Live streaming using FFMPEG to web audio api

    19 janvier 2014, par Nayan

    I am trying to stream audio using node.js + ffmpeg to browsers connected in LAN only using web audio api.

    Not using element because it's adding it's own buffer of 8 to 10 secs and I want to get maximum high latency possible (around 1 to 2 sec max).

    Audio plays successfully but audio is very choppy and noisy.

    Here is my node.js (server side) file :

    var ws = require('websocket.io'),
    server = ws.listen(3000);
    var child_process = require("child_process");
    var i = 0;
    server.on('connection', function (socket)
    {

    console.log('New client connected');

    var ffmpeg = child_process.spawn("ffmpeg",[
       "-re","-i",
       "A.mp3","-f",
       "f32le",
       "pipe:1"                     // Output to STDOUT
       ]);

    ffmpeg.stdout.on('data', function(data)
    {
       var buff = new Buffer(data);
       socket.send(buff.toString('base64'));
    });
    });

    And here is my HTML :

    var audioBuffer = null;
    var context = null;
    window.addEventListener('load', init, false);
    function init() {
       try {
           context = new webkitAudioContext();
       } catch(e) {
           alert('Web Audio API is not supported in this browser');
       }
    }

    var ws = new WebSocket("ws://localhost:3000/");

    ws.onmessage = function(message)
    {
       var d1 = base64DecToArr(message.data).buffer;
       var d2 = new DataView(d1);

       var data = new Float32Array(d2.byteLength / Float32Array.BYTES_PER_ELEMENT);
       for (var jj = 0; jj < data.length; ++jj)
       {
           data[jj] = d2.getFloat32(jj * Float32Array.BYTES_PER_ELEMENT, true);
       }

       var audioBuffer = context.createBuffer(2, data.length, 44100);
       audioBuffer.getChannelData(0).set(data);

       var source = context.createBufferSource(); // creates a sound source
       source.buffer = audioBuffer;
       source.connect(context.destination); // connect the source to the context's destination (the speakers)
       source.start(0);
    };

    Can any one advise what is wrong ?

    Regards,
    Nayan

  • How to convert image to video using fluent-ffmpeg in NodeJS

    2 juillet 2022, par MjM

    I would like to create a video using fluent-ffmpeg in NodeJS. My objective is to create a video using one image. And what I have done so far is the following :

    



    var express = require('express')
var router = express.Router()

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

router.get('/test', function (req, res) {
    // make sure you set the correct path to your video file
    var proc = ffmpeg('http://localhost:3000/images/image.jpg')

        // loop for 5 seconds
        .loop(5)
        // using 25 fps
        .fps(25)
        // setup event handlers
        .on('end', function () {
            console.log('file has been converted succesfully');
        })
        .on('error', function (err) {
            console.log('an error happened: ' + err.message);
            console.log(' error code is : ' + err.code);
        })
        // save to file
        .save('http://localhost:3000/video/image-cdo.mp4');
})

module.exports = router;


    



    When I run this I have been getting the following result with an error :

    



    GET /mixer/ 200 6.364 ms - 13
GET /images/image.jpg 206 3.355 ms - 311484
GET /images/image.jpg 206 4.041 ms - 311484
GET /images/image.jpg 206 3.509 ms - 311484
GET /images/image.jpg 206 1.225 ms - 311484
GET /images/image.jpg 206 0.742 ms - 311484
GET /images/image.jpg 206 0.655 ms - 311484
GET /images/image.jpg 206 0.695 ms - 311484
GET /images/image.jpg 206 0.691 ms - 311484
GET /images/image.jpg 206 0.676 ms - 311484
GET /images/image.jpg 206 0.648 ms - 311484
GET /images/image.jpg 206 0.663 ms - 311484
GET /images/image.jpg 206 0.886 ms - 311484
GET /images/image.jpg 206 0.598 ms - 311484
GET /images/image.jpg 206 0.532 ms - 311484
GET /images/image.jpg 206 0.547 ms - 311484
GET /images/image.jpg 206 0.630 ms - 311484
GET /images/image.jpg 206 0.560 ms - 311484
GET /images/image.jpg 206 0.536 ms - 311484
POST /video/image-cdo.mp4 404 30.270 ms - 1212


    



    


    an error happened : ffmpeg exited with code 1 : Could not write header
 for output file #0 (incorrect codec parameters ?) : Invalid argument
 Error initializing output stream 0:0 — 
 Conversion failed !

    



     error code is : undefined


    


    



    Can anyone help me out :)

    



    "dependencies": {
    "fluent-ffmpeg": "^2.1.2",
  }


    



    And NodeJS v12.13.0

    


  • Live stream doesn't seem to be passed to AWS correctly

    12 août 2024, par NoobAmI

    I'm trying to stream my live video into Amazon IVS and I don't see it on the live channels.

    


    Is it possible I have a mistake in my FFMPEG configuration ?
I'm expecting to see this in my playback url or on the console screen for playback but I see nothing at the moment.

    


    As I understand it, shouldn't I see some kind of playback in the live channels if a stream is being sent that channel ?

    


    `  async sendDataToIvs(channelArn: string, payload: any): Promise<void> {&#xA;    const injestServer = &#x27;***.global-contribute.live-video.net&#x27;;&#xA;    const streamKey = &#x27;sk_us-east-1_*****&#x27;;&#xA;  &#xA;    const ffmpeg = spawn(&#x27;ffmpeg&#x27;, [&#xA;      &#x27;-re&#x27;, // Read input at native frame rate&#xA;      &#x27;-i&#x27;, &#x27;-&#x27;, // Input from stdin (live stream data)&#xA;      &#x27;-r&#x27;, &#x27;30&#x27;, // Frame rate&#xA;      &#x27;-c:v&#x27;, &#x27;libx264&#x27;, // Video codec - H.264&#xA;      &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;, // Pixel format&#xA;      &#x27;-profile:v&#x27;, &#x27;main&#x27;, // H.264 profile&#xA;      &#x27;-preset&#x27;, &#x27;veryfast&#x27;, // Encoder quality setting&#xA;      &#x27;-x264opts&#x27;, &#x27;nal-hrd=cbr:no-scenecut&#x27;, // Additional x264 options&#xA;      &#x27;-minrate&#x27;, &#x27;3000&#x27;, // Minimum bitrate&#xA;      &#x27;-maxrate&#x27;, &#x27;3000&#x27;, // Maximum bitrate&#xA;      &#x27;-g&#x27;, &#x27;60&#x27;, // GOP size&#xA;      &#x27;-c:a&#x27;, &#x27;aac&#x27;, // Audio codec&#xA;      &#x27;-b:a&#x27;, &#x27;160k&#x27;, // Audio bitrate&#xA;      &#x27;-ac&#x27;, &#x27;2&#x27;, // Audio channels&#xA;      &#x27;-ar&#x27;, &#x27;44100&#x27;, // Audio sample rate&#xA;      &#x27;-f&#x27;, &#x27;flv&#x27;, // Output format&#xA;      `rtmps://${injestServer}:443/app/${streamKey}` // Output destination&#xA;    ]);&#xA;  &#xA;    ffmpeg.stdin.write(payload, (err) => {&#xA;      console.log(payload)&#xA;      if (err) console.error(&#x27;Error writing payload to FFmpeg stdin:&#x27;, err);&#xA;    });&#xA;  &#xA;    ffmpeg.on(&#x27;close&#x27;, (code) => {&#xA;      console.log(`FFmpeg process exited with code ${code}`);&#xA;    });&#xA;  &#xA;    ffmpeg.stdin.on(&#x27;error&#x27;, (err) => {&#xA;      console.error(&#x27;Error writing to FFmpeg stdin:&#x27;, err);&#xA;    });&#xA;  &#xA;    ffmpeg.stderr.on(&#x27;data&#x27;, (data) => {&#xA;      console.error(`FFmpeg error: ${data}`);&#xA;    });&#xA;  } `&#xA;</void>

    &#xA;