Recherche avancée

Médias (91)

Autres articles (80)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

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

Sur d’autres sites (14054)

  • ffmpeg wasm - how to take client-side created mp4 and upload it to the same server hosting the index/js files being used

    29 juillet 2022, par John Farrell

    Ok, so Im an IT guy and kind of a noob on the dev side of the fence. But I've been able to create this ffmpeg wasm page that takes a canvas and converts it to webm / and .mp4 — what i WANT to do is take the resulting .mp4 file and upload it to the server where the page/js are being served from. is this possible ? I will include my source code which is fairly simple and straight forward, I just don't know how to manipulate the resulting mp4 file that ffmpeg spits out (i realize it is happening client side) to be able to push it up to the server (maybe with aupload.php type situation ?) the solution can be html/java/php whatever, so long as it takes the mp4 output and gets it onto the server. I'd VERY MUCH appreciate a hand here.

    


    Going to try my best to properly insert the html and js. please bear with me if i've done something wrong, i've never had to -ask- a question on here, usually just look up existing answers.

    


    

    

    const { createFFmpeg } = FFmpeg;
const ffmpeg = createFFmpeg({
  log: true
});

const transcode = async (webcamData) => {
  const message = document.getElementById('message');
  const name = 'record.webm';
  await ffmpeg.load();
  message.innerHTML = 'Start transcoding';
  await ffmpeg.write(name, webcamData);
  await ffmpeg.transcode(name,  'output.mp4');
  message.innerHTML = 'Complete transcoding';
  const data = ffmpeg.read('output.mp4');

  const video = document.getElementById('output-video');
  video.src = URL.createObjectURL(new Blob([data.buffer], { type: 'video/mp4' }));
  dl.href = video.src;
  dl.innerHTML = "download mp4"
}

fn().then(async ({url, blob})=>{
    transcode(new Uint8Array(await (blob).arrayBuffer()));
})

function fn() {
var recordedChunks = [];

var time = 0;
var canvas = document.getElementById("canvas");

return new Promise(function (res, rej) {
    var stream = canvas.captureStream(60);

    mediaRecorder = new MediaRecorder(stream, {
        mimeType: "video/webm; codecs=vp9"
    });

    mediaRecorder.start(time);

    mediaRecorder.ondataavailable = function (e) {
        recordedChunks.push(event.data);
        // for demo, removed stop() call to capture more than one frame
    }

    mediaRecorder.onstop = function (event) {
        var blob = new Blob(recordedChunks, {
            "type": "video/webm"
        });
        var url = URL.createObjectURL(blob);
        res({url, blob}); // resolve both blob and url in an object

        myVideo.src = url;
        // removed data url conversion for brevity
    }

// for demo, draw random lines and then stop recording
var i = 0,
tid = setInterval(()=>{
  if(i++ > 20) { // draw 20 lines
    clearInterval(tid);
    mediaRecorder.stop();
  }
  let canvas = document.querySelector("canvas");
  let cx = canvas.getContext("2d");
  cx.beginPath();
  cx.strokeStyle = 'green';
  cx.moveTo(Math.random()*100, Math.random()*100);
  cx.lineTo(Math.random()*100, Math.random()*100);
  cx.stroke();
},200)

});
}

    


    &#xA;&#xA;&#xA;<code class="echappe-js">&lt;script src=&quot;https://unpkg.com/@ffmpeg/ffmpeg@0.8.1/dist/ffmpeg.min.js&quot; defer&gt;&lt;/script&gt;&#xA;&lt;script src='http://stackoverflow.com/feeds/tag/canvas2mp4.js' defer&gt;&lt;/script&gt;&#xA;&#xA;&#xA;&#xA;here is a canvas
    &#xA;
    &#xA;&#xA;here is a recorded video of the canvas in webM format
    &#xA;
    &#xA;&#xA;&#xA;here is a transcoded mp4 from the webm above CLIENT SIDE using ffmpeg
    &#xA;
    &#xA;&#xA;

    &#xA;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;

  • C# Audio Streaming (server to client)

    19 décembre 2020, par Denev

    I am using a translator.

    &#xA;

    I want to make a live streaming music player (UDP) using c#.

    &#xA;

      &#xA;
    1. Load an audio file from my computer (server) and play it.
    2. &#xA;

    3. The client connects to the server and listens to the music currently playing on the server, and displays metadata on the client program screen.
    4. &#xA;

    &#xA;

    The important part is that the client cannot control the playback timing and must receive it from the server unilaterally and play it. (Like twitch live streaming)

    &#xA;

    Is it possible to split the audio file into a buffer and send it, and the client receives it and plays it as audio in real-time ?

    &#xA;

    It looks like it's possible with FFmpeg, but I couldn't find any tutorials or examples for my level.

    &#xA;

    Thank you.

    &#xA;

  • Node.js, stream pipe output data to client with socket io-stream

    22 mai 2018, par Empha

    Sorry for a repeating topic, but i’ve searched and experimented for 2 days now and i haven’t been able to solve the problem.

    I am trying to live stream pictures every 1 second to a client via socket.io-stream using the following code :

    var args = [
       "-i",
       "/dev/video0",
       "-s",
       "1280x720",
       "-qscale",
       1,
       "-vf",
       "fps=1",
       config.imagePath,
       "-s",
       config.imageStream.resolution[0],
       "-f",
       "image2pipe",
       "-qscale",
       1,
       "-vf",
       "fps=1",
       "pipe:1"
    ];
    camera = spawn("avconv", args);    // avconv = ffmpeg

    The settings are good, and the process writes to stdout successfully. I capture all outgoing image data using this simplified code :

    var ss = require("socket.io-stream");
    camera.stdout.on("data", function(data) {
       var stream = ss.createStream();
       ss(socket).emit("img", stream, "newImg");
       // how do i write the data-object to the stream?
       // fs.createReadStream(imagePath).pipe(stream);
    });

    "socket" comes from the client using the socket.io-package, no problem there. So what i am doing is that i listen to the stdout-pipe for the "data" event. That data gets passed to the function above. That means that at this stage "data" is not a stream, its a "<buffer></buffer>code>"-object, and therefore i cannot stream it like i could previously using the commented createReadStream-statement where i read the image from disk. <strong>How do i stream the data (Buffer at this stage) to the client? Can i do this differently, perhaps not using socket.io-stream?</strong> "data" is just one part of the whole image, so perhaps two or three "data"-objects need to be put together to form the complete image.

    I tried using "stream.write(data, "binary") ;" which did transfer the Buffer-objects, problem is that there is not end of stream-event and therefore i do not know when an image is complete. I tried registering to stdout.on "close", "end", "finish", nothing triggers. Am i missing something ? Am i making it overly complex ? The reasoning behind my implementation is that i need a new stream for each complete image, is that right ?

    Thanks alot !