An iOS Framework Capture & record ARKit videos πŸ“Ή, photos πŸŒ„, Live Photos πŸŽ‡, and GIFs πŸŽ†.

Overview

Use swift_4_2 branch for projects written in Swift 4.2

Use master branch for projects written in Swift 4.0

Sponsors

Chemical Wedding

Chemical Wedding

ARVideoKit

intro image

An iOS Framework that enables developers to capture videos πŸ“Ή , photos πŸŒ„ , Live Photos πŸŽ‡ , and GIFs πŸŽ† with ARKit content.

In other words, you NO LONGER have to screen record/screenshot to capture videos πŸ“Ή and photos πŸŒ„ of your awesome ARKit apps!

Table of Contents Description
Documentation Describes the configuration options ARVideoKit offers
Preview Displays 2 GIF images captured using the supported gif method in ARVideoKit
Key Features Lists the key features ARVideoKit offers
Compatibility Describes the ARVideoKit device and iOS compatibality
Example Projects Explains how to run the example project provided in this repository
Installation Describes the Cocoapods, Carthage & Manual options to install ARVideoKit
Implementation Lists the steps needed for Objective-C & Swift, notes, and reference for more options
Publishing to the App Store Describes the steps required before submitting an application using ARVideoKit to the App Store.
Donate Donations will support me to keep maintaining ARVideoKit ❀️
Sponsors Featuring the sponsors of this project
Contributions Describes how you can contribute to this project
Apps using ARVideoKit A list of published applications using ARVideoKit
License Describes ARVideoKit license
AppCoda Tutorial Check out a detailed tutorial about implementing ARVideoKit with SpriteKit ☺️

Preview

πŸ‘Ύ Initialized with SpriteKit πŸ‘‡ πŸš€ Initialized with SceneKit πŸ‘‡
SpriteKit Preview SceneKit Preview

Key Features

βœ… Capture Photos from ARSCNView, ARSKView, and SCNView

βœ… Capture Live Photos & GIFs from ARSCNView, ARSKView, and SCNView

βœ… Record Videos from ARSCNView, ARSKView, and SCNView

βœ… Pause/Resume video

βœ… Allow device's Music playing in the background while recording a video

βœ… Returns rendered and raw buffers in a protocol method for additional Image & Video processing

Compatibility

ARVideoKit is compatible on iOS devices that support both ARKit and Metal. Check Apple's iOS Device Compatibility Reference for more information.

ARVideoKit requires:

  • iOS 11
  • Swift 3.2 or higher

Example Projects

To try the example project, simply clone this repository and open the Examples folder to choose between the Objective-C and Swift project files.

Installation

Cocoapods

  1. Add this line to your project's Podfile (for Swift 5.0)
pod 'ARVideoKit', '~> 1.5.51'

  1. Install the pod
$ pod install

Carthage

  1. Add this line to your project's Cartfile
1.31 ">
github "AFathi/ARVideoKit" ~> 1.31
  1. Update your Carthage directory
$ carthage update

Swift Package Manager (available Xcode 11.2 and forward)

  1. In Xcode, select File > Swift Packages > Add Package Dependency.
  2. Follow the prompts using the URL for this repository.

Manual

Drag ARVideoKit.xcodeproj into your project and click the + button in the embedded binaries section of your project's target. example embed framework

Implementation

Swift

Click here to check the Swift implementation steps.

Objective-C

Click here to check the Objective-C implementation steps.

NOTE

Make sure you add the usage description of the camera, microphone, and photo library in the app's Info.plist.

NSCameraUsageDescription
AR Camera
NSPhotoLibraryAddUsageDescription
Export AR Media
NSPhotoLibraryUsageDescription
Export AR Media
NSMicrophoneUsageDescription
Audiovisual Recording

Info Plist Screenshot

You're all set. πŸ€“

Check RecordAR documentation for more options!

Publishing to the App Store

Before publishing to the App Store make sure to add the ARVideoKit License to your app licences list.

  1. Build ARVideoKit for release

Open ARVideoKit.xcodeproj

Select ARVideoKitRelease scheme with Generic iOS Device

Build the project (cmd + B)

Right click on Products/ARVideoKit.framework -> Show in finder

Copy and replace ARVideoKit.framework in your project

Additionally, if you are using the binary build from Framework Build or the latest release, you MUST strip out the simulator architectures from the framework before pushing an application to the App Store.

To do so, follow those steps:

  1. Install Carthage

