New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E/Camera﹕ Error 100 #1
Comments
In what resolution are you trying to record your video? Can you also give me a raw dump of what resolutions your camera supports? |
I've proposed a fix on the development brach. |
@jmolsmobile Thanks for you help! CaptureConfiguration config = new CaptureConfiguration(PredefinedCaptureConfigurations.CaptureResolution.RES_720P, PredefinedCaptureConfigurations.CaptureQuality.HIGH);
Intent intent = new Intent(getActivity(), VideoCaptureActivity.class);
intent.putExtra(VideoCaptureActivity.EXTRA_CAPTURE_CONFIGURATION, config);
intent.putExtra(VideoCaptureActivity.EXTRA_OUTPUT_FILENAME, "123.mp4");
startActivityForResult(intent, 0); This is my phone resolution supported by the camera. 12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ height = 1080
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ width = 1920
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ height = 1080
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ width = 1440
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ height = 720
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ width = 1280
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ height = 864
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ width = 1056
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ height = 720
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ width = 960
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ height = 480
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ width = 720
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ height = 480
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ width = 640
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ height = 240
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ width = 320
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ height = 144
12-24 10:31:33.352 6718-6718/com.ecloud.android.musiccourse D/zhuwenwu﹕ width = 176 |
@jmolsmobile I try the development brach,But this problem also exists. ..:: System Info
Available Memory (Mb)=545
Total Memory (Mb)=1810
ANDROID_ID=46d378a909259ad7
CURRENT_TIME_MILLIS=1419389614729
TIME-STAMP=Wed Dec 24 10:53:34 GMT+08:00 2014
LOCALE=zh_CN
ANDROID_SOCKET_zygote=10
EMULATED_STORAGE_SOURCE=/mnt/shell/emulated
SECONDARY_STORAGE=/storage/sdcard1:/storage/usbdisk
ANDROID_STORAGE=/storage
ANDROID_BOOTLOGO=1
EXTERNAL_STORAGE=/storage/emulated/legacy
ANDROID_CACHE=/cache
ANDROID_ASSETS=/system/app
ASEC_MOUNTPOINT=/mnt/asec
PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
LOOP_MOUNTPOINT=/mnt/obb
BOOTCLASSPATH=/system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar:/system/framework/telephony-msim.jar
EMULATED_STORAGE_TARGET=/storage/emulated
TERMINFO=/system/etc/terminfo
ANDROID_DATA=/data
ANDROID_PROPERTY_WORKSPACE=9,0
ANDROID_ROOT=/system
LD_LIBRARY_PATH=/vendor/lib:/system/lib
..:: Version Info
CodeName=REL
Incremental=24da6f94e4
Release=4.4.4
SDK=19
SDK-Version=19
..:: Build Info
Board=MSM8960
Brand=samsung
CPU ABI=armeabi-v7a
Device=jfltezm
Display=cm_jflte-userdebug 4.4.4 KTU84Q 24da6f94e4 test-keys
Fingerprint=samsung/jfltezm/jflte:4.2.2/JDQ39/I9508ZMUAMG1:user/release-keys
Host=cyanogenmod
ID=KTU84Q
Manufacturer=samsung
Model=GT-I9508
Product=jgedlteue
Tags=test-keys
Time=1415786369000
Type=userdebug
User=jenkins
..:: Screen Info
DisplayId=0
Resolution=1080x1920
Orientation=0
RefreshRate (fps)=60.0
Density Dpi=480
Density=3.0
Scaled density=3.0
Xdpi=442.451
Ydpi=439.351
..:: DateTime Info
Locale= zh_CN
Locale Country= CN
Locale Language= 中文
Locale Variant=
Locale ISO Country= CHN
..:: TimeZone
TimeZone Name= 中国标准时间
TimeZone DST Saving= 0
TimeZone Row offset= 28800000
TimeZone SHORT= 0
..:: File build.prop
# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=KTU84Q
ro.build.display.id=cm_jflte-userdebug 4.4.4 KTU84Q 24da6f94e4 test-keys
ro.build.version.incremental=24da6f94e4
ro.build.version.sdk=19
ro.build.version.codename=REL
ro.build.version.release=4.4.4
ro.build.date=Wed Nov 12 01:59:29 PST 2014
ro.build.date.utc=1415786369
ro.build.type=userdebug
ro.build.user=jenkins
ro.build.host=cyanogenmod
ro.build.tags=test-keys
ro.product.brand=samsung
ro.product.name=cm_jflte
ro.product.board=MSM8960
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=samsung
ro.product.locale.language=en
ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=msm8960
# ro.build.product is obsolete; use ro.product.device
ro.build.product=jflte
ro.build.characteristics=default
ro.cm.device=jflte
# end build properties
#
# from device/samsung/jflte/system.prop
#
# system.prop for jflte
# cannot take spaces
rild.libargs=-d /dev/smd0
persist.radio.mode_pref_nv10=1
#
# ADDITIONAL_BUILD_PROPERTIES
#
keyguard.no_require_sim=true
ro.com.android.dateformat=MM-dd-yyyy
ro.carrier=unknown
dalvik.vm.heapstartsize=16m
dalvik.vm.heapgrowthlimit=192m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m
ro.hwui.texture_cache_size=72
ro.hwui.layer_cache_size=48
ro.hwui.r_buffer_cache_size=8
ro.hwui.path_cache_size=32
ro.hwui.gradient_cache_size=1
ro.hwui.drop_shadow_cache_size=6
ro.hwui.texture_cache_flushrate=0.4
ro.hwui.text_small_cache_width=1024
ro.hwui.text_small_cache_height=1024
ro.hwui.text_large_cache_width=2048
ro.hwui.text_large_cache_height=1024
persist.audio.fluence.mode=endfire
persist.audio.vr.enable=false
persist.audio.handset.mic=digital
persist.audio.speaker.location=high
ro.qc.sdk.audio.fluencetype=fluence
ro.hwui.text_cache_width=2048
ro.opengles.version=196608
ro.sf.lcd_density=480
persist.data.ds_fmc_app.mode=0
persist.data_netmgrd_nint=16
persist.omh.enabled=1
persist.radio.add_power_save=1
persist.radio.apm_sim_not_pwdn=1
persist.radio.fill_eons=1
persist.radio.use_se_table_only=1
rild.libpath=/system/lib/libsec-ril.so
ro.telephony.ril.v3=newDriverCallU,newDialCode
ro.gps.agps_provider=1
ro.qc.sdk.izat.premium_enabled=0
ro.qc.sdk.izat.service_mask=0x0
persist.gps.qc_nlp_in_use=0
lpa.decode=true
mm.enable.smoothstreaming=true
persist.rild.nitz_plmn=
persist.rild.nitz_long_ons_0=
persist.rild.nitz_long_ons_1=
persist.rild.nitz_long_ons_2=
persist.rild.nitz_long_ons_3=
persist.rild.nitz_short_ons_0=
persist.rild.nitz_short_ons_1=
persist.rild.nitz_short_ons_2=
persist.rild.nitz_short_ons_3=
persist.timed.enable=true
ro.vendor.extension_library=/system/vendor/lib/libqc-opt.so
ro.cwm.enable_key_repeat=true
ro.cwm.repeatable_keys=114,115
ro.telephony.ril_class=SamsungQualcommRIL
wifi.interface=wlan0
com.qc.hardware=true
debug.egl.hw=1
debug.sf.hw=1
debug.mdpcomp.logs=0
persist.hwc.mdpcomp.enable=true
ro.telephony.call_ring.multiple=0
ro.rommanager.developerid=cyanogenmod
ro.com.google.clientidbase=android-google
ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html
ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html
ro.com.android.wifi-watchlist=GoogleGuest
ro.setupwizard.enterprise_mode=1
ro.com.android.dataroaming=false
ro.build.selinux=1
persist.sys.dalvik.multithread=false
persist.sys.dun.override=0
persist.sys.root_access=1
ro.cm.version=11-20141112-SNAPSHOT-M12-jflte
ro.cm.releasetype=SNAPSHOT
ro.modversion=11-20141112-SNAPSHOT-M12-jflte
ro.cmlegal.url=http://www.cyanogenmod.org/docs/privacy
persist.sys.recovery_update=false
ro.cm.display.version=11-20141112-SNAPSHOT-M12-jflte
ro.error.receiver.system.apps=org.cyanogenmod.bugreport
ro.config.notification_sound=Argon.ogg
ro.config.alarm_alert=Hassium.ogg
ro.config.ringtone=Orion.ogg
persist.sys.dalvik.vm.lib=libdvm.so
dalvik.vm.lockprof.threshold=500
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt |
When the recording fails (with error 100), what resolution are you requesting? |
@jmolsmobile Thanks you reply. Merry Christmas! Happy new year! CaptureConfiguration config = new CaptureConfiguration(PredefinedCaptureConfigurations.CaptureResolution.RES_720P, PredefinedCaptureConfigurations.CaptureQuality.HIGH);
Intent intent = new Intent(getActivity(), VideoCaptureActivity.class);
intent.putExtra(VideoCaptureActivity.EXTRA_CAPTURE_CONFIGURATION, config);
intent.putExtra(VideoCaptureActivity.EXTRA_OUTPUT_FILENAME, "123.mp4");
startActivityForResult(intent, 0); I see the function is error. private boolean startRecorder() {
try {
getMediaRecorder().start();//This line error.The logs is
//12-27 15:11:42.773 7999-8010/com.ecloud.android.musiccourse W/IMediaDeathNotifier﹕ media server died
//12-27 15:11:42.773 7999-8010/com.ecloud.android.musiccourse W/CameraBase﹕ Camera service died!
//12-27 15:11:42.773 7999-8010/com.ecloud.android.musiccourse W/CameraBase﹕ mediaserver's remote binder Camera object died
CLog.d(CLog.RECORDER, "MediaRecorder successfully started");
return true;
} catch (final IllegalStateException e) {
e.printStackTrace();
CLog.e(CLog.RECORDER, "MediaRecorder start failed - " + e.toString());
return false;
} catch (final RuntimeException e2) {
e2.printStackTrace();
CLog.e(CLog.RECORDER, "MediaRecorder start failed - " + e2.toString());
mRecorderInterface.onRecordingFailed("Unable to record video with given settings");
return false;
}
} This is logs 12-27 15:10:50.452 7999-7999/com.ecloud.android.musiccourse V/Zygote﹕ Switching descriptor 33 to /dev/null
12-27 15:10:50.452 7999-7999/com.ecloud.android.musiccourse V/Zygote﹕ Switching descriptor 10 to /dev/null
12-27 15:10:50.462 7999-7999/com.ecloud.android.musiccourse D/dalvikvm﹕ Late-enabling CheckJNI
12-27 15:10:50.542 7999-7999/com.ecloud.android.musiccourse D/dalvikvm﹕ Trying to load lib /data/data/com.lbe.security/app_hips/liblbeclient.so 0x4304ba98
12-27 15:10:50.542 7999-7999/com.ecloud.android.musiccourse D/dalvikvm﹕ Added shared lib /data/data/com.lbe.security/app_hips/liblbeclient.so 0x4304ba98
12-27 15:10:50.622 7999-7999/com.ecloud.android.musiccourse D/dalvikvm﹕ wrong object type: Lcom/lbe/security/service/core/client/b/n; Landroid/util/ArrayMap;
12-27 15:10:50.622 7999-7999/com.ecloud.android.musiccourse D/ActivityThread﹕ handleBindApplication:com.ecloud.android.musiccourse
12-27 15:10:50.622 7999-7999/com.ecloud.android.musiccourse D/ActivityThread﹕ setTargetHeapUtilization:0.75
12-27 15:10:50.622 7999-7999/com.ecloud.android.musiccourse D/ActivityThread﹕ setTargetHeapMinFree:2097152
12-27 15:10:50.823 7999-7999/com.ecloud.android.musiccourse I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
12-27 15:10:50.823 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ VFY: unable to resolve virtual method 463: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
12-27 15:10:50.823 7999-7999/com.ecloud.android.musiccourse D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
12-27 15:10:50.823 7999-7999/com.ecloud.android.musiccourse I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
12-27 15:10:50.823 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ VFY: unable to resolve virtual method 485: Landroid/content/res/TypedArray;.getType (I)I
12-27 15:10:50.823 7999-7999/com.ecloud.android.musiccourse D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
12-27 15:10:50.923 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
12-27 15:10:50.923 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
12-27 15:10:50.923 7999-7999/com.ecloud.android.musiccourse I/dalvikvm﹕ Could not find method java.nio.file.Files.newOutputStream, referenced from method okio.Okio.sink
12-27 15:10:50.923 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ VFY: unable to resolve static method 37917: Ljava/nio/file/Files;.newOutputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/OutputStream;
12-27 15:10:50.923 7999-7999/com.ecloud.android.musiccourse D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000a
12-27 15:10:50.923 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
12-27 15:10:50.923 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
12-27 15:10:50.923 7999-7999/com.ecloud.android.musiccourse I/dalvikvm﹕ Could not find method java.nio.file.Files.newInputStream, referenced from method okio.Okio.source
12-27 15:10:50.923 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ VFY: unable to resolve static method 37916: Ljava/nio/file/Files;.newInputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/InputStream;
12-27 15:10:50.923 7999-7999/com.ecloud.android.musiccourse D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000a
12-27 15:10:50.943 7999-7999/com.ecloud.android.musiccourse W/Settings﹕ Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
12-27 15:10:51.183 7999-7999/com.ecloud.android.musiccourse I/dalvikvm﹕ Could not find method com.melnykov.fab.FloatingActionButton.setElevation, referenced from method com.melnykov.fab.FloatingActionButton.setBackgroundCompat
12-27 15:10:51.183 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ VFY: unable to resolve virtual method 33452: Lcom/melnykov/fab/FloatingActionButton;.setElevation (F)V
12-27 15:10:51.183 7999-7999/com.ecloud.android.musiccourse D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0013
12-27 15:10:51.193 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ Unable to resolve superclass of Lcom/melnykov/fab/FloatingActionButton$1; (1547)
12-27 15:10:51.193 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ Link of class 'Lcom/melnykov/fab/FloatingActionButton$1;' failed
12-27 15:10:51.193 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ Unable to resolve superclass of Lcom/melnykov/fab/FloatingActionButton$1; (1547)
12-27 15:10:51.193 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ Link of class 'Lcom/melnykov/fab/FloatingActionButton$1;' failed
12-27 15:10:51.193 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ Unable to resolve superclass of Lcom/melnykov/fab/FloatingActionButton$1; (1547)
12-27 15:10:51.193 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ Link of class 'Lcom/melnykov/fab/FloatingActionButton$1;' failed
12-27 15:10:51.193 7999-7999/com.ecloud.android.musiccourse D/dalvikvm﹕ DexOpt: unable to opt direct call 0x02fd at 0x2a in Lcom/melnykov/fab/FloatingActionButton;.setBackgroundCompat
12-27 15:10:51.193 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ Unable to resolve superclass of Lcom/melnykov/fab/FloatingActionButton$1; (1547)
12-27 15:10:51.193 7999-7999/com.ecloud.android.musiccourse W/dalvikvm﹕ Link of class 'Lcom/melnykov/fab/FloatingActionButton$1;' failed
12-27 15:10:51.193 7999-7999/com.ecloud.android.musiccourse D/dalvikvm﹕ DexOpt: unable to opt direct call 0x8263 at 0x2f in Lcom/melnykov/fab/FloatingActionButton;.setBackgroundCompat
12-27 15:10:51.253 7999-7999/com.ecloud.android.musiccourse I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:320>: EGL 1.4 QUALCOMM build: _msm8960_kk_2.7__release_AU ()
OpenGL ES Shader Compiler Version: 20.00.01
Build Date: 11/07/13 Thu
Local Branch: klp
Remote Branch: quic/hammerhead_klp
Local Patches: NONE
Reconstruct Branch: NOTHING
12-27 15:10:51.283 7999-7999/com.ecloud.android.musiccourse D/OpenGLRenderer﹕ Enabling debug mode 0
12-27 15:10:51.633 7999-8069/com.ecloud.android.musiccourse V/RenderScript﹕ 0x7795c008 Launching thread(s), CPUs 4
12-27 15:10:51.694 7999-8069/com.ecloud.android.musiccourse E/RenderScript﹕ Successfully loaded runtime: libRSDriver_adreno.so
12-27 15:10:51.934 7999-7999/com.ecloud.android.musiccourse I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy@4304a1c0 time:146585396
12-27 15:11:32.944 7999-7999/com.ecloud.android.musiccourse I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy@4304a1c0 time:146626408
12-27 15:11:36.417 7999-7999/com.ecloud.android.musiccourse I/Timeline﹕ Timeline: Activity_launch_request id:com.ecloud.android.musiccourse time:146629874
12-27 15:11:37.338 7999-7999/com.ecloud.android.musiccourse D/VideoCapture_CameraWrapper﹕ Preview size: 1920x1080
12-27 15:11:37.338 7999-7999/com.ecloud.android.musiccourse D/VideoCapture_Preview﹕ Configured camera for preview in surface of 1920 by 1080
12-27 15:11:38.309 7999-7999/com.ecloud.android.musiccourse I/Choreographer﹕ Skipped 64 frames! The application may be doing too much work on its main thread.
12-27 15:11:38.389 7999-7999/com.ecloud.android.musiccourse I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy@434724b0 time:146631842
12-27 15:11:38.389 7999-7999/com.ecloud.android.musiccourse I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy@434724b0 time:146631843
12-27 15:11:42.023 7999-7999/com.ecloud.android.musiccourse D/VideoCapture_CameraWrapper﹕ Recording size: 1280x720
12-27 15:11:42.023 7999-7999/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ MediaRecorder successfully initialized
12-27 15:11:42.053 7999-7999/com.ecloud.android.musiccourse I/MediaRecorderJNI﹕ prepare: surface=0x7a149f88
12-27 15:11:42.053 7999-7999/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ MediaRecorder successfully prepared
12-27 15:11:42.773 7999-8010/com.ecloud.android.musiccourse W/IMediaDeathNotifier﹕ media server died
12-27 15:11:42.773 7999-8010/com.ecloud.android.musiccourse W/CameraBase﹕ Camera service died!
12-27 15:11:42.773 7999-8010/com.ecloud.android.musiccourse W/CameraBase﹕ mediaserver's remote binder Camera object died
12-27 15:11:42.773 7999-7999/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ MediaRecorder successfully started
12-27 15:11:42.773 7999-7999/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ Successfully started recording - outputfile: /storage/emulated/0/Movies/123.mp4
12-27 15:11:42.773 7999-7999/com.ecloud.android.musiccourse I/Choreographer﹕ Skipped 46 frames! The application may be doing too much work on its main thread.
12-27 15:11:42.793 7999-7999/com.ecloud.android.musiccourse E/Camera﹕ Error 100
12-27 15:11:50.831 7999-7999/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ Successfully stopped recording - outputfile: /storage/emulated/0/Movies/123.mp4
12-27 15:11:50.841 7999-7999/com.ecloud.android.musiccourse D/VideoCapture_Activity﹕ Failed to generate video preview
12-27 15:11:50.861 7999-7999/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ Released all resources
12-27 15:11:53.794 7999-7999/com.ecloud.android.musiccourse D/VideoCapture_VideoRecorder﹕ Released all resources
12-27 15:11:54.074 7999-7999/com.ecloud.android.musiccourse I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy@4304a1c0 time:146647532
12-27 15:12:04.364 7999-8005/com.ecloud.android.musiccourse D/dalvikvm﹕ Debugger has detached; object registry had 1 entries |
@jmolsmobile @SuppressWarnings("deprecation")
protected void configureMediaRecorder(final MediaRecorder recorder, android.hardware.Camera camera)
throws IllegalStateException, IllegalArgumentException {
recorder.setCamera(camera);
recorder.setAudioSource(mCaptureConfiguration.getAudioSource());
recorder.setVideoSource(mCaptureConfiguration.getVideoSource());
//my add begin
CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH);
RecordingSize size = mCameraWrapper.getSupportedRecordingSize(mCaptureConfiguration.getVideoWidth(), mCaptureConfiguration.getVideoHeight());
profile.videoFrameWidth = size.width;
profile.videoFrameHeight = size.height;
recorder.setProfile(profile);
//my add end
// Order is important
// recorder.setOutputFormat(mCaptureConfiguration.getOutputFormat());
// recorder.setMaxDuration(mCaptureConfiguration.getMaxCaptureDuration());
recorder.setOutputFile(mVideoFile.getFullPath());
// RecordingSize size = mCameraWrapper.getSupportedRecordingSize(mCaptureConfiguration.getVideoWidth(), mCaptureConfiguration.getVideoHeight());
// recorder.setVideoSize(size.width, size.height);
// recorder.setVideoEncodingBitRate(mCaptureConfiguration.getVideoBitrate());
// recorder.setAudioEncoder(mCaptureConfiguration.getAudioEncoder());
// recorder.setVideoEncoder(mCaptureConfiguration.getVideoEncoder());
// recorder.setPreviewDisplay(mPreviewSurface);
try {
recorder.setMaxFileSize(mCaptureConfiguration.getMaxCaptureFileSize());
} catch (IllegalArgumentException e) {
CLog.e(CLog.RECORDER, "Failed to set max filesize - illegal argument: " + mCaptureConfiguration.getMaxCaptureFileSize());
} catch (RuntimeException e2) {
CLog.e(CLog.RECORDER, "Failed to set max filesize - runtime exception");
}
recorder.setOnInfoListener(this);
} |
@Frank-Zhu Also a Merry Christmas and very happy new year to you! There is a very good reason why I decided not to use the default profiles, because I needed more fine grained control over the bitrate and quality. Furthermore, the video format had to be supported by both Android and iOS devices. (used in a social networking app) What I suspect is that the combination of videoencoder, videobitrate and videoquality is not supported by your device, hence the mediarecorder fails to prepare. Can you try the following:
|
@jmolsmobile Thanks you reply. I use this code it can work. Just remove this line code **recorder.setPreviewDisplay(mPreviewSurface);**I very much doubt this code. protected void configureMediaRecorder(final MediaRecorder recorder, android.hardware.Camera camera)
throws IllegalStateException, IllegalArgumentException {
recorder.setCamera(camera);
recorder.setAudioSource(mCaptureConfiguration.getAudioSource());
recorder.setVideoSource(mCaptureConfiguration.getVideoSource());
CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_720P);
RecordingSize size = mCameraWrapper.getSupportedRecordingSize(mCaptureConfiguration.getVideoWidth(), mCaptureConfiguration.getVideoHeight());
profile.videoFrameWidth = size.width;
profile.videoFrameHeight = size.height;
//add set begin
profile.fileFormat = mCaptureConfiguration.getOutputFormat();
profile.duration = mCaptureConfiguration.getMaxCaptureDuration();
profile.audioBitRate = mCaptureConfiguration.getVideoBitrate();
profile.audioCodec = mCaptureConfiguration.getAudioEncoder();
profile.videoCodec = mCaptureConfiguration.getVideoEncoder();
//add set end
recorder.setProfile(profile);
// Order is important
// recorder.setOutputFormat(mCaptureConfiguration.getOutputFormat());
// recorder.setMaxDuration(mCaptureConfiguration.getMaxCaptureDuration());
recorder.setOutputFile(mVideoFile.getFullPath());
// RecordingSize size = mCameraWrapper.getSupportedRecordingSize(mCaptureConfiguration.getVideoWidth(), mCaptureConfiguration.getVideoHeight());
// recorder.setVideoSize(size.width, size.height);
// recorder.setVideoEncodingBitRate(mCaptureConfiguration.getVideoBitrate());
// recorder.setAudioEncoder(mCaptureConfiguration.getAudioEncoder());
// recorder.setVideoEncoder(mCaptureConfiguration.getVideoEncoder());
// recorder.setPreviewDisplay(mPreviewSurface);
try {
recorder.setMaxFileSize(mCaptureConfiguration.getMaxCaptureFileSize());
} catch (IllegalArgumentException e) {
CLog.e(CLog.RECORDER, "Failed to set max filesize - illegal argument: " + mCaptureConfiguration.getMaxCaptureFileSize());
} catch (RuntimeException e2) {
CLog.e(CLog.RECORDER, "Failed to set max filesize - runtime exception");
}
recorder.setOnInfoListener(this);
} |
Took me some time to update all tests, but I've updated the development branch with your recommendation. (good idea to start from existing profile). @Frank-Zhu Can you please check if this is working on all your devices? |
@jmolsmobile I'll test and add test result tomorrow |
@Frank-Zhu Is it only the setPreviewDisplay() that is causing the issue? Does my original code work when you remove only that line? I'm noticing issues with this new approach on a Samsung Galaxy S (running Android 4.4 CM) |
@jmolsmobile I`m test my Samsung Galaxy S devices.Just **recorder.setProfile(profile);**It can work,Others not work.And my MEIZU devices this function error(CameraWrapper.java) protected List<Size> getSupportedVideoSizes() {
Parameters params = getCameraParametersAfterUnlocking();
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
// return params.getSupportedVideoSizes();//This params List<Size> is NULL
// } else {
// CLog.e(CLog.CAMERA, "Using supportedPreviewSizes iso supportedVideoSizes due to API restriction");
return params.getSupportedPreviewSizes();
// }
} This code at my all devices(Samsung Galaxy S4 、 Nexus 5、MEIZU) can work. @SuppressWarnings("deprecation")
protected void configureMediaRecorder(final MediaRecorder recorder, android.hardware.Camera camera)
throws IllegalStateException, IllegalArgumentException {
recorder.setCamera(camera);
recorder.setAudioSource(mCaptureConfiguration.getAudioSource());
recorder.setVideoSource(mCaptureConfiguration.getVideoSource());
CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_720P);// can change Quality level its can work
RecordingSize size = mCameraWrapper.getSupportedRecordingSize(mCaptureConfiguration.getVideoWidth(), mCaptureConfiguration.getVideoHeight());
profile.videoFrameWidth = size.width;
profile.videoFrameHeight = size.height;
profile.fileFormat = mCaptureConfiguration.getOutputFormat();
profile.duration = mCaptureConfiguration.getMaxCaptureDuration();
profile.audioBitRate = mCaptureConfiguration.getVideoBitrate();
profile.audioCodec = mCaptureConfiguration.getAudioEncoder();
profile.videoCodec = mCaptureConfiguration.getVideoEncoder();
recorder.setProfile(profile);
// Order is important
// recorder.setOutputFormat(mCaptureConfiguration.getOutputFormat());
// recorder.setMaxDuration(mCaptureConfiguration.getMaxCaptureDuration());
recorder.setOutputFile(mVideoFile.getFullPath());
// RecordingSize size = mCameraWrapper.getSupportedRecordingSize(mCaptureConfiguration.getVideoWidth(), mCaptureConfiguration.getVideoHeight());
// recorder.setVideoSize(size.width, size.height);
// recorder.setVideoEncodingBitRate(mCaptureConfiguration.getVideoBitrate());
// recorder.setAudioEncoder(mCaptureConfiguration.getAudioEncoder());
// recorder.setVideoEncoder(mCaptureConfiguration.getVideoEncoder());
// recorder.setPreviewDisplay(mPreviewSurface);
try {
recorder.setMaxFileSize(mCaptureConfiguration.getMaxCaptureFileSize());
} catch (IllegalArgumentException e) {
CLog.e(CLog.RECORDER, "Failed to set max filesize - illegal argument: " + mCaptureConfiguration.getMaxCaptureFileSize());
} catch (RuntimeException e2) {
CLog.e(CLog.RECORDER, "Failed to set max filesize - runtime exception");
}
recorder.setOnInfoListener(this);
} |
@Frank-Zhu Thanks for testing all this, I have to more questions:
|
@jmolsmobile Forgive my poor English. @SuppressWarnings("deprecation")
protected void configureMediaRecorder(final MediaRecorder recorder, android.hardware.Camera camera)
throws IllegalStateException, IllegalArgumentException {
recorder.setCamera(camera);
recorder.setAudioSource(mCaptureConfiguration.getAudioSource());
recorder.setVideoSource(mCaptureConfiguration.getVideoSource());
// Begin My Samsung Galaxy S4 devices In this manner is possible
CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_720P);// can change Quality level its can work
RecordingSize size = mCameraWrapper.getSupportedRecordingSize(mCaptureConfiguration.getVideoWidth(), mCaptureConfiguration.getVideoHeight());
profile.videoFrameWidth = size.width;
profile.videoFrameHeight = size.height;
profile.fileFormat = mCaptureConfiguration.getOutputFormat();
profile.duration = mCaptureConfiguration.getMaxCaptureDuration();
profile.audioBitRate = mCaptureConfiguration.getVideoBitrate();
profile.audioCodec = mCaptureConfiguration.getAudioEncoder();
profile.videoCodec = mCaptureConfiguration.getVideoEncoder();
recorder.setProfile(profile);
// End My Samsung Galaxy S4 devices In this manner is possible
recorder.setOutputFile(mVideoFile.getFullPath());
// I am very confused, Following this way, why not?
// Begin My Samsung Galaxy S4 devices In this manner is not possible
// Order is important
// recorder.setOutputFormat(mCaptureConfiguration.getOutputFormat());
// recorder.setMaxDuration(mCaptureConfiguration.getMaxCaptureDuration());
// RecordingSize size = mCameraWrapper.getSupportedRecordingSize(mCaptureConfiguration.getVideoWidth(), mCaptureConfiguration.getVideoHeight());
// recorder.setVideoSize(size.width, size.height);
// recorder.setVideoEncodingBitRate(mCaptureConfiguration.getVideoBitrate());
// recorder.setAudioEncoder(mCaptureConfiguration.getAudioEncoder());
// recorder.setVideoEncoder(mCaptureConfiguration.getVideoEncoder());
// End My Samsung Galaxy S4 devices In this manner is not possible
// recorder.setPreviewDisplay(mPreviewSurface);
try {
recorder.setMaxFileSize(mCaptureConfiguration.getMaxCaptureFileSize());
} catch (IllegalArgumentException e) {
CLog.e(CLog.RECORDER, "Failed to set max filesize - illegal argument: " + mCaptureConfiguration.getMaxCaptureFileSize());
} catch (RuntimeException e2) {
CLog.e(CLog.RECORDER, "Failed to set max filesize - runtime exception");
}
recorder.setOnInfoListener(this);
} questions 2:The error in getSupportedVideoSizes() is it because params.getSupportedVideoSizes() returns a null list -->YES The my MEIZU devices. |
@Frank-Zhu I've pushed a fix for the null I'm still facing issues with the new code on the Galaxy S running Cyanogenmod, but I will look into that offline here. Once I get that fixed, I will close this bug, merge to master and make a new release. |
@jmolsmobile Thanks! 👍 |
Version 1.0.7 is now available via Maven. |
I use this lib, but I get this exception . I had error 100 on samsung galaxy s4.
The text was updated successfully, but these errors were encountered: