Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stretched and rotated video when in portrait mode #9

Closed
matteocarde opened this issue Feb 15, 2015 · 1 comment
Closed

Stretched and rotated video when in portrait mode #9

matteocarde opened this issue Feb 15, 2015 · 1 comment

Comments

@matteocarde
Copy link

Hello jbavari,
first of all thank you for this plugin ! I have searched it for ages.

I installed it in my application but I've found a problem. When it transcodes the video the result is rotated if I shot it in portrait mode or stretched if i shot it in landscape mode.

Here's a frame of the video.

stretched

There are some settings to change ? Here's my code:

     var captureSuccess = function(mediaFiles) {
            var url = mediaFiles[0].fullPath;
            var output = mediaFiles[0].name;
            output = output.substr(0, output.length - 4) + "D";
            alert(url);
            alert(output);

            var videoTranscodeSuccess = function(result){
                alert("Video Transcoded");
            }

            var videoTranscodeError = function(err){
                alert("Error: " + err);
            }


            VideoEditor.transcodeVideo(
                videoTranscodeSuccess,
                videoTranscodeError, {
                    fileUri: url,
                    outputFileName: output,
                    quality: VideoEditorOptions.Quality.HIGH_QUALITY,
                    outputFileType: VideoEditorOptions.OutputFileType.MPEG4,
                    optimizeForNetworkUse: VideoEditorOptions.OptimizeForNetworkUse.NO
                }
            );
        };

        // capture error callback
        var captureError = function(error) {
            alert('Error code: ' + error.code, null, 'Capture Error');
        };

        // start video capture
        try {
            navigator.device.capture.captureVideo(captureSuccess, captureError, {
                limit: 1
            });
        } catch (e) {
            alert(e);
        }
@matteocarde
Copy link
Author

I have fixed it changing the outputResolution of videoeditor.java from 360x480 to 480x360 and also from 144x192 to 192x144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants