video recording issue

by android_dev » Wed, 18 Nov 2009 01:33:02 GMT


Sponsored Links
 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

--



video recording issue

by android_dev » Thu, 19 Nov 2009 08:42:12 GMT


 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(100000);
recorder.stop();
recorder.release();

} catch (Exception e) {
e.getMessage();
}




--


Sponsored Links


video recording issue

by Greivin Lopez » Thu, 19 Nov 2009 22:38:58 GMT


 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:

<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>

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.

--



video recording issue

by WrVishnu » Sun, 29 Nov 2009 04:21:06 GMT


 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




--



Other Threads

1. About the use of the Wi-Fi function

Could you lend wisdom ..someone.. though in Windows XP/Vista, it is
using the Wi-Fi function?

Wanting to know is the following four points.

1.
Is mounting completed about API related to Wi-Fi?

- It was written the unmounting, and though some old information was
able to be
found 
http://www.muo.jp/android/?toolbox/optional-apis.html
http://groups.google.co.jp/group/android-internals/browse_thread/thre...

2.
Do you operate in the environments other than Windows XP/Vista?

3.
Do corresponding Wi-Fi device and driver exist?(Can you obtain it?)

4.
To begin with, is the writing of the code only bad?

For your information, the code made by way of experiment is described
as
follows.

WifiManager manager = (WifiManager)
this.getSystemService(Context.WIFI_SERVICE);

manager.setWifiEnabled(true);

manager.startScan();

for (ScanResult result : manager.getScanResults()) {
System.out.println("ScanResult:" + result.toString());

}

The following error messages are displayed in LogCat.

09-17 10:23:12.837: ERROR/WifiService(53): Failed to load Wi-Fi
driver.

--~--~---------~--~----~------------~-------~--~----~

2. Images and Layout Questions

I'm making a fairly simple application, but I'd like to dress it up
with some custom buttons and backgrounds.  The problem is I'd like to
control the layout of them to make sure it looks a certain way.  I'm
not really sure what to do resolution wise to make sure this will work
once the actual phones come out.

I know for textSize there's a few different settings, one of which
seems to be resolution independent, but in the case of something with
images and buttons how will I know my layout will look consistent from
phone to phone?

Is there a best practice for layouts with images and buttons to make
sure the look is consitent or is there a standard size I can rely
on?

Thanks for any tips..

Mark
--~--~---------~--~----~------------~-------~--~----~

3. how to get access to private API s

4. EventHandler ?

5. *** TCP connect() time out ***

6. Not able to list /data/app directory

7. I got banned at android-developers group