Android :: 1.5 Video API Not Working / No Preview

Jun 22, 2009

I have tried 1.5 video API. I could not make it work. It even can't do preview. Following is my code:
private boolean initializeVideo() { Log.v(TAG, "initializeVideo");
if(Common.mRecordedVideo!=null && Common.mRecordedVideo.exists ()) Common.mRecordedVideo.delete();
File sDir = Environment.getExternalStorageDirectory();
String baseDir = sDir + Common.BASE_DIR;
File sampleDir=new File(baseDir);
if(!sampleDir.canWrite()) // Workaround for broken sdcard support on the device.
sampleDir = new File("/sdcard/sdcard");
try { Common.mRecordedVideo = File.createTempFile(PREFIX, EXTENSION, sampleDir);
} catch(IOException e) { AlertDialog.Builder ab = new AlertDialog.Builder (VideoRecord.this);
ab.setTitle("Error"); ab.setMessage(" can't write audio data to storage");
ab.setIcon(R.drawable.error); ab.setNeutralButton("Close", new DialogInterface.OnClickListener()
{ public void onClick(DialogInterface dialog, int whichButton) { } } );
ab.show(); return false;
} Intent intent = getIntent(); releaseMediaRecorder();
if (mSurfaceHolder == null) { Log.v(TAG, "SurfaceHolder is null");
return false; } mMediaRecorder = new MediaRecorder();
mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mMediaRecorder.setVideoSource (MediaRecorder.VideoSource.CAMERA);
mMediaRecorder.setOutputFormat (MediaRecorder.OutputFormat.THREE_GPP);
mMediaRecorder.setMaxDuration(MAX_RECORDING_DURATION_MS);
mMediaRecorder.setOutputFile (Common.mRecordedVideo.getAbsolutePath());
// Use the same frame rate for both, since internally
// if the frame rate is too large, it can cause camera to become
// unstable. We need to fix the MediaRecorder to disable the support
// of setting frame rate for now.
mMediaRecorder.setVideoFrameRate(20);
mMediaRecorder.setVideoSize(352,288);
mMediaRecorder.setVideoEncoder (MediaRecorder.VideoEncoder.H263);
mMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());
try { mMediaRecorder.prepare();
} catch (IOException exception) { Log.e(TAG, "prepare failed for " );
releaseMediaRecorder(); // TODO: add more exception handling logic here
return false; } mMediaRecorderRecording = false;
return true; } private void startVideoRecording() {
Log.v(TAG, "startVideoRecording"); if (!mMediaRecorderRecording) {
// Check mMediaRecorder to see whether it is initialized or not.
if (mMediaRecorder == null && initializeVideo() == false ) {
Log.e(TAG, "Initialize video (MediaRecorder) failed."); return;
} try { mMediaRecorder.setOnErrorListener(this);
mMediaRecorder.setOnInfoListener(this);
mMediaRecorder.start();
// Recording is now started } catch (RuntimeException e) {
Log.e(TAG, "Could not start media recorder. ", e); return;
} mMediaRecorderRecording = true;
mRecordingStartTime = SystemClock.uptimeMillis();
updateRecordingIndicator(true);
mRecordingTimeView.setText("");
mRecordingTimeView.setVisibility(View.VISIBLE);
mHandler.sendEmptyMessage(UPDATE_RECORD_TIME);
setScreenTimeoutInfinite();
} }

Android :: 1.5 Video API not Working / No Preview


Android :: Video Capture With Preview Available?

Aug 20, 2009

Can anyone share or point me to working example of "video capture" with preview?

View 2 Replies View Related

Android :: Restart Video Preview After The SurfaceDestroyed()?

Jul 2, 2009

I have created a CapturePreview class and CameraManager class the following way:

CapturePreview:

CODE:...

The video preview works fine this way until the sub-activity starts in the main activity. When sub-activity starts the CaptureView.surfaceDestroyed(SurfaceHolder holder) is called and the video preview stops. Then when the sub-activity closes the CaptureView.surfaceCreated(SurfaceHolder holder) is executed, but the video preview doesn't start.

Does anyone know how to fix the problem in order to successfully restart video preview after surfaceDestroyed(SurfaceHolder holder) is executed?

View 2 Replies View Related

Android :: Camera Preview Not Working On G2

Oct 20, 2010

I'm trying to get the camera preview running on my G2.

This is the code I'm testing with, which was taken from the sample code. It is using supplemental code supplied by Wu-Cheng, but its still throwing an error.

CODE:......................

View 14 Replies View Related

Android :: Video Recorder As Alternative To Camera Preview Filter?

May 9, 2009

