shahen94 / react-native-video-processing

Native Video editing/trimming/compressing :movie_camera: library for React-Native
https://shahen94.github.io/react-native-video-processing/
MIT License
1.25k stars 326 forks source link

error while video compressing #352

Open PrabhakarKotipalli opened 2 years ago

PrabhakarKotipalli commented 2 years ago

[Error: compress error: failed. ffmpeg version v4.3-dev-2955 Copyright (c) 2000-2020 the FFmpeg developers built with Android (6317467 based on r365631c1) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project e0caee08e5f09b374a27a676d04978c81fcb1928) (based on LLVM 9.0.8svn)

Prober10 commented 2 years ago

found any solution?

hpvdev commented 2 years ago

@PrabhakarKotipalli @Prober10 use https://www.npmjs.com/package/@flyerhq/react-native-android-uri-path to get real path, then use real path for this lib. Hope to help you.

import getPath from '@flyerhq/react-native-android-uri-path';

const realPath = getPath(response.uri);

const result = await ProcessingManager.compress(realPath, { width: source.height && source.height / 3, height: source.width && source.width / 3, bitrateMultiplier: 7, minimumBitrate: 300000, }); onSuccess(result.source);