Download Carthage.pkg from here

Or install with Homebrew using this command brew install carthage

  1. Go to your project target's Build Phase

screen shot 2017-11-14 at 8 21 44 pm

  1. Add a new Run Script Phase

screen shot 2017-11-14 at 8 22 14 pm

  1. Add the following command to the Run Script Phase
/usr/local/bin/carthage copy-frameworks

screen shot 2017-11-14 at 8 30 12 pm

  1. Finally, add ARVideoKit.framework file path as an Input File. In my case, I have it in a folder named Frameworks inside my project folder

screen shot 2017-11-14 at 8 41 06 pm

Donate

Donations will support me to keep maintining ARVideoKit Framework ❀️

Donate

Contributions

If you have an idea for a new ARVideoKit feature/functionality and want to add it to this repository, feel free to fork the project and create a pull request!

Also, feel free to create an issue if you have any suggestions or need any help ☺️

Apps using ARVideoKit

App Description
Our SolAR An app that allows you to see our Solar System anywhere at all!
In The Walls Uses real time face tracking and AR to put your face in any real world wall!
ScribScrab ScribScrab is a tool for creativity. You’re only limited to your imagination and your battery life.

Feel free to add your application to this list!

License

ARVideoKit Framework

Copyright 2018 Ahmed Fathi Bekhit, www.ahmedbekhit.com, [email protected]

ARVideoKit is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

ARVideoKit Logo & Header

Designed by Gabriel Garcia and licensed under the Creative Commons Attribution 4.0 International License DERECHOS.jpg

