spot: change rounding in trim

This commit is contained in:
nick-delirium 2024-09-10 16:50:26 +02:00
parent d3b6511e55
commit fc01e47e28
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
2 changed files with 2 additions and 1 deletions

View file

@ -152,7 +152,7 @@ function SavingControls({
const trim =
bounds[0] + bounds[1] === 0
? null
: (bounds.map((i: number) => Math.round(i * 1000)) as [number, number]);
: [Math.floor(bounds[0] * 1000), Math.ceil(bounds[1] * 1000)]
const dataObj = {
blob: videoBlob(),
name: name(),

View file

@ -4,6 +4,7 @@ function getRecordingSettings(qualityValue) {
const settingsMap = {
"4k": { audioBitsPerSecond: 192000, videoBitsPerSecond: 40000000, width: 4096, height: 2160 },
"1080p": { audioBitsPerSecond: 192000, videoBitsPerSecond: 8000000, width: 1920, height: 1080 },
// @default
"720p": { audioBitsPerSecond: 96000, videoBitsPerSecond: 2500000, width: 1280, height: 720 },
"480p": { audioBitsPerSecond: 96000, videoBitsPerSecond: 2500000, width: 854, height: 480 },
"360p": { audioBitsPerSecond: 96000, videoBitsPerSecond: 1000000, width: 640, height: 360 },