I trying to compress video in react native using react-native-ffmpeg .
I am picking video using react-native-image-picker.
I tried using command -y -i ${inputVideo} -vcodec h264 -acodec mp3 ${finalVideo}
.
But it is failing with rc:1
.
My code:-
RNFFmpeg.execute(
str_cmd,
).then(result => {
if (result.rc === 0) {
console.log("successfully compressed");
} else {
console.log("error",result);
}
});
Thanks!