Recherche avancée

Médias (91)

Autres articles (65)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • 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 (12556)

  • Issue with creating Video files from Binary files

    22 septembre 2022, par user20057686

    We have a bunch of binary files that represent Video data.
This is how the binary files were created :

    


      

    1. Used MediaRecorder from a React application to capture the browser window.
To capture the screen stream we used (Navigator.)MediaDevices.getDisplayMedia() API
    2. 


    3. Each video is recorded for 1-second duration
    4. 


    5. This data is then encoded with base64 and sent through a websocket. The server decodes the base64 string and stores the binary data in a file (without any extension)
    6. 


    


    So we now have a bunch of binary files each containing 1 second worth of video data.

    


    The issue is, we are not able to convert all the binary files back to a single video.

    


      

    1. We tried using ffmpeg

      


      copy /b * merged.

      


      ffmpeg -i merged merged.mp4

      


    2. 


    


    Basically first merging all the binary files and converting to mp4. It didn't work. The resulting video duration is not equal to the (number_of_files) in seconds.

    


      

    1. We also tried converting individual chunks with ffmpeg but we get the below error :

      


      [h264 @ 000001522dc74b80] [error] non-existing PPS 0 referenced
[h264 @ 000001522dc74b80] [error] non-existing PPS 0 referenced
[h264 @ 000001522dc74b80] [error] decode_slice_header error
[h264 @ 000001522dc74b80] [error] no frame !
I can provide the complete logs if needed.

      


    2. 


    3. Next thing we tried was to use MoviePy library in Python. We programmatically concatenated the files and saved them as WebM and imported it into MoviePy as a Video.

      


    4. 


    


    In all the above approaches, we couldn't get the full video.

    


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

  • Install ffmpeg on Centos6 x64 using FFmpegInstaller 8.0 Issue [on hold]

    21 mars 2017, par woshka

    I have the following issue while installing ffmpeginstaller8.0 on centos 6 x64
    on the mplayer installtion it fails as followes on cpu.c
    what is the issue and how to solve it ?

    Thanks

    EDIT : I have found the best solution to install ffmpeg and all of it’s libraries with this link enter link description here

    YASM    libavcodec/x86/vp9lpf_16bpp.o
    YASM    libavcodec/x86/vp9itxfm_16bpp.o
    YASM    libavcodec/x86/vp9lpf.o
    YASM    libavcodec/x86/hevc_mc.o
    YASM    libavcodec/x86/vp9itxfm.o
    AR      libavcodec/libavcodec.a
    make[1]: Leaving directory `/usr/src/ffmpegscript/mplayer/ffmpeg'
    make -C ffmpeg libavutil/libavutil.a
    make[1]: Entering directory `/usr/src/ffmpegscript/mplayer/ffmpeg'
    CC      libavutil/cpu.o
    libavutil/cpu.c:20:23: warning: stdatomic.h: No such file or directory
    libavutil/cpu.c:28:5: warning: "HAVE_SCHED_GETAFFINITY" is not defined
    libavutil/cpu.c:34:5: warning: "HAVE_GETPROCESSAFFINITYMASK" is not defined
    libavutil/cpu.c:34:36: warning: "HAVE_WINRT" is not defined
    libavutil/cpu.c:37:5: warning: "HAVE_SYSCTL" is not defined
    libavutil/cpu.c:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cpu_flags'
    libavutil/cpu.c: In function 'av_force_cpu_flags':
    libavutil/cpu.c:86: error: implicit declaration of function 'atomic_store_explicit'
    libavutil/cpu.c:86: error: 'cpu_flags' undeclared (first use in this function)
    libavutil/cpu.c:86: error: (Each undeclared identifier is reported only once
    libavutil/cpu.c:86: error: for each function it appears in.)
    libavutil/cpu.c:86: error: 'memory_order_relaxed' undeclared (first use in this function)
    libavutil/cpu.c: In function 'av_get_cpu_flags':
    libavutil/cpu.c:91: error: implicit declaration of function 'atomic_load_explicit'
    libavutil/cpu.c:91: error: 'cpu_flags' undeclared (first use in this function)
    libavutil/cpu.c:91: error: 'memory_order_relaxed' undeclared (first use in this function)
    libavutil/cpu.c: In function 'av_set_cpu_flags_mask':
    libavutil/cpu.c:101: error: 'cpu_flags' undeclared (first use in this function)
    libavutil/cpu.c:102: error: 'memory_order_relaxed' undeclared (first use in this function)
    libavutil/cpu.c:265:5: warning: "HAVE_WINRT" is not defined
    libavutil/cpu.c:268:5: warning: "HAVE_SCHED_GETAFFINITY" is not defined
    libavutil/cpu.c:275:7: warning: "HAVE_GETPROCESSAFFINITYMASK" is not defined
    libavutil/cpu.c:279:7: warning: "HAVE_SYSCTL" is not defined
    libavutil/cpu.c:285:7: warning: "HAVE_SYSCONF" is not defined
    libavutil/cpu.c:287:7: warning: "HAVE_SYSCONF" is not defined
    libavutil/cpu.c:289:7: warning: "HAVE_WINRT" is not defined
    make[1]: *** [libavutil/cpu.o] Error 1
    make[1]: Leaving directory `/usr/src/ffmpegscript/mplayer/ffmpeg'
    make: *** [ffmpeg/libavutil/libavutil.a] Error 2
    cp: cannot create regular file `/usr/local/cpffmpeg/etc/mplayer/codecs.conf': No such file or directory
    Installation of mplayer.tar.gz ....... Completed


      Mplayer installation Failed :( ,  please contact  professional support sales@syslint.com