A number of previous posts imply that attempts to apply bespoke image processing on a Camera preview are hamstrung by a buggy API and will in any event run extremely slowly due to the need to manually decode the preview buffer. Can anyone comment on whether it is possible to use the video recorder as an alternative means of achieving this?

View 2 Replies View Related

Android :: Using DispatchDraw(Canvas) To Obtain Subsection Of Video Preview

Jul 29, 2010

The following is the overriden dispatchDraw in a subclass of SurfaceView. I'm trying to change the parameters of the Surface(getting only a subsection of the video preview.

CODE:......

Why does the above code not alter the dimensions of the SurfaceView at all?

View 1 Replies View Related

Android :: Camera Preview Is Working Properly

Feb 24, 2010

In my Application the camera preview is working properly in both in portrait and in landscape mode. No crashes are occurring, but the users are complaining that the crashes are occurring when they are using the same.

View 1 Replies View Related

Android :: Camera Preview Zoom Not Working

Sep 7, 2010

I've a problem with Camera Preview Zoom. The methods present in Android 2.2, setZoom() is not working to zoom the preview. Is there any another way to do the Zoom in android? I am using the code present in the Android API Demos. Is their any body who has worked on implementing ZoomIn & ZoomOut and got succeed??

View 4 Replies View Related

Android :: Working In Portrait Mode With Camera Preview?

Jun 27, 2009

When do you expect it to get fixed? I am a developer working on http://layar.eu and I had to go through lot of trouble to get the app working in portrait mode with camera preview, using a LOT of rotations. I have managed to get everything rotated to portrait except for the on screen inputmethod which still shows up in landscape. Do you have any suggestions for rotating that?

View 9 Replies View Related

Samsung EPIC 4G :: Short Video Preview - 4G By Engadget

Jun 29, 2010

Short video preview of the Epic 4G by Engadget. YouTube - Samsung Epic 4G preview

View 1 Replies View Related

HTC Droid Eris :: Preview 2.2 - Free Downloads And Streaming Video

May 22, 2010

Videos - Free video downloads and streaming video - CNET TV

View 2 Replies View Related

General :: Windows 8.1 Preview And Not Working ADB Fastboot

Jul 2, 2013

ive faceed a problem after upgrading to 8.1..Phone doesnt showing in adb or fastboot.

View 9 Replies View Related

Android :: Android: How To Initialize MediaRecorder Without A Valid Surface For Video Preview

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

Android :: Html5 And Video Tag Working Example

Dec 2, 2009

Anybody have a working example of HTML5 file with a video tag ? [working in chrome lite] What resolution and format is supported ?

View 3 Replies View Related

Android :: Qik Video Streaming - Stopped Working?

Jun 25, 2009

I have been having some issues with the Qik app. It has worked then stopped. I uninstalled it, then re-installed it. Sometimes it just loads the camcorder app, not the qik app, which is really odd. I figure it is built using the camcorder api but still very odd.

The customer service from qik has been poor as well.

View 6 Replies View Related

Android :: Youtube App Not Working - Cannot Play This Video Now

Jan 17, 2010

My YouTube application is not working most of the time it says " Sorry, cannot play this video now".

View 1 Replies View Related

HTC EVO 4G : Way To Get Working Video MMS?

Jul 19, 2010

Is there a trick to sending a video MMS? Nobody I send them to receives them for some reason. I don't get any error messages or anything, but they never receive the message.
I haven't got any for a while either. Not sure if I have missed any or if nobody has tried to send me any. Anyway, what do I have to do to get working video MMS?

View 26 Replies View Related

HTC EVO 4G :: Camera - Video Not Working

Jun 4, 2010

When I click on the camera or video Icon. It goes to load it to where you see the black screen with the white camera and then quickly goes back to the home screen.

View 8 Replies View Related

HTC Incredible :: Sending A Video Still Not Working

Oct 16, 2010

Im having an issue sending a video on my incredible. i dont understand whats going on and i dont think im doing something wrong but who knows...

I went into camcorder, changed everything to defult. i changed the resolution to the 640 and was able to send up two a 2 second video. then i went to the lowest resolution which was like 320 or whatever and was able to send up to a 5 second video. thats about it... i sat on the phone with verizon maybe...2 hours? THEY could not figure it out. they said they has to borrow another verizon enployee's phone to mess with it and she kept getting the same issue saying the file is two large. its set for 30 seconds, then 20 seconds, 15, 10, all of them will not work over 5 seconds of a video to send. they said they dont understand why there is nothing in the settings saying switch to mms or sms or something and contacting someone to update that asap because it made no sence to them. i dont understand this and its getting annoying.

