Get the accurate duration of a video

This works for me: import AVFoundation import CoreMedia … if let url = Bundle.main.url(forResource: “small”, withExtension: “mp4″) { let asset = AVAsset(url: url) let duration = asset.duration let durationTime = CMTimeGetSeconds(duration) print(durationTime) } For the video here it prints “5.568” which is correct. Edit from comments: A video that returns 707 seconds when divided by … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)