VideoFlint / Cabbage

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

Sound gone when scaled video #74

Open ahmedsafadii opened 2 years ago

ahmedsafadii commented 2 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 2 years ago

@vitoziv