Comments
  • Logo proposal for ARVideoKit

    Logo proposal for ARVideoKit

    Hello, I'm a graphic designer and I like to collaborate with open source projects. I would like to design a logo for your Project I will be happy to collaborate with you :)

    opened by ggabogarcia 27
  • memory isssue cause  crash (Terminated due to memory issue)

    memory isssue cause crash (Terminated due to memory issue)

    DebugInfo

    func frame(didRender buffer: CVPixelBuffer, with time: CMTime, using rawBuffer: CVPixelBuffer) { if capture != nil { capture?.didCaptureCVPixelBufferRef(buffer, time: time, usingRowBuffer: rawBuffer) } } I use WebRTC capture and send CVPixelBuffer. I update ARVideoKit.framework yesterday afternoon , and memory isssue cause crash . It seems to be in Function: CVPixelBufferCreate , CVPixelBufferBacking::initWithPixelBufferDescription,CVPixelBufferStandardMemoryLayout

    opened by UninhibitedSoul 7
  • 'RecordARDelegate' is unavailable: cannot find Swift declaration for this protocol

    'RecordARDelegate' is unavailable: cannot find Swift declaration for this protocol

    I followed the first setup instructions and when I did so it ran fine on my physical device, however, its not able to complile on the simulators. How can I work around this problem as I still need to test other aspects of my app on the simulator. Thanks

    opened by Cez95 7
  • Any plans to support Objective-C?

    Any plans to support Objective-C?

    Hi,

    Thanks for the awesome work. Recently I started using ARKit and ARVideoKit and because of the usage of Swift, my app got bloated up in size. So I'd like to implement ARKit on Objective-C, and would like to know if you have any plans on supporting ARVideoKit in it?

    Thanks.

    opened by adarsh431 7
  • Stretching on iPhone X

    Stretching on iPhone X

    The underlying image and the SceneKit content are misaligned on the iPhone X (I presume because of the different aspect ratio of the display). It looks like the SceneKit content is rendered too wide relative to the camera image.

    Here's an example. First is a screenshot of what it looks like in the app. Second is an image exported from ARVideoKit (videos have the same issue; was just easier to demonstrate with a photo):

    img_0163 img_0162

    bug help wanted 
    opened by yeldarby 7
  • Fixing bug with rotation of the views and #114

    Fixing bug with rotation of the views and #114

    1. The library was rotating all views reacting to rotation events. This is done automatically by iOS, the library must not do that.

    2. The library was force rotating the device when recorded is initialized. It's not needed.

    opened by seriyvolk83 5
  • Fix memory leaks

    Fix memory leaks

    FIX MEMORY LEAKS:

    • Parent view reference must be weak
    • Use weak proxy to broke memory leak with CADisplayLink
    • Use private properties in place of global
    opened by asam139 5
  • Failed to verify bitcode

    Failed to verify bitcode

    I use ARVideoKit.framework of version 1.12 My Xcode enable bitcode is false Fastlane failed : error: exportArchive: Failed to verify bitcode in ARVideoKit.framework/ARVideoKit: error: Cannot extract bundle from /var/folders/45/sr50c3y14sxcsdgn_q1gr9200000gn/T/XcodeDistPipeline.Xzl/Root/Payload/xxxxxx.app/Frameworks/ARVideoKit.framework/ARVideoKit (i386)

    opened by onlyibin 5
  • possible to capture just the video without the AR overlay?

    possible to capture just the video without the AR overlay?

    If I want to only capture the video stream without the AR overlay, can I do it?

    I want to use AR to guide video recording, but I don't want to record the AR overlay.

    Thanks!

    opened by shi-yan 4
  • SceneView AR objects stretched on iPhone 7/8 Plus devices running iOS 12

    SceneView AR objects stretched on iPhone 7/8 Plus devices running iOS 12

    Hello AFathi, we've been using your ARVideoKit in our app and it's super great! But we have run into a bug with iPhone 7/8 Plus devices running iOS 12.

    We are finding that the recorded video on an iPhone 7/8 Plus is being captured at 4:3 aspect ratio, with the AR objects in the SceneView stretched (width). This is a new problem that has only occurred since the release of iOS 12- other devices running iOS 12 are fine, and so are Plus devices running iOS 11.

    The live AR view appears fine, and I have confirmed that the SceneView is indeed matching the devices screen size, but the recorded video adds a little bit to the left and right edges of the view, outside of what is seen in the live view. The AR objects in the outputted video are stretched to match the extra width.

    Any thoughts on what might be going on?

    opened by pptlabs 4
  • Get video stream in real time

    Get video stream in real time

    Thank you for sharing this framework which is really usefull !

    I have seen that your func record() starts or resumes recording a video but we can access to the video only when we stop recording. In my case, I need to get the video stream from ARkit continuously and in real time (streaming app). How to get the stream please ?

    Eric

    opened by drawItForMe 4
  • feat: better fps and capture performance

    feat: better fps and capture performance

    I am providing frames to the writer in BGRA instead of RGBA to get realtime encoding speed. It goes from 20 to around 50-60 fps for me, thought you may need it :)

    opened by mikolajadamowicz 0
  • when use ARVideoKit to record an  ARSCNView, the loaded AR object shows black in the scene

    when use ARVideoKit to record an ARSCNView, the loaded AR object shows black in the scene

    Dear Author, I meet an issue, when use ARVideoKit to record an ARSCNView, the loaded AR object shows black in the scene. need your support, thank you very much! I also sent the recorded video to your email([email protected]).

    opened by arstudio-guru 4
  • App freezes for a moment when starting recording

    App freezes for a moment when starting recording

    I am trying to record ARSKView with RecordAR. The problem I am facing is that every time I call RecordAR.record()the app freezes for a moment. Also, text-to-speech pronunciation is very laggy if I call it right after the record function.

    Is there any way to avoid this issue? I couldn't find any possible way to prevent this issue in docs and in the internet. Any feedback is highly appreciated, thank you!

    opened by nazdream 3
  • Surface shader result not recorded.

    Surface shader result not recorded.

    Issue environment:

    Device Model: iPhone mini running iOS 15 Xcode Version: Xcode 13 iOS Version: iOS 15 Pod Version or Repo Commit: Issue Details: I record the scene where I play a video ver a SCNPlane in which I remove green background of video using surface shader. This cause recorded video to have a white background instead of transparent one. Any ideas why shader result is not recorded? IMG_5887 IMG_5889

    opened by ozgurshn 3
  • pod installation issue

    pod installation issue

    When run app using pods then the video exported is of different size compared to video exported during manual adding of framework in Swift package Manager.

    Any help please...

    opened by Anu150030170 2
Releases(1.6.0)
Owner
Ahmed Bekhit
Maker of appsπŸ“±. Breaker of nils πŸ›‘.
Ahmed Bekhit
Sample iOS AR app that demonstrates how to capture the texture of a user's face in realtime.

Sample iOS AR app that demonstrates how to capture the texture of a user's face in realtime. This texture can be used to create a simple textured 3D face model.

Matt Bierner 58 Dec 14, 2022
ARID - Augmented Reality app using Apple’s ARKit framework which can recognise faces of famous scientists

