Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Ratik Sharma
32,885 Points[Ribbit Project] Can't seem to take a video using the Camera (Google Camera) application
Hi! I've been working on the Ribbit application lately and have come across an odd bug. I can't seem to record the video using the latest Google Camera app using the method described in the video lesson.
Here's what I pulled from LogCat:
05-17 22:06:09.897: I/CAM_VideoModule(15697): startVideoRecording
05-17 22:06:09.913: I/CAM_VideoModule(15697): initializeRecorder
05-17 22:06:09.921: W/StagefrightRecorder(137): Target duration (10000000 us) too short to be respected
05-17 22:06:09.921: I/MediaFocusControl(456): AudioFocus requestAudioFocus() from android.media.AudioManager@42197238
05-17 22:06:09.936: D/CameraSource(137): Camera does not support setVideoSize()
05-17 22:06:09.936: E/CameraHAL(137): Adapter state switch PREVIEW_ACTIVE Invalid Op! event = 0xf
05-17 22:06:10.046: D/DOMX(137): ERROR: failed check:(eError == OMX_ErrorNone) || (eError == OMX_ErrorNoMore) - returning error: 0x80001005 - Error returned from OMX API in ducati
05-17 22:06:10.046: E/CameraHAL(137): Error while configuring rotation 0x80001005
05-17 22:06:10.147: D/DOMX(137): ERROR: failed check:(eError == OMX_ErrorNone) || (eError == OMX_ErrorNoMore) - returning error: 0x80001005 - Error returned from OMX API in ducati
05-17 22:06:10.147: E/CameraHAL(137): Error while configuring rotation 0x80001005
05-17 22:06:10.272: E/CameraSource(137): Failed to set preview frame rate to 15 fps. The actual frame rate is 30
05-17 22:06:10.272: E/MediaRecorder(15697): start failed: -19
05-17 22:06:10.272: E/CAM_VideoModule(15697): Could not start media recorder.
05-17 22:06:10.272: E/CAM_VideoModule(15697): java.lang.RuntimeException: start failed.
05-17 22:06:10.272: E/CAM_VideoModule(15697): at android.media.MediaRecorder.start(Native Method)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at com.android.camera.VideoModule$10.onStorageUpdateDone(VideoModule.java:1258)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at com.android.camera.CameraActivity$19.onPostExecute(CameraActivity.java:1822)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at com.android.camera.CameraActivity$19.onPostExecute(CameraActivity.java:1809)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at android.os.AsyncTask.finish(AsyncTask.java:632)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at android.os.AsyncTask.access$600(AsyncTask.java:177)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at android.os.Handler.dispatchMessage(Handler.java:102)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at android.os.Looper.loop(Looper.java:136)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at android.app.ActivityThread.main(ActivityThread.java:5024)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at java.lang.reflect.Method.invokeNative(Native Method)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at java.lang.reflect.Method.invoke(Method.java:515)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
05-17 22:06:10.272: E/CAM_VideoModule(15697): at dalvik.system.NativeStart.main(Native Method)
05-17 22:06:10.272: I/CAM_VideoModule(15697): Releasing media recorder.
2 Answers
Ben Jakuben
Treehouse TeacherI am able to run it using the new Google Camera app. Can you paste in the code you are trying? Perhaps there is something different about our code. If not, then it might be a device-specific issue and we can try to track it down.
Ratik Sharma
32,885 PointsIt was an issue with my code and I ended up fixing it! Thanks, anyway. :)