Recherche avancée

Médias (91)

Autres articles (106)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (7490)

  • How to create a video file webm from chunks by media recorder api using ffmpeg

    17 octobre 2020, par Caio Nakai

    I'm trying to create a webm video file from blobs generated by MediaRecorderAPI in a NodeJS server using FFMPEG. I'm able to create the .webm file but it's not playable, I ran this command $ ffmpeg.exe -v error -i lel.webm -f null - >error.log 2>&1 to generate an error log, the error log file contains this :

    


    


    [null @ 000002ce7501de40] Application provided invalid, non monotonically increasing dts to muxer in stream 0 : 1 >= 1

    


    [h264 @ 000002ce74a727c0] Invalid NAL unit size (804 > 74).

    


    [h264 @ 000002ce74a727c0] Error splitting the input into NAL units.

    


    Error while decoding stream #0:0 : Invalid data found when processing input

    


    


    This is my web server code

    


    const app = require("express")();
const http = require("http").createServer(app);
const io = require("socket.io")(http);
const fs = require("fs");
const child_process = require("child_process");

app.get("/", (req, res) => {
  res.sendFile(__dirname + "/index.html");
});

io.on("connection", (socket) => {
  console.log("a user connected");

  const ffmpeg = child_process.spawn("ffmpeg", [
    "-i",
    "-",
    "-vcodec",
    "copy",
    "-f",
    "flv",
    "rtmpUrl.webm",
  ]);

  ffmpeg.on("close", (code, signal) => {
    console.log(
      "FFmpeg child process closed, code " + code + ", signal " + signal
    );
  });

  ffmpeg.stdin.on("error", (e) => {
    console.log("FFmpeg STDIN Error", e);
  });

  ffmpeg.stderr.on("data", (data) => {
    console.log("FFmpeg STDERR:", data.toString());
  });

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

  socket.on("stop", () => {
    console.log("Stop recording..");
    ffmpeg.kill("SIGINT");
  });
});

http.listen(3000, () => {
  console.log("listening on *:3000");
});



    


    And this is my client code, using HTML, JS :

    


    &#xA;&#xA;  &#xA;    &#xA;    &#xA;    &#xA;  &#xA;  <code class="echappe-js">&lt;script src='http://stackoverflow.com/socket.io/socket.io.js'&gt;&lt;/script&gt;&#xA;  &lt;script&gt;&amp;#xA;    const socket = io();&amp;#xA;    let mediaRecorder = null;&amp;#xA;    const startRecording = (someStream) =&gt; {&amp;#xA;      const mediaStream = new MediaStream();&amp;#xA;      const videoTrack = someStream.getVideoTracks()[0];&amp;#xA;      const audioTrack = someStream.getAudioTracks()[0];&amp;#xA;      console.log(&quot;Video trac &quot;, videoTrack);&amp;#xA;      console.log(&quot;audio trac &quot;, audioTrack);&amp;#xA;      mediaStream.addTrack(videoTrack);&amp;#xA;      mediaStream.addTrack(audioTrack);&amp;#xA;&amp;#xA;      const recorderOptions = {&amp;#xA;        mimeType: &quot;video/webm;codecs=h264&quot;,&amp;#xA;        videoBitsPerSecond: 3 * 1024 * 1024,&amp;#xA;      };&amp;#xA;&amp;#xA;      mediaRecorder = new MediaRecorder(mediaStream, recorderOptions);&amp;#xA;      mediaRecorder.start(1000); // 1000 - the number of milliseconds to record into each Blob&amp;#xA;      mediaRecorder.ondataavailable = (event) =&gt; {&amp;#xA;        console.debug(&quot;Got blob data:&quot;, event.data);&amp;#xA;        if (event.data &amp;amp;&amp;amp; event.data.size &gt; 0) {&amp;#xA;          socket.emit(&quot;message&quot;, event.data);&amp;#xA;        }&amp;#xA;      };&amp;#xA;    };&amp;#xA;&amp;#xA;    const getVideoStream = async () =&gt; {&amp;#xA;      try {&amp;#xA;        const stream = await navigator.mediaDevices.getUserMedia({&amp;#xA;          video: true,&amp;#xA;          audio: true,&amp;#xA;        });&amp;#xA;        startRecording(stream);&amp;#xA;        myVideo.srcObject = stream;&amp;#xA;      } catch (e) {&amp;#xA;        console.error(&quot;navigator.getUserMedia error:&quot;, e);&amp;#xA;      }&amp;#xA;    };&amp;#xA;&amp;#xA;    const stopRecording = () =&gt; {&amp;#xA;      mediaRecorder.stop();&amp;#xA;      socket.emit(&quot;stop&quot;);&amp;#xA;    };&amp;#xA;  &lt;/script&gt;&#xA;  &#xA;    
    

    hello world

    &#xA;

    &#xA;

    &#xA;&#xA; &#xA; &lt;script&gt;&amp;#xA;      const myVideo = document.getElementById(&quot;myvideo&quot;);&amp;#xA;      myVideo.muted = true;&amp;#xA;    &lt;/script&gt;&#xA; &#xA;&#xA;&#xA;

    &#xA;

    Any help is appreciated !

    &#xA;

  • How to change mp4 aspect ratio to 16:9 using ffmpeg ?

    1er mai 2016, par user1788736

    I got an mp4 video that I copy 4 minute of it using ffmpeg. After uploading to YouTube I noticed the uploaded video has black bars on both side of video(right and left side) !After searching for a way to remove those black bars I found that I need to use yt:stretch=16:9 !However,using yt:stretch=16.9 tag will not remove the black bars on iPhone and Samsung smart tv YouTube app !

    could an expert help me change the aspect ratio of original mp4 video to 16:9 using ffmpeg (without losing video quality) for re uploading to YouTube ? Thanks in advance ?

    I got two types of source with following information :

    1)Resolution:720x576 ,Frame rate:25 . Codec:H264 - MPEG-4 AVC(part 10)(avc1),
    2)Resolution:848x480 , Frame rate:24.804393,Codec:H264 - MPEG-4 AVC(part 10)(avc1)

    ffmpeg code used to trim the original video :

      ffmpeg -i orginalVideo.mp4 -ss 00:25:55 -t 00:04:02 -acodec copy -vcodec copy videoForYoutube.mp4
  • How to change mp4 aspect ratio to 16:9 using ffmpeg ?

    20 février 2023, par user1788736

    I got an mp4 video that I copy 4 minute of it using ffmpeg. After uploading to YouTube I noticed the uploaded video has black bars on both side of video(right and left side) !After searching for a way to remove those black bars I found that I need to use yt:stretch=16:9 !However,using yt:stretch=16.9 tag will not remove the black bars on iPhone and Samsung smart tv YouTube app !

    &#xA;&#xA;

    could an expert help me change the aspect ratio of original mp4 video to 16:9 using ffmpeg (without losing video quality) for re uploading to YouTube ? Thanks in advance ?

    &#xA;&#xA;

    I got two types of source with following information :

    &#xA;&#xA;

    1)Resolution:720x576 ,Frame rate:25 . Codec:H264 - MPEG-4 AVC(part 10)(avc1),&#xA;2)Resolution:848x480 , Frame rate:24.804393,Codec:H264 - MPEG-4 AVC(part 10)(avc1)&#xA;

    &#xA;&#xA;

    ffmpeg code used to trim the original video :

    &#xA;&#xA;

       ffmpeg -i orginalVideo.mp4 -ss 00:25:55 -t 00:04:02 -acodec copy -vcodec copy videoForYoutube.mp4&#xA;

    &#xA;