Zhaoss / WeiXinRecordedDemo

仿微信视频拍摄UI, 基于ffmpeg的视频录制编辑
MIT License
2.25k stars 468 forks source link

华为P9黑屏 #16

Closed stayinxing closed 6 years ago

Zhaoss commented 7 years ago

自己看下log 是不是录制时初始化失败, 看下是不是分辨率没设对

stayinxing commented 7 years ago

ava.lang.RuntimeException: setParameters failed 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.hardware.Camera.native_setParameters(Native Method) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.hardware.Camera.setParameters(Camera.java:1722) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at com.yixia.camera.MediaRecorderBase.startPreview(MediaRecorderBase.java:525) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at com.yixia.camera.MediaRecorderBase.surfaceCreated(MediaRecorderBase.java:608) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.view.SurfaceView.updateWindow(SurfaceView.java:583) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.view.SurfaceView.access$000(SurfaceView.java:88) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:177) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:847) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1944) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1042) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5905) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:780) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:593) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.view.Choreographer.doFrame(Choreographer.java:562) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:766) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.os.Handler.handleCallback(Handler.java:733) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.os.Looper.loop(Looper.java:136) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5314) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at java.lang.reflect.Method.invokeNative(Native Method) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at java.lang.reflect.Method.invoke(Method.java:515) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo W/System.err: at dalvik.system.NativeStart.main(Native Method) 03-17 17:14:36.810 7160-7160/com.example.zhaoshuang.weixinrecordeddemo E/Yixia: startPreview fail :setParameters failed

看来是预览失败了。

关于摄像头的适配,还是不能写死了。应该动态的去适配吧。还有,有的手机前置摄像头拍出来是倒的。能不能解决下。

在 2017年3月17日,下午5:11,赵爽 notifications@github.com 写道:

自己看下log 是不是录制时初始化失败, 看下是不是分辨率没设对

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Zhaoss/WeiXinRecordedDemo/issues/16#issuecomment-287303514, or mute the thread https://github.com/notifications/unsubscribe-auth/ADtWYmAfSsFD2XTtFX_liDtO6HQOZf2Wks5rmk5YgaJpZM4MgVlM.

Zhaoss commented 7 years ago

要用ffmpeg把视频转180度 自己查语句去转吧

stayinxing commented 7 years ago

/**

在 2017年3月17日,下午5:20,赵爽 notifications@github.com 写道:

要用ffmpeg把视频转180度 自己查语句去转吧

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Zhaoss/WeiXinRecordedDemo/issues/16#issuecomment-287305224, or mute the thread https://github.com/notifications/unsubscribe-auth/ADtWYojoDIGB6Cf-jNyhEhMNDeyEwXfPks5rmlBhgaJpZM4MgVlM.

stayinxing commented 7 years ago

上面个那个黑屏日志,是因为尺寸不对吗?

在 2017年3月17日,下午5:20,赵爽 notifications@github.com 写道:

要用ffmpeg把视频转180度 自己查语句去转吧

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Zhaoss/WeiXinRecordedDemo/issues/16#issuecomment-287305224, or mute the thread https://github.com/notifications/unsubscribe-auth/ADtWYojoDIGB6Cf-jNyhEhMNDeyEwXfPks5rmlBhgaJpZM4MgVlM.

Zhaoss commented 7 years ago

是的 setParameters我用到的有两点 一个是手动对焦 还有就是设置宽高 你这个应该就是录制宽高 动态配置宽高你自己做一下就行了啊 我这只是一个demo而已