Closed nivas412 closed 4 years ago
It worked with this commands
// const videoPath = await AsyncStorage.setItem('videoPath', this.state.videoUrl);
const date = new Date();
let videoPath = this.state.videoUrl.replace("file://", "");
const finalisedVideo = '/data/user/0/com.febbler/files/' + Math.floor(date.getTime() + date.getSeconds() / 2) + '.mp4';
RNFFmpeg.execute('-i ' + videoPath + ' -i ' + this.state.audioUrl + ' ' + finalisedVideo).then(result => {
// -i ' + this.state.videoUrl + ' -i ' + this.state.audioUrl + ' -map 0:v -map 1:a -c copy -y ' + finalisedVideo
AsyncStorage.setItem('finalVideo', finalisedVideo);
RNFFmpegConfig.getLastCommandOutput().then(result => {
alert("Last command output: " + JSON.stringify(result.lastCommandOutput));
});
// this.props.navigation.navigate('videoDemo', {
// 'videoUrl': finalisedVideo,
// 'audioUrl': this.state.audioUrl
// });
});
Description I am trying to mix the video and audio but what I am getting no such file or directory even I am able to play those files with audio and video player getting this error. I have tried many ways like 'file://', 'file:///', remove completely file fro this but getting the same error.
Expected behavior video and audio should mix together
Current behavior No such file or directory
Screenshots
Logs The above screenshots provided for the logs please check
Environment "react": "16.13.1", "react-native": "0.63.1", "react-native-ffmpeg": "^0.4.4",
I am using full package in android/build.gradle reactNativeFFmpegPackage = "full"
Other I think is it saying the files which I provided not found anything else plz let me know what's the exact issue
Note: I am able to extract the audio from video with the same FFmpeg package
sample code is given below: