dev-labs-bg / swift-video-generator

MIT License
639 stars 121 forks source link

Used AVAssetExportPresetPassthrough instead of AVAssetExportPresetHig… #48

Closed trickpirata closed 5 years ago

trickpirata commented 5 years ago

…hestQuality. According to apple docs: https://developer.apple.com/documentation/avfoundation/avassetexportsession/export_preset_names_for_device-appropriate_quicktime_files?changes=latest_minor

blurtime commented 5 years ago

Would not suggest this due to #41 and the solution to this problem I posted there (or shortcut: my question related to #41 on SO). In my answer I write (I've tried it with AVAssetExportPresetPassthrough but then my solution didn't work anymore):

if let exportSession = AVAssetExportSession(asset: mixComposition, presetName: AVAssetExportPresetHighestQuality) { //DOES NOT WORK WITH AVAssetExportPresetPassthrough

EDIT: https://developer.apple.com/library/archive/qa/qa1744/_index.html

blurtime commented 5 years ago

41 I tweaked my answer on SO such that the video quality isn't reduced if the highest resolution of one of the original videos was 1080p (merged videos are all 1080p according to my solution now).