jonataslaw / VideoCompress

Compress videos, remove audio, manipulate thumbnails, and make your video compatible with all platforms through this lightweight and efficient library.
MIT License
229 stars 276 forks source link

VideoQuality enum "DefaultQuality" and "MediumQuality" have the same sizes #60

Open Asored-D opened 4 years ago

Asored-D commented 4 years ago

First of all: Thanks for your good work! This is a lighweight package to video resizing. But I notice an elementar issue. The enum VideoQuality.HighestQuality and VideoQuality.HighestQuality seems to output the absolutely same resolution. If I try to compress a video with my iPhone 11 and check the video width after compressing, I can see the following sizes:

VideoQuality.LowQuality : 224 Pixels VideoQuality.DefaultQuality : 568 Pixels VideoQuality.MediumQuality : 568 Pixels VideoQuality.HighestQuality : 1280 Pixels

Why DefaultQuality and MediumQuality have the same sizes? Is this a known bug? I understand that more than 1280 pixels is not possible here because this are apple presets, but are this the real values regarding the video width of a landscape video?

Additional information: Before each try I called await VideoCompress.deleteAllCache(); to be sure that there is nothing in cache.

My code:

for (int i = 0; i < videos.length; i++) {
  var path = videos[i]["videoPath"];
  final MediaInfo compressedVideo = await VideoCompress.compressVideo(path,
      quality: VideoQuality.HighestQuality);
  print(compressedVideo.width);
}

Thanks in advance for your information about this!

Asored-D commented 3 years ago

I still have this behavior. Is there a reason for?

abdullah432 commented 3 years ago

Same issue

alidemircans commented 2 years ago

Sameee issssuuuueeee :/ @jonataslaw