VideoFlint / Cabbage

A video composition framework build on top of AVFoundation. It's simple to use and easy to extend.
MIT License
1.55k stars 227 forks source link

Sound gone when scaled video #74

Open ahmedsafadii opened 3 years ago

ahmedsafadii commented 3 years ago

When i try to scale video speed it up or slow it the voice is gone but the videos works

let resource = AVAssetTrackResource(asset: asset)
                    resource.scaledDuration = CMTime(seconds: 5.0, preferredTimeScale: 600)
                    resource.duration = CMTime(seconds: 5.0, preferredTimeScale: 600)
                    let trackItem = TrackItem(resource: resource)
                    trackItem.videoConfiguration.contentMode = .aspectFill
ahmedsafadii commented 3 years ago

@vitoziv