[android-developers] Re: video recording issue
Hi Did u able to record a video in android emulator , could you please help to share the code for recording the video I am new to android development , from the snippet here i dont know what package to import. CAn u please send the source for the video record BTW i am newbi to the android development Thanks and Regards Vish On Nov 19, 10:38 pm, Greivin Lopez wrote: > I think you don't have to open and set parameters for the camera when > recordingvideo, at least it never work for me, try to remove this > code: > "camera = Camera.open(); > Camera.Parameters parameters = camera.getParameters(); > parameters.setPreviewSize(352, 288); > parameters.set("orientation", "portrait"); > camera.setParameters(parameters);" > > Also you need to be sure that you are setting the correct permissions > in the Manifest file, I suggest you these ones: > > > android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> > > > I see no other problems but as a matter of fact I was not able to use > the media recorder in a portrait layout... it just stay landscape. I > don't know if it was just me or what. > > I hope you could fix your problem. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: video recording issue
I think you don't have to open and set parameters for the camera when recording video, at least it never work for me, try to remove this code: "camera = Camera.open(); Camera.Parameters parameters = camera.getParameters(); parameters.setPreviewSize(352, 288); parameters.set("orientation", "portrait"); camera.setParameters(parameters);" Also you need to be sure that you are setting the correct permissions in the Manifest file, I suggest you these ones: I see no other problems but as a matter of fact I was not able to use the media recorder in a portrait layout... it just stay landscape. I don't know if it was just me or what. I hope you could fix your problem. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: video recording issue
when i add video source and video encoder, it gives error in recoreder.prepare() (prepare failed) while the same code is working only for audio. i am not finding what i am doing wrong.Please help setContentView(R.layout.camera); preview=(SurfaceView)findViewById(R.id.surface); previewHolder=preview.getHolder(); previewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); recorder = new MediaRecorder(); String url = "/sdcard/dcim/test.3gp"; camera = Camera.open(); Camera.Parameters parameters = camera.getParameters(); parameters.setPreviewSize(352, 288); parameters.set("orientation", "portrait"); camera.setParameters(parameters); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setOutputFile(url); recorder.setVideoFrameRate(15); recorder.setVideoSize(480, 320); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263); recorder.prepare(); recorder.start(); Thread.sleep(10); recorder.stop(); recorder.release(); } catch (Exception e) { e.getMessage(); } On Nov 17, 10:32 pm, android_dev wrote: > HI, > i am trying to record video and upload to web, i have given my best > effort but no luck, i am not sure if it is possible with android 1.6. > Please help me to figure out the solution. is it possible to do > that.its really urgent -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en