Problems when capturing video using AVCaptureVideoDataOutput and AVCaptureAudioDataOutput - ios

fellow developers!
I am working on an application for photo and video shooting with the ability to apply filters of the Core Image to frames right during shooting. Rendering and displaying frames using MTKView/Metal.
Everything seems to work well, but I ran into an unpleasant problem: Randomly, from time to time, video recording turns out to be "broken" and the native video player does not open it. In order not to clog up the space here, I pulled the problematic pieces of code into a separate project and posted them on GitHub: https://github.com/VKostin8311/LiveEffectCamera.git .
I hope someone can help me. Thank you in advance!

Related

Vuforia video playback video detection issue

I am trying to detect 30 targets and play different video for each target. The problem I am facing is after some 20 images, somehow the videos dont play(I get a cross sign).
Also is there some way to load a video that is required to play and unload others, so that the videos dont hang after some time.
Any help or pointers in right direction highly appretiated.

vuforia video playback 4.2.3 , video disappears when the reference image is removed

I'm using vuforia videoplayback 4.2.3 for playing a video in texture. It works fine as long as the reference image is kept. But if the reference image is removed the video disappears. My requirement is to continue playing the video even if the reference image is removed. I enabled "extended tracking" but nothing happened. In many youtube videos I saw 3D images working after the reference image is removed but not for videos. Pls help. Thanks.
I use an auxiliar boolean variable, that changes calue when video is playing and the tracking is OK. So when tracking is lost, instead of stop rendering, you put the plane that has the videotexture in a fixed place and scale, looking to the camera. Then when tracking is positive you get the video asset (plane) tracked to the marker.
Hope you got the idea, and still need this advice.

Use a Video as Landing Page background (as seen in Spotify, Twitter or Vine)

I'd like to set a video as background to a view. I found multiple solutions, each one with great drawbacks, like:
Using MPMoviePlayerController, it works ok. The video has the best quality, however it uses a lot of cpu (~50% on my mac). I didn't dare to test it on my phone.
Converting the video to a .gif and displaying it with a UIWebView. This is a great solution, but i couldn't make a high quality gif. The video has lots of movement which is not suited for gif files.
Is there a better solution? I'd appreciate any help. Thanks.
I did that before using AVPlayer. It was since iOS 4 (long time ago), and it didn't cause any noticeable effect on the performance.

iOS: Draw on top of AV video, then save the drawing in the video file

I'm working on an iPad app that records and plays videos using AVFoundation classes. I have all of the code for basic record/playback in place and now I would like to add a feature that allows the user to draw and make annotations on the video—something I believe will not be too difficult. The harder part, and something that I have not been able to find any examples of, will be to combine the drawing and annotations into the video file itself. I suspect this is part is accomplished with AVComposition but have no idea exactly how. Your help would be greatly appreciated.
Mark
I do not think that you can actually save a drawing into a video file in iOS. You could however consider using a separate view to save the drawing and synchronize the overlay onto the video using a transparent view. In other words, the user circled something at time 3 mins 42 secs in the video. Then when the video is played back you overlay the saved drawing onto the video at the 3:42 mark. It's not what you want but I think it is as close as you can get right now.
EDIT: Actually there might be a way after all. Take a look at this tutorial. I have not read the whole thing but it seems to incorporate the overlay function you need.
http://www.raywenderlich.com/30200/avfoundation-tutorial-adding-overlays-and-animations-to-videos

Is there any lib that recognize object from camera?

I'm currently working on a project which part of it needs some level of AI. End user pointing iOS camera to a pre recorded video, the screen is very large so they can only frame part of the entire video. They can move their iPhone and shoot any part of the video and the app will automatically recognize what they aiming for and fire a match event.
To sum up
Is there a lib can recognize predefined object from video source?
I've heard of people getting OpenCV to compile on the iPhone. I am not quite clear on what you will be able to do with it, but I would certainly check it out.
yes OpenCv
http://www.eosgarden.com/en/opensource/opencv-ios/overview/
http://www.youtube.com/watch?v=xzVXyrIRm30&feature=player_detailpage

Resources