4

I need to be able to record video of the users face during gameplay in a very simple game I am working on. I need a frame rate of at least 25fps and the front-facing camera will be used. This is for Android tablets and the expected spec will be something akin to the Samsung Galaxy Tab 2.

Ideally, I want to write the game using libGDX. Apart from the drawing of around 20 sprites and detecting user input, nothing else will be going on during the game loop.

With all that in mind, my questions are, firstly, how should I approach this? Is it a bad idea to be using libGDX in this context? Secondly, if using libGDX isn't a good idea when trying to capture video at 25fps, how else could I do it? Simply create my game using the Android SDK? Or is there some other library that would go better with the required camera functionality?

eby
  • 191
  • 2
  • 12
  • I marked this as a favorite question. I want to see if there's a solution too. I BELIEVE that you can't record from the camera without rendering it to a surface though. That obviously doesn't work for what you want to do. – spartygw Jul 22 '13 at 14:02

1 Answers1

2

You can use the Device camera with libgdx, check this out:

https://github.com/libgdx/libgdx/wiki/Integrating-libgdx-and-the-device-camera

This example shows how to take a picture, you would need to change that to record video. Also, as spartygw said, it is not possible to record from the camera without rendering it to a surface.

This is a good workaround:

https://stackoverflow.com/a/3881027/1895303

Community
  • 1
  • 1
Daahrien
  • 10,190
  • 6
  • 39
  • 71