Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

176
Views
Using mediarecorder to record matter.js+p5.js renders creates very blurry videos

I used mediarecorder to record a render created using matter.js and p5.js, but the video turned out like this.

How would I fix this? I've already tried setting the bitrate arbitrarily high.

I used the example code:

let canvas = document.getElementById('defaultCanvas0');
videoStream = canvas.captureStream(fps);
mediaRecorderv = new MediaRecorder(videoStream);
chunks = [];
console.log(mediaRecorderv.videoBitsPerSecond)
mediaRecorderv.ondataavailable = function(e) {
    chunks.push(e.data);
};
mediaRecorderv.onstop = function(e) {
    let blob = new Blob(chunks, { 'type' : 'video/mp4' });
    chunks = [];
    let videoURL = URL.createObjectURL(blob);
    const link = document.createElement('a');
    link.href = videoURL;
    link.download = 'render.mp4';
    document.body.append(link);
    link.click();
    link.remove();
};
mediaRecorderv.start();
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!