ios - AVFoundation custom compositor not working in ios 8.3 - ios

I've been working on a project using AVFoundation and on that I've been trying to use the AVMutableVideoComposition's customVideoCompositorClass. Everything works fine in ios 9.x and above.
But when I run the same project in an ios 8.3 device (iPhone 5s), only audio plays and video player remains black for the entire composition playing.
Then I tried to run the AVCustomEdit sample code provided by apple which also uses customVideoCompositorClass for video frame processing (Uses opengl es 2.0). Same black thing also happened there too. In this project for texture generation from CVPixelBufferRef it uses CVOpenGLESTextureCacheCreateTextureFromImage and CVOpenGLESTextureCacheRef. Not sure it causes the black issue?
I would be very happy if anyone can suggest me some pointers regarding this. Thanks in advance.

Related

How to play a video in an Unity WebGL build on iOS?

I try this for hours but I can't get it to work. Nothing really special:
Unity WebGL build running on iOS on an iPhone (safari/chrome). It's just a Play-Button an a RenderTexture to render the clip.
The VideoPlayer component looks like this, also nothing special:
Everything works fine on MacOS Safari/Chrome, Android Phones with Chrome Browser or Windows.
Only iOS Devices will not play the clip.
Any suggestions what I could do?
Thanks!
Stephan

setExposureModeLocked does not work for iPhone 11 and above

So, I have an application where I am streaming images and need consistent results across all images even when exposed to bright light(NO AUTO ADJUSTMENTS).
For this I used a AVFoundation as follows:
[device setExposureMode:AVCaptureExposureModeLocked];
This works great for any model below iPhone 11.
It seems like the newer camera modules do not react the same to the functions called in AVFoundation as the older ones. In these images the first 2 has the flash on and after the flash is turned off.Here is an example of any iPhone below the 11.
Here is an example of any iPhone 11 and above.
As you can see they do not lock the same way. If anyone has a similar issue please share your experience or comment what you think may help.
Thanks in advance.

WebRTC iOS 13 Simulator - Red Screen H264 Decoding

My problem is that H264 WebRTC Video is playing on iOS 13 in real device as expected.
But it does not play in iOS 13 simulator. It shows red screen as shown in the image.
Audio is playing correctly. Logs also show that decoding of frames are succesful at correct rate.
GoogleWebRTC version is 1.1.29229 from cocoapods
I got the same issue in our app.
It seems to be a bug on the WebRTC side.
I was able to reproduce it in their test app (AppRTCMobile), and posted a bug report about it here:
https://bugs.chromium.org/p/webrtc/issues/detail?id=11012
Please star it there :)
In the meantime it seems that forcing the codec to VP8 should fix the problem on the simulator (as a temporary workaround).

Why does navigator.device.capture.captureVideo sometimes show the Picture Camera instead of the video camera?

Sometimes when calling navigator.device.capture.captureVideo() in my iOS PhoneGap application the picture camera comes up instead of the video camera. Any idea why this might be happening?
It seems like it may be a memory issue as it does happen after a TokBox WebRTC chat session quite frequently, but we have also experienced it at other times as well.
Using iOS 5 & 6, PhoneGap 2.1 and the OpenTok PhoneGap plugin.
When OpenTok runs, it opens up a view to capture video in order to stream it, putting the camera in video mode. When you then call navigator.device.capture.captureVideo, phonegap could be flipping the camera in their sdk but I dont know for sure.
Either way, this should be resolved with the latest OpenTok SDK and Cordova framework.

Getting iOS 5 AVPlayer to display the last frame of the video when playback completes instead of a black screen

I am making some modifications to an iPad app written by somebody else and one of the things I need to fix is that the video needs to continue to show the last frame when playback is complete rather than the screen just going black.
On the iPad simulator using iOS 4.3, this is exactly what it does already, but it just goes black on iOS 5 (on both the simulator and a device).
Any suggestions on the best way to achieve this so that it works for iOS 5? The code is using AVQueuePlayer.
I eventually found the solution:
[player setActionAtItemEnd:AVPlayerActionAtItemEndPause];
I'd already tried this and discarded it as not working, but I think I made the mistake of not setting it via the setter.

Resources