The free and privacy-friendly screen recorder with no limits 🎥
JavaScript annotationannotation-toolaudiocamerachrome-extensiondesigneditorffmpegjavascriptproductivityrecorderscreen-capturescreen-recorderscreencasttensorflowvideo
// MIME_TYPES lived here but was never imported. Cloud codec/container choice
// is in encoder/chooseEncoder.js (inspectTrackPlan).
export function getBitrates(quality) {
switch (quality) {
case "4k":
return { audio: 192000, video: 40000000 };
case "1080p":
return { audio: 192000, video: 8000000 };
case "720p":
return { audio: 128000, video: 5000000 };
case "480p":
return { audio: 96000, video: 2500000 };
case "360p":
return { audio: 96000, video: 1000000 };
case "240p":
return { audio: 64000, video: 500000 };
default:
return { audio: 128000, video: 5000000 };
}
}
export const VIDEO_QUALITIES = {
"4k": { width: 4096, height: 2160 },
"1080p": { width: 1920, height: 1080 },
"720p": { width: 1280, height: 720 },
"480p": { width: 854, height: 480 },
"360p": { width: 640, height: 360 },
"240p": { width: 426, height: 240 },
default: { width: 2560, height: 1440 }, // 2.5K as default
};
export function getResolutionForQuality(qualityValue = "default") {
return VIDEO_QUALITIES[qualityValue] || VIDEO_QUALITIES.default;
}