Cordova getPicture is compressing even when quality is 100


#1

I am having the user upload a video. This is my code.

var options = {
  var options = {
  destinationType: Camera.DestinationType.FILE_URI,
  quality: 100,
  mediaType: Camera.MediaType.VIDEO,
  sourceType: Camera.PictureSourceType.SAVEDPHOTOALBUM
};

$cordovaCamera.getPicture(options).then(function (results) {
  $scope.images.push(results);
  }, function(error) {
    // error getting photos
});

As you can see - quality is 100, yet I can see when I select the video that it goes through a “compressing video” step on my iPhone. Please help!


#2

@jbavari1 - i tried using https://github.com/jbavari/cordova-plugin-video-editor to grab the video “losslessly” but I’m having a FFMPEG issue

/Users/user/src/ScIonic/platforms/android/AndroidManifest.xml:16:5 Error:
uses-sdk:minSdkVersion 10 cannot be smaller than version 14 declared in library /Users/user/src/ScIonic/platforms/android/build/intermediates/exploded-aar/android.cordova-plugin-video-editor/app-android-ffmpeg-java/unspecified/debug/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="org.ffmpeg.android" to force usage

Can you confirm that cordova’s getPicture quality function only applies to images?


#3

Hi all i am also getting the same problem as i am trying to access the video path using $cordovaCamera plugin, here is my code:-

$scope.getVideoPath = function(){
var options = {
quality: 50,
destinationType: Camera.DestinationType.DATA_URL,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
mediaType:Camera.MediaType.VIDEO
};
$cordovaCamera.getPicture(options).then(function(videoURI) {
console.log(“videoURI”,JSON.stringify(videoURI));
console.log(“videoURI”,videoURI.toURI());
}, function(err) {
console.log(“err”,JSON.stringify(err));
});
}
I am getting both the log blank


#4

Still … At 100 my picture is not high quality enough. I want to take picture of document. But a 100, is still not readable.
What can I do