avfoundation

Xcode ios: Streaming of video file while recording and removed redundant personal statements

北城以北 提交于 2019-12-03 04:05:05
Can anybody suggest how I can upload video file while recording. As I am recording video using AVFoundation this will save video to some file eg. record.mov . Now my query is how I can upload this video while recording, as I want to save user time as soon as user record his/her video should be uploaded. Right now I am trying with HTTP, File stream to upload video. I have found solution to capture videos frame while recording using AVFoundation Apple provided this sample code http://developer.apple.com/library/ios/#samplecode/RosyWriter/Introduction/Intro.html 来源: https://stackoverflow.com

create video from array of UIImages and save the video to iPhone library. AVAssetLibrary +AVFoundation

强颜欢笑 提交于 2019-12-03 04:04:32
问题 Problem in saving video to iPhone Library. i have an array of UIImages,and two buttons ,"convertToVideo"&"saveToiPhoneLib" -(IBAction) convertToVideo { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = ([paths count] > 0) ? [paths objectAtIndex:0] : nil; NSString *savedVideoPath = [documentsDirectory stringByAppendingPathComponent:@"videoOutput"]; printf(" \n\n\n-Video file == %s--\n\n\n",[savedVideoPath UTF8String])

How to mirror iOS screen via USB?

会有一股神秘感。 提交于 2019-12-03 04:01:21
I'm trying to mirror iOS device screen via USB connection to OSX. QuickTime does this fine, and I read this article with a code example: https://nadavrub.wordpress.com/2015/07/06/macos-media-capture-using-coremediaio/ However, the callback of CMIOStreamCopyBufferQueue is never called and I'm wondering what am I doing wrong? Have anyone faced this issue and can provide a working example ? Thanks. Marat Strelets Well.. eventually I did what Nadav told me in his blog - discover DAL devices and capture their output using AVCaptureSession like this: -(id) init { // Allow iOS Devices Discovery

Can I use AVCaptureSession to encode an AAC stream to memory?

我怕爱的太早我们不能终老 提交于 2019-12-03 03:59:10
问题 I'm writing an iOS app that streams video and audio over the network. I am using AVCaptureSession to grab raw video frames using AVCaptureVideoDataOutput and encode them in software using x264. This works great. I wanted to do the same for audio, only that I don't need that much control on the audio side so I wanted to use the built in hardware encoder to produce an AAC stream. This meant using Audio Converter from the Audio Toolbox layer. In order to do so I put in a handler for

how to control orientation of video assembled with AVMutableComposition

放肆的年华 提交于 2019-12-03 03:58:56
问题 I am assembling a bunch of video clips filmed on the iPhone in portrait mode. To assemble them I am taking straightforward approach as follows: AVURLAsset to get hold of the different videos then shoving these into an AVMutableCompositionTrack and then putting this into an AVMutableComposition which I'm exporting to file with AVAssetExportSession My problem is that when I come to display the video in a UIWebView, it is appearing in landscape mode. However, if I view any of the component views

merging videos together (AVFoundation)

最后都变了- 提交于 2019-12-03 03:55:59
In my app, I'm recording small videos and adding them into an NSMutableArray as AVAsset so that i keep record of what has been captured. when the user press a button to merge them, the final result is only the first video taken (example, if three short videos where taken, the final result after merging is only the first video and the others do not appear). my code on iterating in the NSMutableArray and stitching the videos together is here: if (self.capturedVideos.count != 0) { //Create AVMutableComposition Object.This object will hold our multiple AVMutableCompositionTrack.

Record Audio/Video with AVCaptureSession and Playback Audio simultaneously?

给你一囗甜甜゛ 提交于 2019-12-03 03:55:54
I'm trying to create an iOS app which can record audio and video while simultaneously outputting audio to the speakers. To do the recording and preview, I'm using AVCaptureSession , an AVCaptureConnection each for both video and audio, and an AVAssetWriterInput each for both video and audio. I basically achieved this by following the RosyWriter example code. Prior to setting up recording in this fashion, I was using AVAudioPlayer to play audio. Now, if I am in the middle of capturing (not even recording, just capturing for preview), and attempt to use AVAudioPlayer , my captureOutput callbacks

Play AVMutableComposition with AVPlayer?

自闭症网瘾萝莉.ら 提交于 2019-12-03 03:54:30
I'm trying to get two videos to play sequentially. I've tried AVQueuePlayer but there's a huge "burp" between the two clips. I need to them to play without interruption. So I'm trying to use AVMutableComposition and an AVPlayer but can't get it right. Here's my code (ignore memory leaks, just testing in an empty project..): composition = [[AVMutableComposition alloc] init]; NSString * path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"mp4"]; NSURL * url = [NSURL fileURLWithPath:path]; AVURLAsset * asset = [[AVURLAsset alloc] initWithURL:url options:nil]; NSError * error = NULL;

AVVideoCompositionCoreAnimationTool and CALayer in portrait mode?

烂漫一生 提交于 2019-12-03 03:44:05
问题 I'm trying to bake a CALayer into portrait-mode video (on export) using an AVMutableComposition, an AVMutableVideoComposition and a AVVideoCompositionCoreAnimationTool on iOS 4.3. This all works in landscape. If I capture video in portrait, however, the AVVideoCompositionCoreAnimationTool is ignoring the transform on the video track. That is, for portrait-mode video, I am setting AVMutableCompositionTrack.preferredTransform to the preferredTransform value from the original asset video track.

Fast switching between videos using AVFoundation

我的梦境 提交于 2019-12-03 03:39:22
I'm writing an application where the user can record up to 6 video clips each with a duration of 2 seconds. When the video clips are recorded the user can play with them using 6 buttons - one for each clip. The user can then record a movie by switching between the 6 clips. The problem is that I need near instantaneous switching between the 6 clips when the user presses a button - otherwise the illusion of playing with the clips is lost - the functionality is somewhat similar to the app called CamBox in the App Store. I first tried initializing every clip with and AVAsset in an AvPlayerItem in