Hi all. I’m trying to capture video and transcode it with Video Editor plugin from Ionic Native. It works perfectly on Android but with iOS I’m not capable to transcode the video.
After capturing video, I use transcode method in this way:
let options = {
fileUri : videoFullPath,
outputFileName : new Date().getTime().toString() + '.mp4',
outputFileType : this.videoEditor.OutputFileType.MPEG4,
saveToLibrary : true,
maintainAspectRatio : true,
width : 480,
height : 360,
videoBitrate : 500000,
audioChannels : 1,
audioSampleRate : 22050,
audioBitrate : 96000,
progress : (info: number) => {
console.log('Progreso: ' + info * 100 + '%');
}
};
this.videoEditor.transcodeVideo(options).then((pathTranscodedVideo: string) => {
console.log(pathTranscodedVideo);
}).catch(this.showErrorMessage);
As I said, it works on Android. On iOS I get the next error: "Video export failed with error: Cannot Decode (-11855)"
Can anybody help me. I’m stuck with this and I need it to work for a client project.
Thank you all.