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

Can we introduce a "High" quality? #77

Open
mrgnhnt96 opened this issue Dec 3, 2020 · 5 comments
Open

Can we introduce a "High" quality? #77

mrgnhnt96 opened this issue Dec 3, 2020 · 5 comments

Comments

@mrgnhnt96
Copy link

This scenario is on an iOS Device with ~10 second video.

The Medium/Default quality compresses a 100mb video to ~1mb video. The resolution is just a little blurry. The next available quality is "Highest" which will return a ~45mb video, which way too large. To get something that even gets down to the single digit mbs I have to lower the frameRate to less than 10, which also damages the resolution.

I need something in the middle, anyway to do this?

@awaik
Copy link

awaik commented Feb 24, 2021

I agree with @mrgnhnt96
For ios we can just change the code to

    private func getExportPreset(_ quality: NSNumber)->String {
        switch(quality) {
        case 1:
            return AVAssetExportPreset640x480
        case 2:
            return AVAssetExportPreset960x540
        case 3:
            return AVAssetExportPreset1280x720
        default:
            return AVAssetExportPreset960x540
        }
    }

and we will have 3 normal resolutions for the real-world use-cases.

I use it in my app already, fixed in the branch, works stable. Do you want me to make PR?

For those who want to try, you can use it for tests or as temporary workaround

#  video_compress: ^2.1.1
  video_compress:
    git:
      url: https://github.com/awaik/VideoCompress

@janlektonen
Copy link

I would like this new HighQuality also as DefaultQuality aka MediumQuality is a little to low and blurry... but I still want low filesize...

@jonataslaw Would we be able to set a own values for quality ? Or could you implement this new quality called HighQuality?

@jamesdixon
Copy link
Contributor

The ability to adjust the quality on our own would be phenomenal. I think I'm also missing that sweet spot between medium and highest qualities.

@jonataslaw
Copy link
Owner

I agree with @mrgnhnt96
For ios we can just change the code to

    private func getExportPreset(_ quality: NSNumber)->String {
        switch(quality) {
        case 1:
            return AVAssetExportPreset640x480
        case 2:
            return AVAssetExportPreset960x540
        case 3:
            return AVAssetExportPreset1280x720
        default:
            return AVAssetExportPreset960x540
        }
    }

and we will have 3 normal resolutions for the real-world use-cases.

I use it in my app already, fixed in the branch, works stable. Do you want me to make PR?

For those who want to try, you can use it for tests or as temporary workaround

#  video_compress: ^2.1.1
  video_compress:
    git:
      url: https://github.com/awaik/VideoCompress

You can made a PR with it

@awaik
Copy link

awaik commented May 13, 2021

I agree with @mrgnhnt96
For ios we can just change the code to

    private func getExportPreset(_ quality: NSNumber)->String {
        switch(quality) {
        case 1:
            return AVAssetExportPreset640x480
        case 2:
            return AVAssetExportPreset960x540
        case 3:
            return AVAssetExportPreset1280x720
        default:
            return AVAssetExportPreset960x540
        }
    }

and we will have 3 normal resolutions for the real-world use-cases.
I use it in my app already, fixed in the branch, works stable. Do you want me to make PR?
For those who want to try, you can use it for tests or as temporary workaround

#  video_compress: ^2.1.1
  video_compress:
    git:
      url: https://github.com/awaik/VideoCompress

You can made a PR with it

Missed it. Will make PR on the weekend.

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

5 participants