avassetexportsession

AVAssetExportSession never starts on older devices, device needs to be rebooted

Deadly 提交于 2021-02-05 11:29:28
问题 On iPhone 7 and iPadPro 9.7, running iOS 14.3, the AVAssetExportSession never starts exporting when calling exportSession.exportAsynchronously , it simply appears to be stuck with no error messages describing what is wrong. If we reboot those devices, and run exportSession.exportAsynchronously , then the export starts immediately and completes successfully. The issue does not occur on my iPhone 12 Pro. It appears to be a bug in iOS 14.3 as is reported at the below link. But, I cannot find the

AVAssetExportSession not working on devices, but working on simulator (AVFoundationErrorDomain Code = -11800, Unknown Error code -12780)

一曲冷凌霜 提交于 2021-02-05 09:23:58
问题 EDIT: To make things easier to anyone interested in checking out this problem, I added a demo project to this github repository. Issue I've seen several questions that had the same error, but none of the solutions found there helped me. Figured I'd try my luck. I'm trying to export a video as is, mainly to learn about AVFoundation and AVAssetExportSession. My export works perfectly fine on the simulator, but does not work on any iOS device I've tried (namely an iPhone X and an iPhone XR

AVExportSession | Add UIView with GIFs and drawings on a video

一个人想着一个人 提交于 2021-01-16 04:23:11
问题 Objective : I have a Video over which I have a UIView which contains animated GIFs(not locally stored, but using giphy api), Texts, or hand drawings. I want to export this along with the image in a single video. What I did : I created a UIView on which the animations are. Then converted that to CALayer and added to video with AVMutableVideoCompotion. Problem : The UIView with animations is being converted to an Image instead of a video. How can I solve this. Below is the Program for my export

Exporting time lapse with AVAssetExportSession results in black video

佐手、 提交于 2020-12-25 01:11:50
问题 I need to be able to merge videos taken with the time lapse function in the Camera app on iOS and export as a single video. However, even if I try to export a single, unchanged time lapse video to the Photo Library, it saves as a completely black video (with the correct duration). Here is the sample code I wrote to just export a single, unchanged video (most of which is adapted from a Ray Wenderlich tutorial): @IBAction func saveVideo(_ sender: UIBarButtonItem) { // 1 - Early exit if there's

Exporting time lapse with AVAssetExportSession results in black video

我怕爱的太早我们不能终老 提交于 2020-12-25 01:08:14
问题 I need to be able to merge videos taken with the time lapse function in the Camera app on iOS and export as a single video. However, even if I try to export a single, unchanged time lapse video to the Photo Library, it saves as a completely black video (with the correct duration). Here is the sample code I wrote to just export a single, unchanged video (most of which is adapted from a Ray Wenderlich tutorial): @IBAction func saveVideo(_ sender: UIBarButtonItem) { // 1 - Early exit if there's

Exporting time lapse with AVAssetExportSession results in black video

那年仲夏 提交于 2020-12-25 01:02:13
问题 I need to be able to merge videos taken with the time lapse function in the Camera app on iOS and export as a single video. However, even if I try to export a single, unchanged time lapse video to the Photo Library, it saves as a completely black video (with the correct duration). Here is the sample code I wrote to just export a single, unchanged video (most of which is adapted from a Ray Wenderlich tutorial): @IBAction func saveVideo(_ sender: UIBarButtonItem) { // 1 - Early exit if there's

Exporting time lapse with AVAssetExportSession results in black video

半腔热情 提交于 2020-12-25 01:01:17
问题 I need to be able to merge videos taken with the time lapse function in the Camera app on iOS and export as a single video. However, even if I try to export a single, unchanged time lapse video to the Photo Library, it saves as a completely black video (with the correct duration). Here is the sample code I wrote to just export a single, unchanged video (most of which is adapted from a Ray Wenderlich tutorial): @IBAction func saveVideo(_ sender: UIBarButtonItem) { // 1 - Early exit if there's

how to export video asset via AVAssetExportSession in portrait mode

て烟熏妆下的殇ゞ 提交于 2020-01-27 06:38:04
问题 when i export a video asset via AVAssetExportSession the result file is in landspace mode. (file grabbed via itune->apps->file sharing->my app). how can i export the video asset in portrait mode (rotate it)? 回答1: The video coming from the iPhone capture device are always landscape orientated whatever the device orientation is when capturing. If you want to rotate your video, the 'simple' solution is to assign a transform to the video track of the exported session. Create 2 mutable tracks in

How can I export a AVPlayer audio mp3 file using AVAssetExportSession?

痞子三分冷 提交于 2020-01-22 15:34:05
问题 I am now trying to export an mp3 file that has been player using AVPlayer (using an url) so it doesn't have to be downloaded twice. This is my sample code: I've tried every outputFileType... self.exporter = [[AVAssetExportSession alloc] initWithAsset:self.asset presetName:AVAssetExportPresetPassthrough]; } NSError *error; NSLog(@"export.supportedFileTypes : %@",self.exporter.supportedFileTypes); // "com.apple.quicktime-movie", // "com.apple.m4a-audio", // "public.mpeg-4", // "com.apple.m4v