Video transcoding with Video Editor plugin

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) => {

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.

1 Like

Did you manage to solve this? I’m running into the same problem.

I found the solution, you need to use unique outputFileNime each time, otherwise this plugin throws an error.

Hi Watto, I uploaded a very detailed video tutorial explaining how to integrate and use the VideoEditor plugin to your Ionic app. Its works fine on real Android and iOS devices. At the end of the video I explain how to fix the issue of the plugin regarding bad formatted local URIs only on iOS. In the description of the video you will find a link to the source code on GitHub. I hope you you find it useful.

Hello it’s a permission problem. Make sure if your app has WRITE_EXTERNAL_STORAGE