- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had modified the Android JAVA sample app to record in Portrait mode but the recorded video is upside down when recording with the front camera. Recording with the back camera works fine.
This is the function in the sample app that sets the orientation for the recording.
How do I fix the orientation when recording? Thanks
private void createPreview() { surfaceView = new GLSurfaceView(getApplicationContext()); surfaceView.setDebugFlags(GLSurfaceView.DEBUG_CHECK_GL_ERROR); ((RelativeLayout) findViewById(R.id.camera_layout)).addView(surfaceView, 0); preview = capture.createPreview(surfaceView, camera); preview.setFillMode(fillMode); if (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) { capture.setOrientation(90); } else if (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) { capture.setOrientation(0); } preview.start(); }
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Danny,
Can you tell me more detailed information?
1. Which device were you using?
2. You set the preview orientation not the recording orientation, did you see the preview was upside down when using the self-facing camera?
"front camera" is confused, it should be either self-facing or world-facing.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the Acer z220 OS5 and Umi touch OS6.0
Yes the Front facing camera.
On a side note. I'm trying the text overlay effect. Is there any way to improve the frame rate? Currently it only records in 20fps and I would like close to 30fps.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please answer my question #2, I still need to understand your configuration.
In general, the SurfaceView should be faster than the ImageView but depends on the image resolution, what is your resolution?
Mark
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page