@dchan – and one more data point… (Recording “medium” / “low” video record quality on droid)… (seen in build 2090 and earlier)
I’m getting a major error even attempting to record low/medium quality on my Nexus 7 (last years model). 50% or more of the time that I try and record video, the camera activity crashes. I think it is also related to the audio… (As I mentioned above, I think the playback of 3gp on ios is also failing because of the low/medium android audio format)…
In this case, the recorder failing, I have a good log from the nexus (again, this is while recording “medium” quality on android - the camera activity pops up on screen, and > 50% of the time crashes right out):
I/Corona ( 3453): – camera init called
I/ActivityManager( 430): START u0 {act=android.media.action.VIDEO_CAPTURE cmp=c
om.google.android.gallery3d/com.android.camera.VideoCamera (has extras)} from pi
d 3453
W/InputMethodManagerService( 430): Window already focused, ignoring focus gain
of: com.android.internal.view.IInputMethodClient$Stub$Proxy@425e2920 attribute=n
ull, token = android.os.BinderProxy@424a62a0
I/Corona ( 3453): * systemListener() called – Global event occurred:
I/Corona ( 3453): * event.type == applicationSuspend
I/Corona ( 3453): – applicationSuspend
I/Corona ( 3453): *******************
I/ActivityManager( 430): Start proc com.google.android.gallery3d for activity c
om.google.android.gallery3d/com.android.camera.VideoCamera: pid=3737 uid=10019 g
ids={50019, 1006, 3003, 1015, 1028}
I/MPL-storeload( 430): mpl state size = 5584
E/MPL-storeload( 430): calData from inv_save_mpl_states, size=2
I/MPL-storeload( 430): cal data size to write = 5584
I/MPL-storeload( 430): Bytes written = 5584
D/libgps ( 430): proxy_gps_stop()
D/libgps ( 430): proxy_gps_status_cb()
D/libgps ( 430): proxy_gps_status_cb()
I/MPL-storeload( 430): mpl state size = 5584
E/MPL-storeload( 430): calData from inv_save_mpl_states, size=2
I/MPL-storeload( 430): cal data size to write = 5584
I/MPL-storeload( 430): Bytes written = 5584
I/MPL-storeload( 430): mpl state size = 5584
E/MPL-storeload( 430): calData from inv_save_mpl_states, size=2
I/MPL-storeload( 430): cal data size to write = 5584
I/MPL-storeload( 430): Bytes written = 5584
D/dalvikvm( 3737): GC_CONCURRENT freed 312K, 5% free 7631K/8004K, paused 5ms+3ms
, total 43ms
D/dalvikvm( 3737): GC_CONCURRENT freed 177K, 4% free 7902K/8148K, paused 3ms+3ms
, total 49ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed 143K, 4% free 7983K/8292K, paused 17ms, to
tal 17ms
I/dalvikvm-heap( 3737): Grow heap (frag case) to 8.132MB for 291616-byte allocat
ion
D/dalvikvm( 3737): GC_FOR_ALLOC freed <1K, 4% free 8267K/8580K, paused 17ms, tot
al 17ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed 287K, 7% free 8206K/8808K, paused 15ms, to
tal 15ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed <1K, 4% free 8491K/8808K, paused 15ms, tot
al 15ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed 328K, 7% free 8487K/9060K, paused 15ms, to
tal 15ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed 553K, 11% free 8107K/9060K, paused 15ms, t
otal 15ms
D/dalvikvm( 3737): GC_CONCURRENT freed 3K, 5% free 8615K/9060K, paused 2ms+2ms,
total 19ms
D/dalvikvm( 3737): WAIT_FOR_CONCURRENT_GC blocked 13ms
I/dalvikvm-heap( 3737): Grow heap (frag case) to 8.750MB for 291616-byte allocat
ion
D/dalvikvm( 3737): GC_FOR_ALLOC freed 284K, 8% free 8615K/9348K, paused 15ms, to
tal 16ms
V/CameraHolder( 3737): open camera 0
V/StateManager( 3737): startState class com.android.gallery3d.app.FilmstripPage
I/AwesomePlayer( 125): setDataSource_l(URL suppressed)
D/dalvikvm( 3737): GC_CONCURRENT freed 479K, 8% free 8654K/9348K, paused 2ms+3ms
, total 26ms
I/AwesomePlayer( 125): setDataSource_l(URL suppressed)
I/CameraClient( 125): Opening camera 0
I/NvOmxCamera( 125): HAL_camera_device_open: open camera 0
E/ ( 125): ioctl SetWhiteBalance failed: -1
E/NvOmxCameraSettingsParser( 125): Param type 70 not supported
I/NvOmxCamera( 125): HAL_camera_device_open: opened camera 0 (0x410cf728)
V/CAM_VideoModule( 3737): mDesiredPreviewWidth=704. mDesiredPreviewHeight=576
V/CAM_VideoModule( 3737): startPreview
W/Util ( 3737): No picture size match the aspect ratio
V/CAM_VideoModule( 3737): Video snapshot size is 1280x720
I/CAM_ScreenNail( 3737): aspect ratio clamping disabled
I/CAM_ScreenNail( 3737): aspect ratio clamping enabled, surfaceTexture scale: 1.
0, 1.0
D/dalvikvm( 3737): GC_CONCURRENT freed 265K, 6% free 8880K/9348K, paused 1ms+2ms
, total 23ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed 19K, 6% free 8869K/9348K, paused 24ms, tot
al 24ms
I/dalvikvm-heap( 3737): Grow heap (frag case) to 8.969MB for 262160-byte allocat
ion
D/dalvikvm( 3737): GC_FOR_ALLOC freed <1K, 6% free 9125K/9608K, paused 16ms, tot
al 16ms
D/libgps ( 430): proxy_gps_release_wakelock_cb()
D/CameraStorage( 3737): External storage state=mounted
V/CAM_VideoModule( 3737): mDesiredPreviewWidth=704. mDesiredPreviewHeight=576
V/CAM_VideoModule( 3737): startPreview
W/Util ( 3737): No picture size match the aspect ratio
V/CAM_VideoModule( 3737): Video snapshot size is 1280x720
D/libEGL ( 3737): loaded /system/lib/egl/libEGL_tegra.so
D/libEGL ( 3737): loaded /system/lib/egl/libGLESv1_CM_tegra.so
D/libEGL ( 3737): loaded /system/lib/egl/libGLESv2_tegra.so
D/OpenGLRenderer( 3737): Enabling debug mode 0
I/CAM_ScreenNail( 3737): preview layout size: 800/1205
I/CAM_ScreenNail( 3737): aspect ratio clamping enabled, surfaceTexture scale: 0.
8121827, 1.0
I/GLRootView( 3737): onSurfaceChanged: 800x1205, gl10: com.google.android.gles_j
ni.GLImpl@42195c38
I/GLRootView( 3737): layout content pane 800x1205 (compensation 0)
D/PhotoView( 3737): compensation = 0, CameraRelativeFrame = Rect(0, 0 - 0, 0), m
CameraRect = Rect(0, 0 - 0, 0)
D/dalvikvm( 3737): GC_FOR_ALLOC freed 213K, 4% free 9322K/9700K, paused 30ms, to
tal 30ms
I/ActivityManager( 430): Displayed com.google.android.gallery3d/com.android.cam
era.VideoCamera: +1s261ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed 57K, 5% free 9309K/9700K, paused 26ms, tot
al 26ms
I/dalvikvm-heap( 3737): Grow heap (frag case) to 9.755MB for 635812-byte allocat
ion
D/dalvikvm( 3737): GC_FOR_ALLOC freed <1K, 4% free 9930K/10324K, paused 30ms, to
tal 30ms
D/dalvikvm( 678): GC_CONCURRENT freed 508K, 9% free 8665K/9436K, paused 31ms+2m
s, total 70ms
D/dalvikvm( 678): WAIT_FOR_CONCURRENT_GC blocked 26ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed <1K, 4% free 9931K/10324K, paused 29ms, to
tal 29ms
D/dalvikvm( 3737): GC_CONCURRENT freed 57K, 4% free 10480K/10816K, paused 17ms+6
ms, total 57ms
D/dalvikvm( 3737): WAIT_FOR_CONCURRENT_GC blocked 30ms
D/libgps ( 430): proxy_gps_inject_location()
D/dalvikvm( 3737): GC_FOR_ALLOC freed 622K, 9% free 10479K/11440K, paused 32ms,
total 32ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed 676K, 10% free 10390K/11440K, paused 20ms,
total 20ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed <1K, 4% free 11011K/11440K, paused 20ms, t
otal 20ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed 676K, 9% free 10923K/11932K, paused 20ms,
total 20ms
D/dalvikvm( 3737): GC_FOR_ALLOC freed <1K, 4% free 11544K/11932K, paused 18ms, t
otal 18ms
V/CAM_VideoModule( 3737): closeCamera
V/CAM_VideoModule( 3737): Closing effects
D/CAM_VideoModule( 3737): Effects are already closed. Nothing to do
D/ ( 125): Camera fd open as: 122
E/NvOmxCamera( 125): OMX_ERRORTYPE android::NvOmxCamera::getCameraStereoMode(Nv
xComponent*, NvOmxCameraUserStereoMode&): Error: invalid NVX mode 0.
E/NvOmxCamera( 125): OMX_ERRORTYPE android::NvOmxCamera::getCameraStereoModeAnd
CaptureInfo(NvxComponent*, NvOmxCameraUserStereoMode&, NVX_STEREOCAPTUREINFO&):
getCameraStereoMode failed with 0x00000000
D/ ( 125): Camera fd close (MI1040)
E/NvOmxCamera( 125): Already called release()
I/CameraClient( 125): Destroying camera 0
W/NvOmxCamera( 125): Already called release()
W/dalvikvm( 3737): threadid=22: thread exiting with uncaught exception (group=0x
418ee700)
W/AudioFlinger( 125): session id 37 not found for pid 125
W/AudioFlinger( 125): session id 38 not found for pid 125
E/AndroidRuntime( 3737): FATAL EXCEPTION: Thread-292
E/AndroidRuntime( 3737): java.lang.RuntimeException: startPreview failed
E/AndroidRuntime( 3737): at com.android.camera.VideoModule.startPreview(V
ideoModule.java:867)
E/AndroidRuntime( 3737): at com.android.camera.VideoModule.access$800(Vid
eoModule.java:73)
E/AndroidRuntime( 3737): at com.android.camera.VideoModule$5.run(VideoMod
ule.java:773)
E/AndroidRuntime( 3737): at java.lang.Thread.run(Thread.java:841)
E/AndroidRuntime( 3737): Caused by: android.view.ViewRootImpl$CalledFromWrongThr
eadException: Only the original thread that created a view hierarchy can touch i
ts views.
E/AndroidRuntime( 3737): at android.view.ViewRootImpl.checkThread(ViewRoo
tImpl.java:5908)
E/AndroidRuntime( 3737): at android.view.ViewRootImpl.invalidateChildInPa
rent(ViewRootImpl.java:869)
E/AndroidRuntime( 3737): at android.view.ViewGroup.invalidateChild(ViewGr
oup.java:4250)
E/AndroidRuntime( 3737): at android.view.View.invalidate(View.java:10539)
E/AndroidRuntime( 3737): at android.view.View.setEnabled(View.java:5865)
E/AndroidRuntime( 3737): at com.android.camera.VideoUI.enableShutter(Vide
oUI.java:341)
E/AndroidRuntime( 3737): at com.android.camera.VideoModule.onPreviewStart
ed(VideoModule.java:884)
E/AndroidRuntime( 3737): at com.android.camera.VideoModule.startPreview(V
ideoModule.java:858)
E/AndroidRuntime( 3737): … 3 more
W/ActivityManager( 430): Force finishing activity com.google.android.gallery3
d/com.android.camera.VideoCamera
D/dalvikvm( 430): GC_FOR_ALLOC freed 687K, 14% free 15124K/17400K, paused 71ms,
total 71ms
D/dalvikvm( 430): GC_FOR_ALLOC freed 49K, 12% free 15321K/17400K, paused 60ms,
total 60ms
I/dalvikvm-heap( 430): Grow heap (frag case) to 15.265MB for 251120-byte alloca
tion
D/dalvikvm( 430): GC_FOR_ALLOC freed <1K, 12% free 15566K/17648K, paused 57ms,
total 57ms
I/WindowManager( 430): Screenshot Window{4267b3d8 u0 com.google.android.gallery
3d/com.android.camera.VideoCamera} was all black! mSurfaceLayer=21025 minLayer=2
1025 maxLayer=21025
D/dalvikvm( 430): GC_FOR_ALLOC freed 519K, 15% free 15048K/17648K, paused 58ms,
total 58ms
V/CAM_VideoModule( 3737): closeCamera
D/CAM_VideoModule( 3737): already stopped.
V/CAM_VideoModule( 3737): Releasing media recorder.
I/AwesomePlayer( 125): setDataSource_l(URL suppressed)
W/MediaPlayer( 3453): mediaplayer went away with unhandled events
W/MediaPlayer( 3453): mediaplayer went away with unhandled events
D/libgps ( 430): proxy_gps_set_position_mode()
W/libc ( 3453): pthread_create sched_setscheduler call failed: Operation not
permitted
NOTE: Two links regarding why iOS can’t playback the low/medium quality android 3gp videos (which have AMR Narrowband audio encoding) –
http://stackoverflow.com/questions/5083958/which-audio-format-can-be-recorded-and-played-back-by-iphone-and-android
http://stackoverflow.com/questions/6758167/about-amr-audio-file-playing-issue-on-different-devices
The second link suggests it’s possible to customize the videos audio encoder to “AMR_WB” or “AAC” (which it looks like might be compatible in ios).