avcapturesession

How to store video on iPhone while publishing video with RTMPStreamPublisher?

我是研究僧i 提交于 2019-12-20 10:33:08
问题 Right now I am using RTMPStreamPublisher to publish the video at wowzaserver. It's uploading there successfully, but can anyone tell me how I can store the same video on the iPhone while uploading to the server? I am using https://github.com/slavavdovichenko/MediaLibDemos, but there is not much documentation available. If I can just store the data that is sent for publication then my work will be successful. Here is the method they are using to upload the stream, but I can't find a way to

Cropping a captured image exactly to how it looks in AVCaptureVideoPreviewLayer

♀尐吖头ヾ 提交于 2019-12-20 09:39:07
问题 I have a photo app that is using AV Foundation. I have setup a preview layer using AVCaptureVideoPreviewLayer that takes up the top half of the screen. So when the user is trying to take their photo, all they can see is what the top half of the screen sees. This works great, but when the user actually takes the photo and I try to set the photo as the layer's contents, the image is distorted. I did research and realized that I would need to crop the image. All I want to do is crop the full

Show camera stream while AVCaptureSession's running

时间秒杀一切 提交于 2019-12-20 09:31:56
问题 I was able to capture video frames from the camera using AVCaptureSession according to http://developer.apple.com/iphone/library/qa/qa2010/qa1702.html. However, it seems that AVCaptureScreen captures frames from the camera without showing the camera stream on the screen. I would like to also show camera stream just like in UIImagePicker so that the user knows that the camera is being turned on and sees what the camera is pointed at. Any help or pointer would be appreciated! 回答1:

AVCapture appendSampleBuffer

半世苍凉 提交于 2019-12-20 09:24:41
问题 I am going insane with this one - have looked everywhere and tried anything and everything I can thinks of. Am making an iPhone app that uses AVFoundation - specifically AVCapture to capture video using the iPhone camera. I need to have a custom image that is overlayed on the video feed included in the recording. So far I have the AVCapture session set up, can display the feed, access the frame, save it as a UIImage and marge the overlay Image onto it. Then convert this new UIImage into a

AVCAPTURE image orientation

青春壹個敷衍的年華 提交于 2019-12-20 02:34:11
问题 I have a view controller which allows a user to take a picture. I am setting the avcapture bounds to be the bounds of a view on screen. Above this view I have a collection view. So users can capture multiple pictures, they are then added to the collection view above. I am having trouble with the correct orientation appearing in my preview above. Code is as follows: @IBOutlet weak var imagePreviews: UICollectionView! @IBOutlet weak var imgPreview: UIView! var session: AVCaptureSession? var

How do I record a video on iOS without using a preset?

大憨熊 提交于 2019-12-20 01:39:46
问题 The simpler way to record a video on iOS is by setting a AVCaptureSession.sessionPreset. But that doesn't work for me since I want to control parameters like binning, stabilization (cinematic, standard, or none) and ISO. I find the format I want and assign it to activeFormat, but when I try to start recording, I get an error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureMovieFileOutput startRecordingToOutputFileURL:recordingDelegate:] No

AVCapture Session To Capture Image SWIFT

坚强是说给别人听的谎言 提交于 2019-12-19 06:19:40
问题 I have created an AVCaptureSession to capture video output and display it to the user via UIView. Now I want to be able to click a button (takePhoto method) and display the image from the session in an UIImageView. I have tried to iterate through each devices connection and try to save the output but that hasnt worked. The code I have is below let captureSession = AVCaptureSession() var stillImageOutput: AVCaptureStillImageOutput! @IBOutlet var imageView: UIImageView! @IBOutlet var cameraView

ios AVCaptureVideoPreviewLayer capture current image

家住魔仙堡 提交于 2019-12-19 05:06:09
问题 Once the default iPhone Camera app takes a photo, a preview appears and the image animates to the camera roll button. I am trying to replicate this animation. session = [[AVCaptureSession alloc] init]; session.sessionPreset = AVCaptureSessionPresetPhoto; CALayer *viewLayer = self.vImagePreview.layer; NSLog(@"viewLayer = %@", viewLayer); captureVideoPreviewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session]; captureVideoPreviewLayer.frame = CGRectMake(0, 0, 322, 425); [self

AVAudioSession setCategory not working

有些话、适合烂在心里 提交于 2019-12-19 03:18:39
问题 I have a video capturing app and I want to be able to play background music while recording audio+video. I can accomplish this if I set the AVAudioSession category to PlayAndRecord in didFinishLaunchingWithOptions . However, this causes a glitch in the audio whenever the view with the camera enters or exits the foreground, and its apparently impossible to get rid of: https://forums.developer.apple.com/message/74778#74778 I can live with the glitch if it just happens when I start/stop

Video Saving in the wrong orientation AVCaptureSession

本秂侑毒 提交于 2019-12-18 12:56:18
问题 I'm trying to record a video (without displaying the camera) and save it. But the video being saved is not saving in the right orientation. I've tried forcing the UIViewController to be a certain orientation but that didn't help. All videos are being recorded in portrait. My code is below: session = [[AVCaptureSession alloc] init]; [session beginConfiguration]; session.sessionPreset = AVCaptureSessionPresetHigh; AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType