open-audiovisual
Search GitHub

oav-p5 reference · Loading options

recfps#

optionoav-p5
?oav_recfps=1 to 60

The frame rate of recorded video, 1 to 60 frames a second.

How many frames a second the recorder takes from the canvas, for startRecording() and the ⏺ button. 30 suits most places Instagram and YouTube accept. 60 is smoother for fast motion and makes a bigger file. One take can ask for its own rate: startRecording({ fps: 60 }).

Type
Number
Values
1 to 60
default
30

Rounded to a whole number and held between 1 and 60. Anything that is not a number means 30.

Notes

  • It is read back as OAVp5.options.recfps and as OAVp5.record.fps.
  • Set it before oav-p5 loads. window.OAV_P5 = { recfps: … }; above the loader line wins, then ?oav_recfps=… on the page address, then ?recfps=… on the script's own URL. Values in window.OAV_P5 are turned into text, so write 'off', not false. On OpenProcessing the page address takes ?sketch_oav_recfps=… (the project's README says OpenProcessing forwards it to the sketch).

Examples

jsOpenProcessing ↗
window.OAV_P5 = { recfps: 60 };

function setup() {
  createCanvas(400, 300);
}

function draw() {
  background(20);
  fill(255);
  text('recording frame rate: ' + OAVp5.record.fps, 20, 30);
}
Takes recorded from this page are 60 frames a second instead of 30.

Related

  • reclimit The longest one recording may last, in seconds: a take stops by itself there.
  • record Whether recording is available and whether it includes the microphone: on, nomic or off.
  • startRecording() Records the canvas and the sound your sketch makes into one video file, and returns a promise that says whether the recording began.
  • OAVp5.record.fps The frame rate (fps) and the longest take in seconds (limit) that the loading options recfps and reclimit set.

p5/oav-p5.js, line 132

↑ Back to top · All names