Open chrisedington opened 1 year ago
Hi @chrisedington!
Thanks for the info. Do you have any chance to provide logs?
@AndrewShapovalov can try - what source or kind of logs would you be looking for?
@AndrewShapovalov can try - what source or kind of logs would you be looking for?
Debug logs from Xcode (Debug area) while the problem happens.
Hi @chrisedington!
Some update from my side - tried to reproduce the bug on iPhone X with iOS version 16.1
but without luck.
I have same problem. I write Test Environment and Error log below.
Test Env.
Device: iPhone 11, iOS 15.6.1 
Video Resolution: 720x1280
 Bug Reproduce 
when preview screen's size is matched on iphone screen. It happened image capture action is too slow or flashing.
Debug Log:
 2023-01-04 17:08:15.173949+0900 ivsTest[3973:200261] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
 ...... above message is repeated
Hi @wizfinder, thanks for the report!
Is the same or any other error in the onBroadcastError
event handler?
Hi @chrisedington @wizfinder! Me again.
It appears to be an internal issue, but since I am unable to reproduce it, could you please check the repository containing sample native apps that use the Amazon IVS Broadcast iOS SDK and see if you can reproduce the problem by running BasicBroadcast
sample app?
Hi @chrisedington @wizfinder! Me again.
It appears to be an internal issue, but since I am unable to reproduce it, could you please check the repository containing sample native apps that use the Amazon IVS Broadcast iOS SDK and see if you can reproduce the problem by running
BasicBroadcast
sample app?
When I build BasicBroadcast and run, I don't have errors. Only I have errors in ReactNative env with iPhone 11. and In iPad Mini(6 Gen.), I don't have errors in ReactNative env.
@wizfinder hi! Thanks for the update!
Do you face the same type of error by running Amazon IVS React Native Broadcast Example App?
Could you also provide detailed props configuration you pass to IVSBroadcastCameraView
component (e.g. videoConfig
, audioConfig
, configurationPreset
and others) please?
I don't face the same error with Aws IVS ReactNative Broadcast Example App.
I wrote test code below. if width and height value are less than about 300, it works well.
const videoConfig = {
width:720,
height:1280,
bitrate: 7500000,
targetFrameRate: 30,
keyframeInterval: 2,
isBFrames: true,
isAutoBitrate: true,
maxBitrate: 8500000,
minBitrate: 1500000
}
......
<SafeAreaView>
<IVSBroadcastCameraView style={{width:"100%", height:"100%"}}
//<IVSBroadcastCameraView width={300} height={300}
ref={cameraViewRef}
videoConfig={videoConfig}
onIsBroadcastReady={onIsBroadcastReadyHandler}
onBroadcastAudioStats={onBroadcastAudioStatsHandler}
onBroadcastError={(e) => console.log("onBroadcastError", e)}
onBroadcastStateChanged={(stateStatus, metadata) => console.log("onBroadcastStateChanged", stateStatus, metadata)}
cameraPreviewAspectMode={"fit"}
/>
</SafeAreaView>
@wizfinder @chrisedington I am facing the same issue too.
I don't face the same error with Aws IVS ReactNative Broadcast Example App.
According to the answer you've provided, it appears that the issue might be within the project's codebase rather than with the package. Try experimenting with your component that utilizes the IVSBroadcastCameraView
and configuration to identify possible issues.
I will also play around with the sample app using iPhone 11 to catch any related problems. @wizfinder
Also having this issue, I've not yet been able to find any form of workaround
Hi,
We had the same issue and found that setting the width and height of broadcast to 320 worked for iPhone6 and around 400->500 on iphonex. If not the component will flash or hang.
Have not looked into the underlying native code to understand what is causing it yet.
Kim
I have been testing a variety of configuration changes and it seems somehow related to the total number of pixels being rendered? I have been unable to find any workaround for the affected devices other than reducing streaming quality, so on iphone6/7 its 320p which would be great to increase :)
Anyone had any luck figuring it out?
Hi, @AndrewShapovalov I'm encountering the same issue with the Amazon IVS React Native Broadcast Example App. I've reproduced the problem on an iPhone XS (iOS 16.0.3) and an iPad Mini 5 (iPadOS 16.6). Following the IVS Broadcast SDK guidelines, I made some code modifications and the issue no longer occurs; everything runs smoothly.
// ios/IVSBroadcastCameraView/IVSBroadcastSessionService.swift
private func getCameraPreview() -> IVSImagePreviewView? {
// let preview = try? self.broadcastSession?.previewView(with: self.cameraPreviewAspectMode)
// preview?.setMirrored(self.isCameraPreviewMirrored)
// return preview
let preview = try? self.broadcastSession?.listAttachedDevices().compactMap({ $0 as? IVSImageDevice }).first?.previewView(with: self.cameraPreviewAspectMode)
preview?.setMirrored(self.isCameraPreviewMirrored)
return preview
}
Could you please review the changes to see if there might be any potential drawbacks?
Thanks @dongchan0321 for this potential fix, did you have any experience with your change and if it all works ok with this implementation?
I have tested the prolonged video streaming push on the same device where the issue was originally reproduced, and I haven't encountered any new problems so far. I plan to conduct further testing using devices of different models. I am not a professional iOS developer, and this code segment originates from the IVS Broadcast SDK. After consulting the documentation, I was unable to identify the root cause of the issue.
Thanks @dongchan0321 for this potential fix, did you have any experience with your change and if it all works ok with this implementation?
Thank you for replying! Yes I have tested on the devices we had issues with before and it seems to work perfectly. Now, we will also do some more testing across devices to validate before pushing it into production.
Very happy you found this, as its been a bit of a hindrance for us. Even on devices like iphone 11 pro we had to reduce resolution of streaming in order to work around the issue.
Hello everyone,
Thank you all for your valuable input and code suggestions. I've taken your feedback into consideration and made changes to the same getCameraPreview
method. Instead of using the first attached device in the list, I now use the attachedCameraUrn
variable, which I believe is a more robust solution.
You can now try out these changes via NPM using the next
dist-tag.
yarn add amazon-ivs-react-native-broadcast@next
Please, give it a try and provide feedback on your experiences.
Hello everyone,
Thank you all for your valuable input and code suggestions. I've taken your feedback into consideration and made changes to the same
getCameraPreview
method. Instead of using the first attached device in the list, I now use theattachedCameraUrn
variable, which I believe is a more robust solution.You can now try out these changes via NPM using the
next
dist-tag.yarn add amazon-ivs-react-native-broadcast@next
Please, give it a try and provide feedback on your experiences.
Hello, thank you for your fix. After conducting a brief real-device test, we have found that the devices that previously had issues are now functioning correctly. We have limited time for further testing at the moment, but we plan to perform additional validation with more devices in the future.
As an fyi: With the new code from next it seems the ios simulators are unable to get the camera preview. Whereas it works ok on devices. I am unsure if this is some behaviour locally on my side or not, using latest xcode.
I used amazon-ivs-react-native-broadcast, and after running pod install, the project crashed immediately. My Xcode version is 14.3, and I'm using the iOS 14 Pro simulator with macOS version 16.4.
I used amazon-ivs-react-native-broadcast, and after running pod install, the project crashed immediately. My Xcode version is 14.3, and I'm using the iOS 14 Pro simulator with macOS version 16.4. I encountered the same issue with the demo project provided by the amazon-ivs-react-native-broadcast library. I also created an empty project, added amazon-ivs-react-native-broadcast as a dependency, and faced the same error.
Hi @AndrewShapovalov
Me again 😅 I found an issue where on two sets of iPhone X and using the sample, the camera flashes green colors and freezes.
https://user-images.githubusercontent.com/2725500/202445677-8802a520-f814-41a5-bf1d-9190ad68b545.MOV