So then, i tried downloading some app called youcast or whatever, and it kind of worked. it says it bypasses the size limit or whatever. i sent a video to my friend and it says he got it, but needs to download the app first to view it. im waiting to hear from him if he downloads it and is able to view it. but that still sucks because what if you dont have an android? then youcast wont work.

And not only is this issue with me, but 6 of my friends with the htc incredible are not able to send videos either after they messed around with it all.

So my questions are...

Is there any other apps out there like youcast that might work or be better too?

My settings right now on camcorder are...

white balance: auto
resolution: QVGA(320x240) and i tried switching around between that all the way to 720p(1280x720)
storagehone storage and i have switched to storage card
encoding type MPEG4
Recording Limit: 30 seconds. again i tried all other settings.

View 3 Replies View Related

Media : G1 Video To YouTube Not Working

Dec 2, 2009

This is a G1 and I am using a WiFi connection. when I go to Youtube ap and click Menu/my account/my videos , I can see all the videos uploaded via computer, but not the G1 video i waited 10 minutes to upload. they seem to upload into nowhere.

View 1 Replies View Related

General :: Instagram Video On 4.4 Not Working?

Jan 18, 2014

On CM11 i9300 I cannot post an Instagram video. Is it fixable?

View 2 Replies View Related

Samsung Galaxy S :: Audio In Video Is Not Working

Nov 22, 2010

This video is working perfectly on my Samsung Galaxy S Vibrant stock video player, however the audio is not working at all, can somebody please point out why? im a noob with all these codecs and stuff and dont know what the SGS can play and cant

View 3 Replies View Related

HTC Wildfire :: Flash Video Files Not Working / How To Fix?

Aug 19, 2010

New android user switched over from WM Liking the wildfire, anyone can tell me how to open .swf & .flv on wildfire even though it has HTC flash player.

View 1 Replies View Related

Sprint HTC Hero :: Video Player Not Working

Dec 20, 2009

so every time i go online to try to watch a video, it goes into the streaming video player or w/e and it says; Cannot play video sorry, this video cannot be played.okay well some might think that my phone cant play this video, but no, their wrong because like last week it was working, same site and everything.

View 5 Replies View Related

HTC Droid Eris :: MMS Video Not Working / Why I Cant View It?

Dec 1, 2009

When others send me a MMS video the video does not play. It shows up as a still image with no audio. I tried taking a existing vidio that I took from the phone and sent it to myself. It did the same thing? When I go to save the MMS it says there is a .jpg file and a .qcp (audio) file?

Does anyone know what is going on any why I cant view MMS videos?
I am using Handset SMS. When I go to the MMS program that came installed it is doing the same thing?

View 3 Replies View Related

General :: Phone Video Not Working Properly

Sep 11, 2012

My phone's video isn't working properly, no matter which player I use. It was working fine, and at first, asking which player I would like to use for the playback. That has since stopped. The video seems to take longer to load and will play for around ten seconds, then stop for a while, then play for another few seconds.Should I do a default reset?

View 1 Replies View Related

HTC Desire :: Video Capture Not Working After Updating To 2.2 Froyo

Aug 15, 2010

after updating (the official update) my HTC Desire to Froyo 2.2 I cannot capture any Video (any resolution). It happens that I press the trackball and the timer (on the upper-right corner) disappears and nothing works anymore (menu, etc...), only the Home button allow me to go back to the home panel. After doing that, the battery die in a few minutes and the phone is very slow: i.e. some video camera service is still up and running and consuming battery.

View 4 Replies View Related

HTC Incredible :: Video And Camera Not Working After Froyo Update

Aug 31, 2010

When trying to do 720p recording the camera freezes, turns black and requires a battery removal. I got about 3 seconds of 720p recording but even when I go in to view the video it freezes or lags severely to the point I need to remove the battery.

View 3 Replies View Related

HTC Incredible :: Mms Stoped Working - Cannot Send Or Recieve Mms Or Video

Aug 14, 2010

How do i look inside my current rom to see if anything is out of wack with my framework? mms stoped working for some reason. i cannot send or recieve mms or video. if i wipe and clear cache and reinstall the rom it will work just fine but when i titanium backup all my apps and system data, thats when i lose the ability to send pics or recieve them. i have not deleted anything from the system but it seems as something has gone missing. i am running second wave with latest radio.

View 9 Replies View Related

HTC Incredible : Phone Reboots - Video Recording Not Working?

Aug 24, 2010

I have Skyraider 2.5.2, and my whenever I try to record video, my phone reboots. Any suggestions?

EDIT: I was told I need to update my radio. So for 2.15, I need to do unprovoked Forever. How do you do any of the other 2.xx radio updates. I remember something about unrooting your phone or something, but I can't find it anymore.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved