All Projects → yrom → Screenrecorder

yrom / Screenrecorder

Implement screen capture without root on Android 5.0+ by using MediaProjectionManager, VirtualDisplay, AudioRecord, MediaCodec and MediaMuxer APIs

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Screenrecorder

Keepassdx
📱 KeePass implementation for android with material design and deluxe features
Stars: ✭ 1,395 (-13.3%)
Mutual labels:  android-application
Twittercompose
TwitterCompose is an Android application 📱 for showcasing Jetpack Compose for building declarative UI in Android.
Stars: ✭ 109 (-93.23%)
Mutual labels:  android-application
React Native Firebase Chat
React Native chat application using firebase.
Stars: ✭ 113 (-92.98%)
Mutual labels:  android-application
Mvvm Reddit
A companion project for our blog post on better Android software development using MVVM with RxJava.
Stars: ✭ 106 (-93.41%)
Mutual labels:  android-application
Pi Hole Droid
Pi-hole Droid is an unofficial app that connects to your Pi-hole to show charts and statistics.
Stars: ✭ 107 (-93.35%)
Mutual labels:  android-application
Insta Chat
InstaChat offers a new way to read messages of your favourite messengers. It overlays every other app and you can reply from anywhere you want.
Stars: ✭ 111 (-93.1%)
Mutual labels:  android-application
Busbookingui Android
Check out the new style for App Design aims for the Bus Booking Service...😉😀😁😎
Stars: ✭ 105 (-93.47%)
Mutual labels:  android-application
Save For Offline
Android app for saving webpages for offline reading.
Stars: ✭ 114 (-92.91%)
Mutual labels:  android-application
Androiddevnotes
写一些Android开发相关的文章
Stars: ✭ 107 (-93.35%)
Mutual labels:  android-application
Cameraxdemo
A sample camera app with CameraX API from Android Jetpack
Stars: ✭ 112 (-93.04%)
Mutual labels:  android-application
Q comic
一款仿知音漫客的漫画APP
Stars: ✭ 107 (-93.35%)
Mutual labels:  android-application
Wulkanowy
🌋 Androidowy klient dziennika VULCAN UONET+ dla ucznia i rodzica
Stars: ✭ 107 (-93.35%)
Mutual labels:  android-application
Currentactivity
A current activity monitor that implements MVVM architecture using pure Kotlin, Android Jetpack, Kotlin Coroutines.
Stars: ✭ 111 (-93.1%)
Mutual labels:  android-application
Swift Screencapture
A Swift framework to easily capture the screen on OS X.
Stars: ✭ 105 (-93.47%)
Mutual labels:  screen-capture
Android Inappbilling
A sample which uses Google's Play Billing Library and it does InApp Purchases and Subscriptions.
Stars: ✭ 114 (-92.91%)
Mutual labels:  android-application
Mediapicker
Easy customizable picker for all your needs in Android application
Stars: ✭ 105 (-93.47%)
Mutual labels:  android-application
Reel Search Android
Reel Search for Android is a UI/UX design for autocomplete action. It is a beautiful minimalistic addition to any use case.
Stars: ✭ 110 (-93.16%)
Mutual labels:  android-application
Tiktok
This is a demo app built using 'Hilt' a new dependency injection framework for Android along with ViewPager2 and ExoPlayer2.
Stars: ✭ 114 (-92.91%)
Mutual labels:  android-application
Droidvim
DroidVim is a Vim clone for Android.
Stars: ✭ 114 (-92.91%)
Mutual labels:  android-application
Firebase Chat
[Deprecated] One to one chat implementation using firebase.
Stars: ✭ 111 (-93.1%)
Mutual labels:  android-application

Screen Recorder

这是个DEMO APP 主要是实现了屏幕录制功能(可同时录制来自麦克风的声音)。

screenshot

Get it on Google Play 点此处下载APK 快速预览项目功能

说明:使用了 MediaProjectionManager, VirtualDisplay, AudioRecord, MediaCodec 以及 MediaMuxer 等API,故而这个项目最低支持Android 5.0。

录屏原理

** 注意 ** 你可以checkout 32c005412 查看原始的(不包含麦克风录制的)代码

  • Display 可以“投影”到一个 VirtualDisplay
  • 通过 MediaProjectionManager 取得的 MediaProjection创建VirtualDisplay
  • VirtualDisplay 会将图像渲染到 Surface中,而这个Surface是由MediaCodec所创建的
mEncoder = MediaCodec.createEncoderByType(MIME_TYPE);
...
mSurface = mEncoder.createInputSurface();
...
mVirtualDisplay = mMediaProjection.createVirtualDisplay(name, mWidth, mHeight, mDpi, DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC, mSurface, null, null);
  • MediaMuxer 将从 MediaCodec 得到的图像元数据封装并输出到MP4文件中
int index = mEncoder.dequeueOutputBuffer(mBufferInfo, TIMEOUT_US);
...
ByteBuffer encodedData = mEncoder.getOutputBuffer(index);
...
mMuxer.writeSampleData(mVideoTrackIndex, encodedData, mBufferInfo);

所以其实在Android 4.4上可以通过DisplayManager来创建VirtualDisplay也是可以实现录屏,但因为权限限制需要ROOT。 (see DisplayManager.createVirtualDisplay())

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].