Recherche avancée

Médias (91)

Autres articles (8)

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

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (2853)

  • Connect a remote Ip camera as a Webrtc client

    5 avril 2017, par idosh

    I have 2 cameras :

    • An internal webcam embedded in my laptop.
    • A remote IP camera that is connected to my laptop through Wifi (transmits TCP, raw H264 data - no container). I’m getting the stream using node.js.

    My goal is to create a Webrtc network and connect the remote camera as another client.

    I’m trying to figure out possible solutions :

    • My naive thinking was that I would stream the remote camera payload to the browser. But as I came to understand the browser can’t handle the stream without a container. Fair enough. But I don’t understand why it does handle the video stream that arrives from my internal camera (from the navigator.getUserMedia() function). what’s the difference between the two streams ? why can’t I mimic the stream from the remote camera as the input ?
    • To bypass this problem I thought about creating a virtual camera using Manycam (or Manycam like app). To accomplish that I need to convert my TCP stream into an RTP stream (in order to feed Manycam). Though I did saw some info in ffmpeg command line, I couldn’t find info in their node.js api package "fluent-ffmpeg". Is it possible to do it using fluent-ffmpeg ? Or only using the command line tool ? Would it require another rtp server in the middle such as this one ?.
    • Third option I read about is using node.js as a client in Webrtc. I saw it was implemented in "simple-peer". I tried it out using their co-work with socket.io (socket.io-p2p). unfortunately I couldn’t get it to work / : When i’m trying to create a socket/peer in the server - it throws errors, as it expect options that are only available on the client-side (like window, location, etc.). Am I doing something wrong ? maybe there is more suitable framework for this matter ?
    • Forth option is to use a streaming server in the middle such as Kurnto. From my understanding it receives rtp as an input and transmits it as a webrtc client. I feel it’s the most excessive option, but maybe it’s not so bad (I have to admit that I haven’t investigate this option yet).

    any thoughts ?

    thanks !

  • FFMPEG - How to wait until all blobs are written before finishing ffmpeg process when getting them from media recorder API

    7 novembre 2020, par Caio Nakai

    I'm using media recorder API to record a video from user's screen and sending the blobs through web socket to a nodejs server. The nodejs server is using the blobs to create a webm video file, the video is being created fine but with a delay, after the user clicks on the stop recording button it stops the media recorder api, however the server didn't finish the processing of all blobs (at least that's what I think it's happening) and then when I check the video file generated the last few seconds of the recording are missing I wonder if there's an way to solve this. Any help is appreciated :)

    


    This is the front-end code that sends the blobs to the nodejs server

    


      const startScreenCapture = async () => {
  try {
    let screenStream;
    videoElem = document.getElementById("myscreen");
    screenStream = await navigator.mediaDevices.getDisplayMedia(
      displayMediaOptions
    );

    const recorderOptions = {
      mimeType: "video/webm;codecs=vp9",
      videoBitsPerSecond: 3 * 1024 * 1024,
    };

    screenMediaRecorder = new MediaRecorder(screenStream, recorderOptions);
    screenMediaRecorder.start(1); // 1000 - the number of milliseconds to record into each Blob
    screenMediaRecorder.ondataavailable = (event) => {
      console.debug("Got blob data:", event.data);
      console.log("Camera stream: ", event.data);
      if (event.data && event.data.size > 0) {
        socket.emit("screen_stream", event.data);
      }
    };

    videoElem.srcObject = screenStream;
    // console.log("Screen stream", screenStream);
    // socket.emit("screen_stream", screenStream);
  } catch (err) {
    console.error("Error: " + err);
  }
};

const stopCapture = (evt) => {
  let tracks = videoElem.srcObject.getTracks();

  tracks.forEach((track) => track.stop());
  videoElem.srcObject = null;
  screenMediaRecorder.stop();
  socket.emit("stop_screen");
  socket.close();
};


    


    This is the nodejs back-end that handle the blobs and generates the videofile

    


      const ffmpeg2 = child_process.spawn("ffmpeg", [
    "-i",
    "-",
    "-c:v",
    "copy",
    "-c:a",
    "copy",
    "screen.webm",
  ]);


  socket.on("screen_stream", (msg) => {
    console.log("Writing screen blob! ");
    ffmpeg2.stdin.write(msg);
  });

  socket.on("stop_screen", () => {
    console.log("Stop recording..");
  });


    


  • Creating an ffmpeg html/php form process and need ffmpeg technical feedback

    7 juin 2016, par dave

    I have decided to create an input form for ffmpeg to go with my video uploader.

    This is for my video uploader plugin for a social site software. Users have told me that they want technical options for videos so they can choose the specific options they want including thumbnail options.

    I have been reading the ffmpeg docs most of the morning as well as watching some videos and i have come up with a rough draft of my form. The videos uploaded will more than likely be non gaming, personal and hobby videos.

    The goal here is to have a form that is easy enough for the non technical user, but technical for those that want the options. So i do plan to have a checkbox which allows the non technical user to skip the technical settings. This will result in a generic ffmpeg command with default settings. If they choose to use the technical specs then it will create a more specific ffmpeg command stream.

    here is what i have so far in the draft.

    select max size options ’50MB’,’100MB’,’200MB’,’500MB’,’650MB’,’750MB’,’1GB’,’2GB’,’3GB’

    input for thumbcapture in seconds maxlength 2 size 2

    input for video in ’mpg’,’wma’,’mov’,’flv’,’mp4’,’avi’,’qt’,’wmv’,’rm’

    option for video size ’200x100’,’320x240’,’560x315’,’640x360’,’853x480’,’1280x720’ not sure if i want to offer a custom slot or not.

    my thought here is that if they do not want the tech version of the form then the codecs will be b:v copy b:a copy (if that is the smart way to do it) or just left out and let ffmpeg decide what is best.

    ===== this is the technical part of the form =======

    select for acodec options copy, mp3, mp1, mp2, dnet, 28_8, wmav2, alac, cook

    select for vcodec option copy, ffv1, ms-cram, mpeg-4, rv40, wmv, xvid, mov, qt, avchd

    select for bitrate audio 32k, 64k, 128k

    select for bitrate video 1000k, 1200k, 1500k

    select for sampling rate 22050, 44100

    input for crf(mp4 out only) size 2 maxlength 2 minval 2 maxval 49

    input for avi quantanizer (avi out only) size 2 maxlength 2 minval 2 maxval 49

    ===== end technical form =====================

    select for video out ’avi’,’mp4’,’flv’

    that is what i have so far. How does that combination on the technical side look to you ffmpeg pros ?

    Any suggestions ? :)