Android :: PV MediaRecorder Native Video Recording Error
Aug 7, 2010
Dear PV engineer: I have try several days for this. We want to add video conference function in PV opencore, so we need to create video capture node in native mode, I try the following code to capture video, My code is like this:
CODE:......................
View 2 Replies
May 25, 2009
Record audio using the native AudioRecord interface? I'm trying to do this on my Neo Freerunner but all I get in logcat is:
I/AudioHardwareALSA( 787): Initialized ALSA CAPTURE device AndroidRecord_Microphone
D/AudioHardwareALSA( 787): Set CAPTURE PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 787): Using 1 channel for CAPTURE.
D/AudioHardwareALSA( 787): Set CAPTURE sample rate to 8000 HZ
E/AudioFlinger( 787): Error reading audio input
W/AudioRecord( 947): obtainBuffer timed out (is the CPU pegged?) user=00000000, server=00000000
The android::AudioRecord::read() function returns the number of bytes I'm trying to read, but the resulting buffer is filled with zeroes.
View 1 Replies
View Related
Oct 12, 2010
Can you please tell me how can I keep the MediaRecorder keeps recording after an orientation change? I try looking into source code of packages/apps/SoundRecorder/src/com/android/soundrecorder/Recorder.java, I don't see it handles that cases.
View 1 Replies
View Related
Nov 18, 2009
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.
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(); }
View 3 Replies
View Related
Jul 11, 2010
I've tried recording video using MediaRecorder API but the file that gets saved each time is of 0 bytes.
I use the MediaRecorder recorder = new MediaRecorder(); ad then recorder.setVideoSource . . .recorder.prepare() to generate the preview and when the user clicks record, i say recorder.start() but the file recorded is of 0 bytes. And after some time, recorder.stop() -on user click that is.
View 2 Replies
View Related
May 6, 2009
Does anyone know how to use the MediaRecorder to API to capture video?
I am writing an application where I want to be able to capture video. I am trying to use the MediaRecorder API in 1.5, which is supposed to support video capture. However, there are no examples in the documentation on how to use this API for video (only for audio, and that works perfect). Basically what I do is the following:
CODE:...............
This gives me the following error: E/CameraInput( 37): No surface is available for display E/MediaRecorder( 7609): prepare failed: -2147483648
OK, so I have to have a surface to preview the video? Could be useful I guess, but not something I really need.
Could I use the VideoView widget for this, or is that only for playback?
Or am I supposed to use a SurfaceView to preview the video? I saw someone use that to capture images, but they used android.hardware.Camera to open the camera and capture a frame, and did not use MediaRecorder.
HOw to capture video, or even better have some example code?
View 1 Replies
View Related
Jul 10, 2009
I want to get the stream and send it to server directly by using MediaRecorder.
Actually, I am able to record the video,and able to store it into sdcard. Now I want to it to stream (live stream) to server rather than storing it.
View 5 Replies
View Related
Aug 30, 2010
I'm using MediaRecorder.setOutputFile(FileDescriptor fd) over a UNIX socket, so that local code on the device can see the encoded stream in real time (for video streaming out).
What I observed is that the encoder doesn't write encoded frames continuously, when they are produced, but by "bursts", exactly one second apart. I tried both containers (THREE_GPP and MPEG_4) and all three available codecs (MPEG_4_SP, H263, H264), the behavior is always the same. This one-second period is notably unrelated to framerate or bitrate, so it is not flushing by size; rather, it seems to be flushing by time (possibly to mask SD card write overheads ? Bummer, I 'm not using the SD here !). Is it a known limitation ? Is there a known workaround ?
View 2 Replies
View Related
Jan 28, 2010
Is there a way to get the best quality of video recording possible using MediaRecorder? the camcorder app does a lot better in terms of quality.
View 5 Replies
View Related
Oct 10, 2010
When I record video by MediaRecorder, it always records in landscape mode, regardless of real device orientation. How to force MediaRecorder/Camera use real orientation ?
View 1 Replies
View Related
Jun 17, 2010
I try to use the MediaRecorder class to record a video but I get an exception : failed to get Camera parameters. Prepare failed.
Here's my code :
CODE:.....................
View 1 Replies
View Related
Sep 8, 2009
I am trying to write a sample program to record the video (say camcorder application). When i run my program using the emulator (I have android-sdk- windows-1.5_r3) I see java.io.IOException: prepare failed. error in logcat output.
Further I can see that I have came across this error when i call MediaRecorder.prepare() from CamcorderActivity.surfaceCreated() But I am surprised to see that activity got launched and I am seeing the camera preview! Again the preview is seen only in half of the screen! Its weird!!!
Further when i do recorder.start() to record the video I get java.lang.IllegalStateException. Yes this is obvious since the prepare () has failed. But the question is why prepare() has failed ?
Here is my code ... package com.example;
CODE:................
View 2 Replies
View Related
Nov 30, 2009
I'm trying to use android.media.MediaRecorder to record video, and no matter what I do the android runtime segmentation faults when I call prepare().
Here's an example:
CODE:....................
View 2 Replies
View Related
Apr 12, 2012
I have a question regarding the Android MediaRecorder -
My test device
HTC Desire HD
Firmware 2.3.5
I want to write an app, which records a video. This should be implementet via the MediaRecorder (not via Intents). On the Google-Developers site I found a "tutorial" [URL]
My problem:
I followed the whole tutorial. When I'm starting my application on my test device it throws an exception ("start failed") at recorder.start() if I set the quality to high (CamcorderProfile.QUALITY_HIGH). If I change the setting to QUALITY_LOW the app starts recording for 1-2 seconds. After that the screen freezes and my LogCat tracks the following errors:
media server died!
camera server died
ICamera died
I also get ERROR 100
View 2 Replies
View Related
Jul 31, 2010
I've seen a lot of remarks about good call recorder apps for the EVO 4G. None of them are really that good or reliable.
To take advantage of native call recording on the EVO 4G, all you need to do is set the phone call to speaker after connected and then start the Voice Recorder app that comes with the phone. It records both sides of the conversation very clearly and you can adjust the speaker volume to about 75% for optimum audio capturing.
In the state of Texas, it is legal to record any conversation without informing the other party that you are doing so. Be sure to check with your state before recording any phone calls covertly.
View 2 Replies
View Related
Sep 23, 2010
Does HTC Incredible...
1) Comes with native call recording functionality...?
2) Support call recording with 3rd party applications...? (not using the speakerphone)
View 3 Replies
View Related
Sep 23, 2010
Does HTC Desire...
1) Comes with native call recording functionality?
2) Support call recording with 3rd party applications? (not using the speakerphone)
Reference: Android Phone with Call Recording Function
View 4 Replies
View Related
Aug 9, 2009
I am building a camera app, where videos are continuously being captured and saved to the SD card. The videos are short (few minutes), and their length are preset with setMaxDuration().
The whole process works fine, while the main activity is in the foreground. But, when I go to another activity (e.g. settings), the video recording works in the background only until max duration is reached. The file is saved, but a new sequence can not be started
because prepare() fails, apparently because setPreviewDisplay() doesn't like not having a proper surface to attach to.
I tried to use a dummy Surface, a dummy SurfaceHolder, lockCanvas(), and various other tricks, but nothing works. Is there a way to initialize MediaRecorder without a valid surface?
View 3 Replies
View Related
Mar 25, 2009
I am looking for video recording example, it suppose to be in api - sample but not available. I am wondering if 1.1 release still missing this feature?
If it does support then in which format and where is the example. Also I am trying to figure out MP3 encoding long ago but still no solution. I have recorded an audio ()which is in AMR by default, how can I convert it in MP3 (any external package I can use?)
View 6 Replies
View Related
Apr 28, 2009
Is video recording supported in 1.5? I got it mostly working with the Haykuro 1.5 ADP image - the video file was legally formatted but didn't play properly.
With yesterday's official 1.5 images, it doesn't work at all.
setVideoEncoder() fails,
with the wonderfully informative error message
"setVideoEncoder failed".
View 6 Replies
View Related
Nov 6, 2010
I'm running my HTC Legend with the stock "Camcorder" app and the most I can record with is 480p. Since the iPhone 4 has the same MP (5) and can shoot HD, why can't the Legend. Is there an app for such a thing? Any way without rooting, since I still want to keep my warranty till it expires.
View 2 Replies
View Related
Oct 16, 2009
I have a Java application where in I am trying to read Audio samples from the mic into a buffer and then write the samples back to speaker from a buffer for playing. I have used AudioRecord and AudioTrack interfaces. Below are my configurations for the Record and Track object creation. AudioTrack(0, 8000, 2, 2, playBufSize, 1); AudioRecord(1, 8000, 2, 2, recBufSize); Using AudioRecord interface I am able to read the samples from mic continiously (8000 sampling rate and 640 samples per read). In the similar way I am also able to write some pcm samples to the speaker from a buffer and play it continuously using the AudioTrack interface (without record). But when I try to do both record and play simultaneously I am able to only record audio from mic but I am not able to play any samples to speaker. I am getting this error " ------- attemp playback while recording, cheat it! ----- " in the log cat.
I have given the following permissions "android.permission.RECORD_AUDIO" and "android.permission.MODIFY_AUDIO_SETTINGS" in the Manifest file. I didn't find any special permission to play the audio. Is there anything else that I need to enable?
View 3 Replies
View Related
Aug 7, 2010
I am looking for an app that allows for automated video recording given a start time and stop time. I searched the market and message boards but no luck so far. Does anyone know if there is an application like this?
View 2 Replies
View Related
Sep 29, 2010
Is it really true, that there isn't any 3rd party video recording apps available for the Android platform?iPhone has got several really cool ones (Vintage Video Maker etc.)!
View 4 Replies
View Related
Apr 21, 2009
I just experienced the video recording on G1 based on the system.img of android1.0. The process just lasts about 3 seconds, then blocks. And the generated file is empty. What's the matter? Doesn't this version support video recording, yet?
View 4 Replies
View Related
Nov 30, 2009
Does anyone got the video recording sample for android , if yes could you please share the same.
View 4 Replies
View Related
Jun 21, 2009
Do you have any simple sample code for video recording?
View 3 Replies
View Related
Apr 13, 2010
I've tried video recording in the background. But had failed.
Under normal circumstances, the recording works properly. However, if HOME key down-> Home screen or Other Activity is running, recording terminates.
In such a situation, I want to record continuously. I want to record whole process!
View 1 Replies
View Related
Jul 3, 2009
Where can I get source code for camcorder? Also, it would be of much help to me if anyone could post a simple example for video recording.
View 3 Replies
View Related
Sep 9, 2010
Does anyone know of a video loop recording app that would work so as to allow "retrospective " recording - i.e. it records full time but discards after say five minutes, so that by -say -pressing a button, the previous five minutes recording could be retained , reviewed and possibly saved? I know it could be done by recording to a file for a fixed period and then discarding that file and starting a new one, but then it would be random as to the length of the recording that was available on the current file - depending on when the button was pressed. What I need is something that writes data to a fixed length file and pushes the earliest written data off the end - or some other process that simulates that.
View 1 Replies
View Related