Hello Friends I try to Compress video in React native app I already use https://github.com/shahen94/react-native-video-processing but I didn't get actual reduce video file size.
I try to implement https://www.npmjs.com/package/react-native-ffmpeg package and try to compile but its gives return code 1 and fails process and in this process I use -y -i ${val} -c copy -map 0:v libx264 -b:v 0.5M -c:a aac -b:a 1000k ${data} {val is input video file and data is output video file }
my code: RNFFprobe.getMediaInformation(val).then(information => { console.log('Result: ' + JSON.stringify(information)); });
-y -i ${val} -c copy -map 0:v libx264 -b:v 0.5M -c:a aac -b:a 1000k ${data} const data=val RNFFmpeg.executeAsync(
-i ${val} -c copy -map 0:v libx264 -b:v 0.5M -c:a aac -b:a 1000k ${data}, completedExecution => { if (completedExecution.returnCode === 0) { console.log("FFmpeg process completed successfully"); } else { console.log(
FFmpeg process failed with rc=${completedExecution.returnCode}.); } }).then(executionId => console.log(
Async FFmpeg process started with executionId ${executionId}.)) .catch(error=>console.log(error))