Could not calculate the thumbnail size.
alfredolucomav opened this issue · comments
Hello There,
I'm trying to load thumbnails from my video into trim view. But I have the following error: Could not calculate the thumbnail size.
This is my video's location: file:///private/var/mobile/Containers/Data/PluginKitPlugin/D7ABED4E-C54A-4948-B7D3-5587AE62358D/tmp/trim.CCA9A520-F11E-4BA6-A3A8-B15AA9E05CAC.MOV
What could be happening?
Best Regards
Can anybody help me?
please change video to the m4v format. I have same issue.
I had the same problem. You may be setting your trimmerView.asset before the frame is created for the trimmerView. If you want the thumbnail images to show up on the parent view controller when the parent view controller is presented then call trimmerView.asset = asset
in override func viewDidAppear(_ animated: Bool)
Note: I did not have to convert file to m4v format.
@jaredmoskowitz Thanks a lot! It works like a charm!
I had the same problem. You may be setting your trimmerView.asset before the frame is created for the trimmerView. If you want the thumbnail images to show up on the parent view controller when the parent view controller is presented then call
trimmerView.asset = asset
inoverride func viewDidAppear(_ animated: Bool)
Note: I did not have to convert file to m4v format.
I'm facing same issue.
First i tried to load video from bundle and created Asset from bundle URL.
`guard let bundlePath = Bundle.main.path(forResource: "Full_Video_Sample", ofType:"mp4"), let url = URL(string: bundlePath) else {
print("Can not find Full_Video_Samplem4v")
return
}
currentAsset = AVAsset(url: url)
trimmerView?.asset = currentAsset
trimmerView?.delegate = self
addVideoPlayer(with: currentAsset!, playerView: playerView)
trimmerView` is not nil as i created it dynamically in viewDidLoad.
I had the same problem. You may be setting your trimmerView.asset before the frame is created for the trimmerView. If you want the thumbnail images to show up on the parent view controller when the parent view controller is presented then call
trimmerView.asset = asset
inoverride func viewDidAppear(_ animated: Bool)
Note: I did not have to convert file to m4v format.
Thanks @jaredmoskowitz . It worked 👍