All Projects → bastienFalcou → VideoScreenRecorder

bastienFalcou / VideoScreenRecorder

Licence: MIT license
Record video of your screen and save the file locally 🎥

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to VideoScreenRecorder

KeyPlexer
Capstone: Keylogger Trojan
Stars: ✭ 32 (-11.11%)
Mutual labels:  screenshot, capture
X11 Recorder
xrec helps you capture any area of your screen either as a screenshot or record a gif file.
Stars: ✭ 17 (-52.78%)
Mutual labels:  screenshot, capture
Menyoki
Screen{shot,cast} and perform ImageOps on the command line 🌱 🏞️
Stars: ✭ 255 (+608.33%)
Mutual labels:  screenshot, capture
Flameshot
Powerful yet simple to use screenshot software 🖥️ 📸
Stars: ✭ 15,429 (+42758.33%)
Mutual labels:  screenshot, capture
Screenshot Stream
Capture screenshot of a website and return it as a stream
Stars: ✭ 228 (+533.33%)
Mutual labels:  screenshot, capture
1click-webpage-screenshot
Entire page Screenshot extension for Google Chrome. I'm developing open source extension for Google Chrome. All extension are free for use. Let's make Chrome great again!
Stars: ✭ 432 (+1100%)
Mutual labels:  screenshot, capture
Quickshot
Capture images of any View, SurfaceView or Bitmap from your Android app in: .jpg .png or .nomedia with simple oneliner codes.
Stars: ✭ 663 (+1741.67%)
Mutual labels:  screenshot, capture
canvas-record
A one trick pony package to record and download a video from a canvas animation.
Stars: ✭ 64 (+77.78%)
Mutual labels:  capture, recorder
Capture Frame
Capture video screenshot from a `<video>` tag (at the current time)
Stars: ✭ 109 (+202.78%)
Mutual labels:  screenshot, capture
Imgursniper
📷 A quick and easy Image, Screenshot and Screen recording sharing tool
Stars: ✭ 69 (+91.67%)
Mutual labels:  screenshot, capture
video-snapshot
Get snapshots from a video file in the browser 🎥 🌅
Stars: ✭ 63 (+75%)
Mutual labels:  screenshot, capture
Easycv
easyCV (video recorder and snapshot library,based on javaCV)基于javaCV的跨平台视频录像和基于FFmpeg的快照(截图)库
Stars: ✭ 142 (+294.44%)
Mutual labels:  screenshot, recorder
HighlightTranslator
Highlight Translator can help you to translate the words quickly and accurately. By only highlighting, copying, or screenshoting the content you want to translate anywhere on your computer (ex. PDF, PPT, WORD etc.), the translated results will then be automatically displayed before you.
Stars: ✭ 54 (+50%)
Mutual labels:  screenshot, capture
snapcrawl
Crawl a website and take screenshots
Stars: ✭ 37 (+2.78%)
Mutual labels:  screenshot, capture
Albumcamerarecorder
一个高效的多媒体支持操作库,可多方面的简单配置操作相册、拍照、录制、录音等功能。也支持配套使用的展示图片、视频、音频的九宫格功能。 (An efficient multimedia support operation library, can be a variety of simple configuration operation album, photo, recording, recording and other functions.Also support supporting the use of the display of pictures, video, audio of the nine grid function.)
Stars: ✭ 106 (+194.44%)
Mutual labels:  capture, recorder
1click Webpage Screenshot
Entire page Screenshot extension for Google Chrome. I'm developing open source extension for Google Chrome. All extension are free for use. Let's make Chrome great again!
Stars: ✭ 406 (+1027.78%)
Mutual labels:  screenshot, capture
Mac2imgur
⬆ A simple Mac app designed to make uploading images and screenshots to Imgur quick and effortless.
Stars: ✭ 914 (+2438.89%)
Mutual labels:  screenshot, capture
Screenshots
A screenshot plugin for electron
Stars: ✭ 130 (+261.11%)
Mutual labels:  screenshot, capture
Sharex
ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of files to many supported destinations you can choose from.
Stars: ✭ 18,143 (+50297.22%)
Mutual labels:  screenshot, capture
Save Page State
A chrome extension to save the state of a page for further analysis
Stars: ✭ 208 (+477.78%)
Mutual labels:  screenshot

VideoScreenRecorder

Build Status Version Swift 4.0.x License

VideoScreenRecorder can record a video of your screen and save the output file locally on any iOS version.

Features

  • Record video of your screen on any iOS version
  • Save video locally and consult previous videos for further reuse (upload video to server, see video on the phone, etc.)
  • Easily create your "stop recording" button that although seen on screen, will not be recorded in the video

Requirements

  • iOS 8.0+
  • Xcode 9.0+
  • Swift 4.0+

Installation

VideoScreenRecorder is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'VideoScreenRecorder'

Usage

Check out the demo app for an example. It contains the following demos: record video, display persisted list of previous videos recorded, display video preview when selected.

Start Recording

The VideoScreenRecorder singleton manager is the Framework's central object. It will handle recording, making sure there are not two videos being recorded simultaneously (returns an error otherwise). Recording a video can be started as follows:

VideoScreenRecorder.shared.startRecording(with: "my_file_name", windowsToSkip: nil) { url, error in
	DispatchQueue.main.async {
		if let error = error {
			// handle error
		}
		// use url
	}
}

The startHandler callback is called as soon as the Framework has successfully started to record video; for instance right after the user has granted the permission. It may never be called if recording doesn't start successfully.

The completionHandler callbak is called if there is an error (possibly immediately upon trying to start recording, e.g. if user denies the permission). It is called when the record completes successfully otherwise.

Note: it is possible to pass an array of UIWindow objects to the windowsToSkip parameter. Every object included in this array will not be recorded in the video. This notably allows to create a "Stop Recording" button that only the user will see on screen at the moment of recording.

Stop Recording

Similarly to startRecording, recording the video can be stopped by calling the following function:

VideoScreenRecorder.shared.stopRecording { url, error in
	DispatchQueue.main.async {
		if let error = error {
			// handle error
		}
		// use url
	}
}

The URL of the generated video will look as follow: file:///var/mobile/Containers/Data/Application/{ApplicationUUID}/Documents/Replays/my_file_name.mp4

How does it work?

The VideoScreenRecorder object is a Facade that will pick the most appropriate / advanced approach to handle screen video recording based on your iOS version.

iOS 11+

Apple provides with the ReplayKit Framework. Available since iOS 9, it is only with the iOS 11 update that the Framework was given the ability to save the recorded videos, get their local URL and reuse them later on (for instance to upload them to a server). Before iOS 11, the video could only be previwed right after it was recorded—it was lost as soon as the user leaves the preview native screen.

If running on iOS 11+, the VideoScreenRecorder facade will use ReplayKit to record the video.

This implementation is based on Giridhar's blog post, and its GitHub repository; see there for more details.

Before iOS 11

Since there was no way to capture the a video of the screen before iOS 11, one common and accepted solution is to record a batch of screenshots, store them in an array to finally encode them to generate a video.

If running on a version of iOS prior to iOS 11, the VideoScreenRecorder facade will choose this method to record the video.

This implementation is based on alskipp's GitHub repository; see there for more details.

Add Unrecorded Views

It is likely that you will want a "Stop" button that will be seen on screen by the user while recording, but that will not be seen on the video file generated. This is achieved by creating a new UIWindow and making it key window.

This window will be passed as parameter of startRecording(with:windowsToSkip:completion:) and be skipped while recording the screen. See how to implement it in the VideoScreenRecorder Example application, file StopVideoRecordingWindow 👌

License

VideoScreenRecorder is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].