ARID Augmented Reality app using Apple’s ARKit framework which can recognise fac

Hemanth 0 Jan 12, 2022
A library that allows you to generate and update environment maps in real-time using the camera feed and ARKit's tracking capabilities.

ARKitEnvironmentMapper Example To run the example project, clone the repo, and run pod install from the Example directory first. Installation ARKitEnv

SV Hawks 91 Dec 4, 2022
A library that allows you to generate and update environment maps in real-time using the camera feed and ARKit's tracking capabilities.

ARKitEnvironmentMapper Example To run the example project, clone the repo, and run pod install from the Example directory first. Installation ARKitEnv

SV Hawks 91 Dec 4, 2022
Using ARKit and LiDAR to save depth data and export point cloud, based on WWDC20-10611 sample code

Save iOS ARFrame and Point Cloud This project improves the usability of the sample code from WWDC20 session 10611: Explore ARKit 4. Note that the samp

null 4 Dec 22, 2022
AR Ruler - A simple iOS app made using ARKit and SceneKit

A simple iOS app made using ARKit and SceneKit.Which can try to simplify little things in your life such as measuring stuff.

Dishant Nagpal 5 Aug 31, 2022
Reality-iOS - NFT Augmented Reality(AR) app that demonstrate application of ARImageTracking in iOS powered by ARKit 2

Reality-iOS NFT Augmented Reality(AR) app that demonstrate application of ARImag

Ikmal Azman 6 Nov 28, 2022
Augmented Reality image tracking with SwiftUI, RealityKit and ARKit 4.

ARImageTracking This is an Augmented Reality Xcode project that uses Apple's newest RealityKit framework and ARKit 4 features, to dynamically track a

Richard Qi 198 Dec 7, 2022
ARDicee - Simple augmented reality app using SceneKit and ARKit

ARDicee Simple augmented reality app using SceneKit and ARKit Requirements Xcode

donggyu 3 Feb 4, 2022
IOS example app to generate point clouds in ARKit using scenedepth

Visualizing a Point Cloud Using Scene Depth Place points in the real-world using the scene's depth data to visualize the shape of the physical environ

Isak Diaz 20 Oct 31, 2022
PlacenoteSDK Sample app in native iOS using ARKit, written primarily in Swift

Placenote SDK for iOS Placenote SDK lets you easily build cloud-based Augmented Reality (AR) apps that pin digital content to locations in the real wo

Placenote 93 Nov 15, 2022
Furniture E-Commerce Augmented Reality(AR) app in iOS powered by ARKit

HomeMax-iOS Furniture E-Commerce Augmented Reality(AR) app in iOS powered by ARKit and SceneKit. Inspired by IKEA place app. Description Experience on

Ikmal Azman 5 Oct 14, 2022
ARKit + CoreLocation: Combines the high accuracy of AR with the scale of GPS data.

ARKit: Uses camera and motion data to map out the local world as you move around. CoreLocation: Uses wifi and GPS data to determine your global locati

Andrew Hart 5.3k Dec 27, 2022
ARKit Demo Application

ARKitNavigationDemo Work in progress. In Progress Region β€” For one, we could render far fewer nodes. In fact, it’s a bit distracting that the entire t

Christopher Webb 296 Dec 16, 2022
ARKit Base Project. Place virtual objects based on WWDC example project

ARKit - Placing Virtual Objects in Augmented Reality Learn best practices for visual feedback, gesture interactions, and realistic rendering in AR exp

Ignacio Chiazzo Cardarello 338 Jan 5, 2023
This library uses ARKit Face Tracking in order to catch user's smile.

SmileToUnlock Make your users smile before opening the app :) Gif with the demonstration Installation Cocoapods The most preferable way to use this li

Ruslan Serebriakov 628 Oct 22, 2022
Power! Unlimited power for ARKit 2.0!

A long time ago in a galaxy, far, far away... It is a period when iPhone SE and iPhone X were destroyed from the apple store, the AR market was under

KBOY (Kei Fujikawa) 516 Dec 1, 2022
A simple application created for educational purposes for mastering ARKit

ARDrawing AR Drawing is a simple application created for educational purposes for mastering ARKit. The basis of the project is copied from the project

NIKOLAY NIKITIN 0 Oct 20, 2022
Trying TDD with ARKit

ARPlacer BDD Spec As a user I want to place a random object in real world. I also want to see the distance between AR object and my phone. Use Cases

null 0 Dec 21, 2021