rainbowcreatures / FlashyWrappers

AIR / Flash video recording SDK
17 stars 10 forks source link

Catpure webcam into mp4 will the black screen on Android CPU/GPU render mode #33

Closed nxidea123 closed 7 years ago

nxidea123 commented 7 years ago

My english is not good, sorry about that. I developed a app for mobile by using "FlashyWrapper Free Version" for Android device, We try to use CPU/GPU render mode to capture webcam into mp4 file, but get all black screen on video.

How can i do? Is possible to solve this problem?

[Test Environment] Sony Xpreia XZ Android 7.1.1

jkpatel1463 commented 7 years ago

Hello @nxidea123

From my point of view, it is because of app "descriptor file", please upload your app.xml file here.

Another question is that, if you are not recording a video, your animation is working without recording ? Are you capturing screen with realtime mode ?

Regards JK Patel

rainbowcreatures commented 7 years ago

Hello,

Either try to wait for the 2.6 release which fixes one possible issue with Android or try a workaround software capture - which is slower but might be more reliable.

Also try to upload your device log (logcat), it might contain clues / errors. Use Android Studio for that or "adb logcat > mylog.txt" from the standalone Android SDK (with your device connected and your app running).

The software mode capture workaround:

myEncoder.setDimensions(1280, 720);     // optional
myEncoder.start(20, FWVideoEncoder.AUDIO_OFF, false, 0, 0, 1000000);    // AUDIO_OFF is just in my sample, specify whatever you need, important is the "false" argument, which sets the software mode instead GLES capture
myEncoder.forcePTSMode(FWVideoEncoder.PTS_REALTIME);   //  force software mode to work in realtime      
myEncoder.forceFramedropMode(FWVideoEncoder.FRAMEDROP_ON);   //  force software mode to work in realtime
nxidea123 commented 7 years ago

Dear @jkpatel1463 and @rainbowcreatures Thanks for your kindly feedback, Following code can be used by GPU mode and work fine.

myEncoder.setDimensions(1280, 720);     // optional
myEncoder.start(20, FWVideoEncoder.AUDIO_OFF, false, 0, 0, 1000000);    // AUDIO_OFF is just in my sample, specify whatever you need, important is the "false" argument, which sets the software mode instead GLES capture
myEncoder.forcePTSMode(FWVideoEncoder.PTS_REALTIME);   //  force software mode to work in realtime      
myEncoder.forceFramedropMode(FWVideoEncoder.FRAMEDROP_ON);   //  force software mode to work in realtime