Recherche avancée

Médias (91)

Autres articles (70)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • L’utiliser, en parler, le critiquer

    10 avril 2011

    La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
    Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
    Une liste de discussion est disponible pour tout échange entre utilisateurs.

Sur d’autres sites (6905)

  • Is there a way to use InputStream to get the media details

    13 mai 2019, par Naman

    I am currently accepting InputStream from a client of my server for a File uploaded via multipart/form-data.

    I am currently using ffmpeg-cli-wrapper library to use ffprobe and ffmpeg.

    The challenge I see up front is that the APIs exposed by the client doesn’t make use of a stream, rather a mediaPath. Is there a way/library similar to this which can provide me an FFProbe instance as shown in the usage example of the library.

    To add to the pain, I am aware of transforming the InputStream into a file and then passing the mediaPath. But that’s an unnecessary space on my processing disk and an additional step for cleanup as well.

  • FFMPEG : Controlling overlay through ZeroMQ in ffmpeg

    9 juillet 2020, par Michel

    For a project we need to manually control an overlay (static image) on top of a video stream. We concluded that we will need ZeroMQ to control this, and we've managed to control an audio filter successfully through ZeroMQ.

    


    To achieve this we've considered two options :

    


      

    1. Use a color filter to control the foreground (image) transparency
    2. 


    3. "Move" the overlay image in front of the video stream, and remove it out of the video canvas
    4. 


    


    We've managed to get both working, but not in combination with ZeroMQ, unfortunately.

    


    Example :

    


    ffmpeg -loglevel verbose    \
              -i $STREAM     \
              -i overlay.png  \
          -bsf:a aac_adtstoasc \
        -threads 12             \
             -vf "zmq=bind_address=tcp\\\://127.0.0.1\\\:1235, [0:v][1:v]overlay=25:25" \
            -c:a aac              \
             -af "azmq=bind_address=tcp\\\://127.0.0.1\\\:1235,volume=1" \
            -c:v h264 output


    


    The above example produces the following error :

    


    Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument


    


    Advice on how this can be achieved is highly appreciated !

    


  • How to save audio chunks from client to ffmpeg readable file ?

    22 septembre 2023, par LuckOverflow

    I am live recording audio data from a TS React front-end and need to send it to the server, where it can be saved to a file so that ffmpeg can mix it. The front-end saves the mic data to a blob with type "mimeType : "audio/webm ; codecs=opus" when printed in the browser terminal. I send the exact object that I printed to the server, where logging it indicates it is a, or was passed as a, "Buffer" object.

    


    I have tried saving that Buffer as a webm file, but when I pass that file as an input to ffmpeg ffprobe, I get the error "Format matroska,webm detected only with a low score of 1..." and "EBML header parsing failed.." "Invalid data found when processing input." I have tried several other formats to no success.

    


    I need a way to transform this Buffer object to an audio file that can be mixed by ffmpeg. When I am finished, I also need to be able to do the reverse operation to send it in the same format to another client for playback, which is currently working.

    


    Code that records and sends the audio (TS React) :

    


    React Record

    


    const startRecording = async function () {
    inputStream = await navigator.mediaDevices.getUserMedia({ audio: true });
   
    mediaRecorder.current = new MediaRecorder(inputStream, { mimeType: "audio/webm; codecs=opus" });

    mediaRecorder.current.ondataavailable = e => {
      console.log(e.data)
      if (e.data.size > 0) {
        socket.emit("recording", e.data);
        console.log("Audio data recorded. Transmitting to server via socketio...");
      }
    };

    mediaRecorder.current.start(1000);
  };



    


    Code that receives and tries to save the Buffer to a file (JS Node.js) :

    


    Server Receive

    


    socket.on("recording", (chunk) => {
    console_log("Audio chunk recieved. Transmitting to frontend...");
    socket.broadcast.emit('listening', chunk);

    fs.writeFileSync('out.webm', chunk.toString());
    if (counter > 3) {
      console.log("Trying ffmpeg...");

      ffmpegInstance
        .input('out.webm')
        .complexFilter([
          {
            filter: 'amix'
          }])
        .save('./Music/FFMPEGSTREAM.mp3');
    }

    counter++;
  });


    


    fluent-ffmpeg interface package is includued in the server code, but I have been using ffmpeg in the terminal (Pop OS) to debug. The goal is to save the file to a ram disk and use fluent ffmpeg to mix before sending to a different client for playback. Currently I am just trying to save it to disk and get ffmpeg command line to work on it.

    


    Update :
Problem was that the chunk I was analyzing didn't have the header info. MediaRecorder encodes, then slices it up, not slices it up into your specified time slot and encodes. I have not found a good solution to this. Saving the file, without toString I believe, results in a playable webm when the header is properly included.