Skip to content

Commit

Permalink
fix min size for compression (#5272)
Browse files Browse the repository at this point in the history
(cherry picked from commit f943239)
  • Loading branch information
mozzius authored and haileyok committed Sep 11, 2024
1 parent 8f750ea commit 8bffa52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/media/video/compress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {SUPPORTED_MIME_TYPES, SupportedMimeTypes} from '#/lib/constants'
import {extToMime} from '#/state/queries/video/util'
import {CompressedVideo} from './types'

const MIN_SIZE_FOR_COMPRESSION = 1024 * 1024 * 25 // 25mb
const MIN_SIZE_FOR_COMPRESSION = 25 // 25mb

export async function compressVideo(
file: ImagePickerAsset,
Expand All @@ -30,6 +30,7 @@ export async function compressVideo(
compressionMethod: 'manual',
bitrate: 3_000_000, // 3mbps
maxSize: 1920,
// WARNING: this ONE SPECIFIC ARG is in MB -sfn
minimumFileSizeForCompress,
getCancellationId: id => {
if (signal) {
Expand Down

0 comments on commit 8bffa52

Please sign in to comment.