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

Make Video Processing Configurable #44

Conversation

zeph-cohen10
Copy link

This PR makes video processing configurable through a new YPConfig option. If this new config option is set by the client then processing will always occur and will prioritize using any provided compressionTypeOverride. If this config option is not set then normal processing rules apply.

changes video to always process and not use  passthrough as a fallback unless explicitly supplied as a compression override
@@ -210,7 +210,15 @@ open class LibraryMediaManager {
// 5. Configuring export session
let videoIsCropped = cropRect.size.width < abs(videoSize.width) || cropRect.size.height < abs(videoSize.height)

let presetName = compressionTypeOverride ?? (videoIsCropped || videoIsTrimmed || videoIsRotated || (shouldMute && videoNeedsProcessing) ? YPConfig.video.compression : AVAssetExportPresetPassthrough)
var presetName = ""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit, this could be let presetName: String since it always gets inited in if-else.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zeph-cohen10 zeph-cohen10 self-assigned this Mar 15, 2024
@zeph-cohen10 zeph-cohen10 merged commit 74ca8d2 into master Mar 22, 2024
1 of 2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants