Code Monkey home page Code Monkey logo

Comments (7)

FidelHen avatar FidelHen commented on July 21, 2024

The compression comparison is great! One problem... Quality is 144p, can't even see what is going on in the video. Any ETA on this problem?

from videocompress.

Serdnad avatar Serdnad commented on July 21, 2024

@FidelHen For now you can just set the quality yourself using

final compressedVideo = await VideoCompress().compressVideo(
  videoPath,
  quality: VideoQuality.HighestQuality,
);

from videocompress.

FidelHen avatar FidelHen commented on July 21, 2024

@Serdnad I did that and it still looks terrible. It's all super pixelated.

from videocompress.

Serdnad avatar Serdnad commented on July 21, 2024

Hmm, weird, I'm using that code in my app right now and adding that line fixed things for me. You're on iOS, right?

from videocompress.

jonataslaw avatar jonataslaw commented on July 21, 2024

@Serdnad I did that and it still looks terrible. It's all super pixelated.

Which device are you using?
This is not on our side, it is on Apple's side. I could create fixed size and quality presets, but apple recommends using

AVAssetExportPresetLowQuality
AVAssetExportPresetMediumQuality
AVAssetExportPresetHighestQuality

Rather

AVAssetExportPreset640x480
AVAssetExportPreset960x540
AVAssetExportPreset1280x720
AVAssetExportPreset1920x1080
AVAssetExportPreset3840x2160

I am changing the size to medium by default, but it will not help you if you are trying to compress a video from an iPhone 5 for example, it will obviously be pixelated, because iOS defines what is "low, medium and high" quality according to the device used.
I can try to make the sizes fixed, but if I do that and you use the highest preset on an iPhone 11 PRO and send a video to an iPhone 6 it is very likely that the video won't even open due to lack of resolution support on the device.
We are using the iOS API to compress video, basically any converter within the AppleStore uses exactly the same API (since it is not possible to use FFMPEG on the AppleStore due to the GNU license). Presets are defined by Apple, it's not like Android that if you want a 48x96 video you can have it. So if something is not working as it should, you can open an issue on the Apple forum.

from videocompress.

jonataslaw avatar jonataslaw commented on July 21, 2024

Fix on version 2.0.0

from videocompress.

alidemircans avatar alidemircans commented on July 21, 2024

DefaultQuality seems to output similar video as LowQuality preset does. This bug still continue for me.

from videocompress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.