Bug 27425 - [iOS] Trying to record video and audio while simultaneously displaying a preview results in a frozen preview image
Summary: [iOS] Trying to record video and audio while simultaneously displaying a prev...
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.6.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-25 13:45 UTC by Dominic N [MSFT]
Modified: 2015-05-07 10:28 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Dominic N [MSFT] 2015-02-25 13:45:39 UTC
## Overview

We have a report of a case in which attempting to record video and audio while trying to simultaneously display in real time the video as it is being recorded freezes the preview video on the first frame.

I have been able to reproduce said issue on an iPad Mini 2.


## Steps to reproduce

1. Open sample app
2. Deploy to device
3. Click record button


## Expected results

Preview image at top of screen shows video in real time


## Actual results

Preview image freezes on first frame


## Version information

=== Xamarin Studio ===

Version 5.7.2 (build 2)
Installation UUID: ee07b9c8-41e3-496f-a1ab-e8a3ed3db20f
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.Mac ===

Version: 1.12.0.4 (Business Edition)

=== Xamarin.iOS ===

Version: 8.6.2.22 (Business Edition)
Hash: 862702c
Branch: 
Build date: 2015-02-18 15:19:23-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/dominic/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Build Information ===

Release ID: 507020002
Git revision: d6231e6325f274cea59da478410f561312c5b401
Build date: 2015-02-17 19:04:38-05
Xamarin addins: b212fd66838b0d6e2435966e541e66ab9c988698

=== Operating System ===

Mac OS X 10.9.5
Darwin Dominics-MacBook-Pro.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Mohit Kheterpal 2015-03-05 00:59:17 UTC
I have tired to reproduce this issue but I am getting error 404 when I click on the link of attached sample in comment 1.

So could you please provide test sample to reproduce this issue ? So that we can reproduce this issue at our end.

thanks.
Comment 6 Rolf Bjarne Kvinge [MSFT] 2015-05-07 10:28:26 UTC
You're using two AVCaptureSessions, one to record and one to play the preview.

iOS does not support more than one simultaneous AVCaptureSession. To show a preview, you'll need one AVCaptureSession with two outputs (one output for the preview, one output for the recording), or use a AVCaptureVideoPreviewLayer [1]

[1] https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/04_MediaCapture.html#//apple_ref/doc/uid/TP40010188-CH5-SW22