안드로이드 화면의 비디오 캡처
스크린 샷을 잊어 버려, 안드로이드에서 실행중인 응용 프로그램의 비디오를 캡처 할 수 있습니까? 뿌리 또는 비 뿌리, 나는 상관없고, 적어도 15fps를 원합니다.
업데이트 : 외부 하드웨어를 원하지 않습니다. 의도는 휴대 성이 뛰어나고 모든 프레임이 Android OS 내에서 캡처되는 것입니다. 앱 SDK의 경계를 넘어 서면 OS 수준 수정을 기꺼이 시작하지만 시작점이 필요합니다.
Android 4.4 (KitKat) 이상 장치에는 Android 장치 화면을 기록하기위한 셸 유틸리티가 있습니다. USB를 통해 adb 유틸리티를 사용하여 KitKat을 실행하는 개발자 / 디버그 모드의 장치를 연결 한 후 다음을 입력하십시오.
adb shell screenrecord /sdcard/movie.mp4
(Press Ctrl-C to stop)
adb pull /sdcard/movie.mp4
화면 녹화는 최대 3 분으로 제한됩니다.
참조 : https://developer.android.com/studio/command-line/adb.html#screenrecord
나는 이것이 오래된 질문이라는 것을 알고 있지만 OP가 좋아하는 것으로 대답하지 않은 것으로 보입니다. Android 마켓 스크린 캐스트 링크 에서이를 승인하는 앱이 있습니다.
예, 비디오 출력이있는 전화를 사용하고 비디오 레코더를 사용하여 스트림을 캡처합니다.
이 기사를 참조 하십시오 http://graphics-geek.blogspot.com/2011/02/recording-animations-via-hdmi.html
@taranfx, 더 많은 정보없이 StackOverFlow에 Android 개발자 도구가 설치되어 있다고 가정합니다. 그렇다면 에뮬레이터를 실행 한 다음 많은 데스크톱 화면 캡처 프로그램 중 하나를 사용하여 실행중인 응용 프로그램을 캡처 할 수 있습니다. Mac의 화면 흐름 은이 작업에 효과적입니다. Windows 또는 Nix 플랫폼을 사용하는 경우 좋은 화면 캡처 프로그램이 많이 있으며 온라인 서비스도 있다는 것을 알고 있지만 링크가 없거나 사용하지 않았습니다. 다음은 에뮬레이터 설정 및 실행에 대한 참조 문서 링크입니다. 안드로이드 SDK는 모바일 장치 에뮬레이터를 포함 ...
또한 SMRecorder와 같은 스크린 레코더를 사용하는 것이 좋습니다. 에뮬레이터를 사용하는 대신, 특히 게임이나 비디오를 원할 때 에뮬레이터를 사용하는 대신 Android가 설치된 VirtualBox VM을 사용하는 것이 좋습니다. Dalvik 디버거를 연결하여 앱을 디버깅 할 수 있습니다. 디버거로 인해 앱 속도가 너무 느려지면 연결을 끊어 비디오를 녹화하십시오. 디버깅을 위해 Android VM을 설정하는 방법을 설명하는 많은 링크가 있습니다. 에뮬레이터보다 훨씬 낫습니다. 이제 앱이 가속도계 나 PC에서 사용할 수없는 카메라를 사용하는 경우 장치에서 직접 화면 캡처를 처리하지 않습니다. 이를 위해 위에서 언급 한 Android 마켓 앱을 사용합니다.
나는 스크린 캐스트가 tegra 2 비 호환성의 원인이 아니라고 생각합니다. 이미 시도했지만 유청은 없습니다! 그래서 시장에서 Z-ScreeNRecorder 를 사용해 보았고 LG Optimus 2x에 설치했지만 빈 화면 만 기록했습니다 .5 분 동안 시도했습니다. 그리고 나는 5 분을 얻는다. 6MB 크기의 빈 화면 파일 .... tegra2 칩셋과 호환되는 소프트웨어의 평화를 릴리스 할 때까지 시도 할 필요가 없습니다!
Android 4.3에는 표면에서 기록하는 데 사용할 수있는 새로운 MediaCodec API가 있습니다. 참조 : http://developer.android.com/about/versions/android-4.3.html ( "Surface에서 비디오 인코딩"섹션으로 스크롤 하십시오 )
기기가 루팅 된 경우 휴대 전화 나 태블릿에서 직접 화면 동영상을 녹화 할 수 있습니다. SCR Screen Recorder 앱 을 만들고 있습니다. 내가 아는 한, 이것은 Tegra 기기 (Nexus 7 포함) 및 Android 4.2를 지원하는 유일한 앱입니다. 현재 앱은 기기에 따라 9-18fps 사이에서 기록되지만 개선하기 위해 노력하고 있습니다. SCR Screen Recorder는 아직 베타 테스트 단계에 있으므로 자유롭게 테스트하고 의견을 보내주십시오.
AirPlay 미러링 및 화면 녹화 기능이 이제 미러 APK (베타)가 있는 CyanogenMod 에 있습니다.
비디오 카메라 응용 프로그램을 개발하는 경우 비디오 캡처에 사용할 API를 아는 것이 좋습니다.
http://developer.android.com/training/camera/videobasics.html
(위의 링크는 실제 레코딩이 수행되는 방식이 아니라 의도 제출을 통해 비디오 레코딩이 수행되는 방식 만 보여줍니다)
https://www.linux.com/learn/tutorials/729988-android-app-development-how-to-capture-video
"screenrecord"adb 응용 프로그램을 직접 작성하려면 다음을 수행하십시오.
그리고 주요 기록 작업은 다음과 같습니다.
static status_t recordScreen(const char* fileName) {
status_t err;
<...>
// Configure, but do not start, muxer.
sp<MediaMuxer> muxer = new MediaMuxer(fileName,
MediaMuxer::OUTPUT_FORMAT_MPEG_4);
if (gRotate) {
muxer->setOrientationHint(90);
}
// Main encoder loop.
err = runEncoder(encoder, muxer);
if (err != NO_ERROR) {
encoder->release();
encoder.clear();
return err;
}
삼성 전화의 경우 추가 설정 ( 'cam_mode'핵)이 있습니다.
CamcorderProfile.QUALITY_HIGH 해상도로 녹색 깜박임 비디오 생성
더 유용한 링크 :
Android에서 비디오 녹화를 캡처하려면 어떻게해야합니까?
나는 그것을 구현하지 않았지만 여전히 나는 당신에게 이것을 할 아이디어를주고있다.
First of all get the code to take a screenshot of Android device. And Call the same function for creating Images after an interval of times. Add then find the code to create video from frames/images.
Edit
see this link also and modify it according to your screen dimension .The main thing is to divide your work into several small tasks and then combine it as your need.
FFMPEG is the best way to do this. but once i have tried but it is a very long procedure. First you have to download cygwin and Native C++ library and lot of stuff and connect then you are able to work on FFMPEG (it is built in C++).
Take a look at Remote Manager. But seems to me it doesn't work correctly with devices which have big screen. Although, you can try DEMO before.
If you want to record the user navigation so you can test UI and other things, I recommend you to use TestFairy
It allows you to send the apk to some test users by email and see a video with all the sessions in the app and even the app crashes and device stats.
In Android Lollipop (5) a new feature has been added which allows screen capture which is explained here
Call startActivityForResult like this
startActivityForResult(mProjectionManager.getScreenCaptureIntent(), PERMISSION_CODE);
Then capture the result
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode != PERMISSION_CODE) {
Log.e(TAG, "Unknown request code: " + requestCode);
return;
}
if (resultCode != RESULT_OK) {
Toast.makeText(this,
"User denied screen sharing permission", Toast.LENGTH_SHORT).show();
return;
}
mMediaProjection = mProjectionManager.getMediaProjection(resultCode, data);
mVirtualDisplay = createVirtualDisplay();
}
This is old, but what about ASC?
If you are on a PC then you can run My Phone Explorer on the PC, the MyPhoneExplorer Client on the phone, set the screen capture to refresh continuously, and use Wink to capture a custom rectangular area of your screen over the My Phone Explorer window with your own capture rate. Then convert to a FLV in Wink, then convert from Flash video to MPG with WinFF.
I have not used the app, but I've seen Rec. referenced as a way to do this, but you need root the phone.
참고URL : https://stackoverflow.com/questions/5382212/capture-video-of-androids-screen
'Programing' 카테고리의 다른 글
C ++ / CLI에서 캐럿 ( '^')은 무엇을 의미합니까? (0) | 2020.05.11 |
---|---|
문자열에서 클래스의 인스턴스를 만듭니다. (0) | 2020.05.11 |
단일 페이지 응용 프로그램 : 장단점 (0) | 2020.05.11 |
JavaScript에서 형식 지정을 사용하여 문자열을 날짜 / 시간으로 변환하려면 어떻게해야합니까? (0) | 2020.05.11 |
"for (… in…)"루프의 요소 순서 (0) | 2020.05.11 |