jbavari / cordova-plugin-video-editor

A cordova plugin to edit videos.
Other
289 stars 235 forks source link

Video transcoding with Cordova Video Editor plugin throws error on iOS #121

Open Gerardo-Mobyte opened 7 years ago

Gerardo-Mobyte commented 7 years ago

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)"

sminhaj28 commented 7 years ago

Same issue on my android side... app is not build after using this plugin...