w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How turn on camera flash light with commonsware camera library
You can try using adjustPictureParameters() instead of adjustPreviewParameters() and see if that helps. Since flash modes affect pictures, not preview, "official" support in CWAC-Camera for this would be in adjustPictureParameters(). (though, in practice, I would expect either to work) If that does not help, there's probably some bug where I'm interfering with matters.

Categories : Android

Android - How is Android camera app able to pause video recording?
It's in the Activity not the MediaRecorder. See: http://developer.android.com/training/basics/activity-lifecycle/pausing.html

Categories : Android

Video capture in Android 4.3 using Camera app intent
The problem Yes, there is a bug starting with Android 4.3 release. As the documentation says: If EXTRA_OUTPUT is not present the video will be written to the standard location for videos, and the Uri of that location will be returned in the data field of the Uri. What I have experienced is that the returned data field value is Null instead of containing the video file's Uri. The solution For now, is to pass MediaStore.EXTRA_OUTPUT to the Intent specifying the output location for the video file if the device's API Version is 18. This works as intended. Since you were using the default gallery location for storing your videos, my guess is that you will want to keep it the same. So for this you need to set EXTRA_OUTPUT as follows. Insert a new record into MediaStore.Video.M

Categories : Android

Android Camera Video intent returns null URI
On Android 4.3, permissions have been introduced. You need to start an Intent this way. See this post for changes : Android 4.3 behaviors You need to start intent this way on Android OS 4.3 onwards: Intent intent = new Intent(Intent.MediaStore.ACTION_VIDEO_CAPTURE); ... if (intent.resolveActivity(getPackageManager()) != null) { startActivity(intent); } else { Toast.makeText(context, R.string.app_not_available, Toast.LENGTH_LONG).show(); } You also need to add android:restrictedAccountType tag in you manifest file: <application ... android:restrictedAccountType="com.example.account.type" > Read this too

Categories : Android

Android flip front camera mirror flipped video
You have to apply a matrix transformation, like such: if(isFrontCamera) { m.preScale(-ratio, ratio); } else { m.preScale(ratio, ratio); } Assuming you don't resize anything the ration would be 1, making the non-front camera preScale obsolete.

Categories : Android

Android - How to create invisible camera preview for video recording?
The SurfaceView is taking up the whole screen because your code defines the width/height to be WRAP_CONTENT. Try using new LayoutParams(1, 1, LayoutParams.TYPE_SYSTEM_OVERLAY, WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, PixelFormat.TRANSLUCENT) To make hidden camera or similar stuff, you should not use the Context from your current Activity because your activity needs to be visible during recording (so this is not hidden...). When the current activity to put to background, the context will be null and the recording will stop or crash. You may try running a Service (non-visible but also has a context) and create a SurfaceView from code in that service.

Categories : Android

Video plays upside down when recorded from Front Camera in Android
This line will specifically rotate the video 180 degrees: rotation = (cameraInfo.orientation - 180 + 360) % 360; Unless you have a reason for doing this that I'm not seeing, that's why your video is upside-down.

Categories : Android

Set video output quality for mediastore camera on all ROMs and OEM skins in android
How do I make sure this intent extra works in all camera apps regardless of the android skin the device is running on? You can't. You are not in control; the app that the user chooses to handle the ACTION_VIDEO_CAPTURE request is in control. That does not have to be tied to whatever you think an "android skin" is -- the app could be a third-party app that the user has installed. Your extras are requests for behavior. They are not commands. An app is welcome to ignore them as desired. Ideally, apps won't ignore those, but, then again, ideally, I'd have hair. I do not wish to create my own camera activity as the user will lose out on a lot of other capturing options, plus, it will be tedious and time consuming Then do not complain when other apps do what those apps' authors wante

Categories : Android

Android Custom Camera video capture Issue with samsung galaxy tab
I suspect this fixes your problem as well. When dealing with the camera on Android you often have to deal with device specific issues.

Categories : Android

Why can't copy html5 video (from camera) to canvas in Google Chrome for Android
The problem of not being able to draw video frames to a canvas is mentioned in the following issues: https://code.google.com/p/chromium/issues/detail?id=174642 https://code.google.com/p/chromium/issues/detail?id=181037 Both suggest the problem has been solved, but as I'm not familiar with the development process I don't know if this means it will work on our phones any time soon. Edit: I just tried this in Chrome Beta and it works fine.

Categories : Android

Android Force Close issue of Video Recorder implementation in Custom Camera app
You should check whether the profile exists. I think for tab it is not supported. You can try that with hasprofile

Categories : Java

Video Camera using Intent camera dimensions
Directly controlling a device camera requires a lot more code than requesting pictures or videos from existing camera applications. However, if you want to build a specialized camera application or something fully integrated in your app UI, you can get an example here or here

Categories : Android

How to turn silent mode on during a specific time period in Android? and turn back to normal after the whole duration?
You can use the android FrameWork class AudioManager as follow : AudioManager manager = (AudioManager)getSystemService(AUDIO_SERVICE); manager.setRingerMode(AudioManager.RINGER_MODE_SILENT); Hope it helps :)

Categories : Android

Android app: how to turn off listener and turn it back on again?
Instead of inline creating the SeekBar.OnSeekBarChangeListener, create a member variable of type SeekBar.OnSeekBarChangeListener. When you want it to turn it on, you can pass the variable to it. When you want to turn it off, you can pass it the null. private SeekBar sbt; //Not sure where this gets initialized in your code. private SeekBar.OnSeekBarChangeListener mListener = new SeekBar.OnSeekBarChangeListener() { int progressChanged = 0; @Override public void onStopTrackingTouch(SeekBar seekBar) { // Toast.makeText(ProductDetailsInfoActivity.this,"seek bar progress:"+progressChanged, // Toast.LENGTH_SHORT).show(); // TODO Auto-generated method stub } @Override public void onStartTrackingTouch(SeekBar seekBar) { // TOD

Categories : Android

Android & OpenCV: Homography to Camera Pose considering Camera Intrinsics and Backprojection [Solved]
Get it to work on another way. Instead of using findHomography()/getP erspectiveTransform() i found another function called solvePnP() which returns the camera pose based on world and images points and an intrinsic camera matrix. Using that function in combination with the projectPoints() method - i was able to reproject the 3d points back to the image. In case of the screen edges there are placed on the right spot in the image. UPDATE: I found a bug in my implementation - my camera intrinsic matrix was wrong. The camera pose from homography implementation above is working for me!

Categories : Android

How to start front facing camera in android Using Camera Intent?
Today, I was trying the same thing and ran into same problems as yours. Then I searched the problem and found the perfect solution on this link which helped me. Android cant record video with Front Facing Camera, MediaRecorder start failed: -19

Categories : Android

What is the best camera parameters for android camera opened in surface view
It has to do with the different preview sizes there are for the different phones. The following method I used in a camera preview related android project: Inside the surfaceCreated Method: Camera camera = Camera.open(CameraInfo.CAMERA_FACING_BACK); final Camera.Parameters params = camera.getParameters(); final Size size = getOptimalSize(); params.setPreviewSize(size.width, size.height); camera.setParameters(params); Inside the same activity: private Size getOptimalSize() { Camera.Size result = null; final Camera.Parameters parameters = camera.getParameters(); Log.i(Preview.class.getSimpleName(), "window width: " + getWidth() + ", height: " + getHeight()); for (final Camera.Size size : parameters.getSupportedPreviewSizes()) { if (size.width <= getWidth() * P

Categories : Android

Custom Android Camera Application, Camera Preview Issue
Your SurfaceView (or TextureView) must have the same aspect ratio as your preview images, otherwise you will get the distortion that you describe. FWIW, you may find it useful to work with my CWAC-Camera library, which offers a CameraFragment that handles a lot of this low-level stuff for you. It's still a work in progress, though.

Categories : Android

Android Camera custom zoom anywhere on the camera view
The short answer is: yes, you can. If your camera supports video resolution higher than the preview area, zoom in can show more details. Often, it's not the case, and zoomed in picture will not look good.

Categories : Android

How to get video output from avfoundation camera
You have to setup AVAssetWriter with Audio/Video inputs and append your sample buffers. You can checkout this sample code, RosyWriterVideoProcessor class https://developer.apple.com/library/ios/samplecode/RosyWriter/Listings/Classes_RosyWriterVideoProcessor_m.html#//apple_ref/doc/uid/DTS40011110-Classes_RosyWriterVideoProcessor_m-DontLinkElementID_8

Categories : Iphone

camera for picture and video not working
The reason of the exception could be because Camera.open() returned null! if (mCamera == null) { mCamera = Camera.open(); mCamera.unlock(); } Do you have the following in your manifest file? <uses-permission android:name="android.permission.CAMERA" /> <uses-feature android:name="android.hardware.camera" /> Try using Camera.open(int cameraId); if your api level >= 2.3

Categories : Android

Flash Light Using Video Camera
Improve your google skills! ;) have a read of this SO post - How to stop led torch/flashlight app using Reflection in Windows Phone 7 P.S. This is a nice blog post about the subject Using Cameras in Your Windows Phone Application

Categories : C#

How to record video using the as3 camera class
Best way to record using the Flash or AIR application is Media Server. You can connect your application with Media Server (Flash Media Server / Red5 / any other Media Server which is providing Media Recording and Publishing.) and publish your stream for recording. Second way, I need to search out the code but logically I can say answer. We need to convert Camera stream buffer in to the binary data and we need to save binary data as video file o File system. For that you can write down some code in ActionScript and need to write down some code in the Native Application as Native Extension.

Categories : Actionscript

Can I capture video from an IP camera using OpenIMAJ?
I've not got an IP camera to test with, but in theory you can use the XuggleVideo class to do it - you basically just need to provide the URL of the stream provided by the camera: Video<MBFImage> video = new XuggleVideo("rtsp://10.10.10.121/cam0_0"); Any type of stream/url that FFmpeg supports should work.

Categories : Java

Default video preview for Custom Camera App?
Either call setCamera() on the MediaRecorder (which will automatically use any preview surface set up for that Camera) or call setPreviewDisplay() on MediaRecorder, supplying your SurfaceHolder.

Categories : Android

c# AForge.NET - how to save video from camera to file
This is not a definite answer, but: everytime you call writer.Open(...) it uses Win32.OpenFileMode.Create instead of Win32.OpenFileMode.ReadWrite and so it will overwrite the file every time instead of adding frames, so your result will be a video containing 1 frame. I have the same problem: my page

Categories : C#

Copy downloaded video to camera roll
Where are you providing the URL to the block. I think you need to do this way.. NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType]; NSURL *videoURL = [info objectForKey:UIImagePickerControllerMediaURL]; ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; [library writeVideoAtPathToSavedPhotosAlbum:videoURL completionBlock:^(NSURL *assetURL, NSError *error){ /*notify of completion*/ NSLog(@"AssetURL: %@",assetURL); NSLog(@"Error: %@",error); if (!error) { //video saved }else{ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:error.domain delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; [alert show]; [alert release]; } }]

Categories : Iphone

How can we get H.264 encoded video stream from iPhone Camera?
Short: You can't, the sample buffer you receive is uncompressed. Methods to get hardware accelerated h264 compression: AVAssetWriter AVCaptureMovieFileOutput As you can see both write to a file, writing to a pipe does not work as the encoder updates header information after a frame or GOP has been fully written. So you better don't touch the file while the encoder writes to it as it does randomly rewrite header information. Without this header information the video file will not be playable (it updates the size field, so the first header written says the file is 0 bytes). Directly writing to a memory area is not supported currently. But you can open the encoded video-file and demux the stream to get to the h264 data (after the encoder has closed the file of course)

Categories : Iphone

Could not save .mp4 video file to iphone camera roll?
You can convert your .mp4 to .mov if you change your appFile this way: Your code: appFile = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"MyFile.%@",FileExtension]]; New code: appFile = [documentsDirectory stringByAppendingPathComponent:@"MyFile.mov"]; The SO automatically converts .mp4 to .mov

Categories : Iphone

Change camera capture device while recording a video
You can't change the captureDevice mid-session. And you can only have one capture session running at a time. You could end the current session and create a new one. There will be a slight lag (maybe a second or two depending on your cpu load). I wish Apple would allow multiple sessions or at least multiple devices per session... but they do not... yet.

Categories : Iphone

mergExt - mergAV, trying to know if the video can be saved to camera roll
The answer is you found a bug. Thanks! I'll release a new version of mergAV ASAP. BTW mergAVCanSaveVideo is working out if the video is compatible with the photos album UIVideoAtPathIsCompatibleWithSavedPhotosAlbum so I'll add another function for this... mergAVCanAccessPhotoLibrary...

Categories : Misc

viewing ip camera video in desktop java application
Some critical information is missing. How does the camera provide the video stream? When you've got the name of the format, there is a good chance some else already programmed some java player. It seems you can access the camera via http. You could do a trick an open the page (or a html file build by you which just shows the stream without anything else) via http and display it in a html view, for example JavaFX's Webview

Categories : Java

How to display the video captured from iPhone's camera on the screen without saving it?
You want an AVCapturePreviewLayer. https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/04_MediaCapture.html#//apple_ref/doc/uid/TP40010188-CH5-SW22 As far as what to write in your IBAction method, that'll depend on how you want your app to behave. If you want it to load with the capture session and preview running, you don't really need a button. If you're starting your capture session via the button, just put the PreviewLayer code in the same method (after you have inited your capture session).

Categories : Iphone

Android camera- always uses front camera
Where is the code where you actually open the camera? Try: Camera camera; //if you want to open front facing camera use this line camera = Camera.open(CameraInfo.CAMERA_FACING_FRONT); //if you want to use the back facing camera camera = Camera.open(CameraInfo.CAMERA_FACING_BACK);

Categories : Android

android camera failed when using the camera api
Check out the answer provided in a previous question: Android: "Camera.takePicture failed" Exception Apparently you need to start the preview before taking a photo, which includes setting a valid preview surface (which I don't think you are doing). Also, check out step 5-6 laid out at http://developer.android.com/reference/android/hardware/Camera.html Obtain an instance of Camera from open(int). Get existing (default) settings with getParameters(). If necessary, modify the returned Camera.Parameters object and call setParameters(Camera.Parameters). If desired, call setDisplayOrientation(int). Important: Pass a fully initialized SurfaceHolder to setPreviewDisplay(SurfaceHolder). Without a surface, the camera will be unable to start the preview. Important: Call

Categories : Android

Showing video from front and back camera at the same time in Windows Phone
Yeah - I'm having the same problem. Wanted to do the exact same thing. Based upon my knowledge its not possible to have two camera instances running at the same time. Let me know if you hear anything different!

Categories : C#

How do i get camera view region latitude and longitude and also user direction of camera view in android
For step 1: You need a kind of a compass to show the user the direction: http://sunil-android.blogspot.com/2013/02/create-our-android-compass.html For step 2: You need to do some mathematical calculations. For step 3: You have to get the latitude and longitude of the current location of where you capture the image: Implement your class like: implements LocationListener LocationManager mLocationManager; mLocationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); Location location = mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); if(location != null) { lat = location.getLatitude(); lng = location.getLongitude(); getWeatherInfo(); } else { mLocationManager.reques

Categories : Android

Media Recorder Failed in Custom Camera App after implementing Video Recording Feature
camera.unlock(); mediaRecorder.setCamera(camera); mediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER); mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP); mediaRecorder.setPreviewDisplay(cameraPreview.getHolder().getSurface()); mediaRecorder.setMaxDuration((int) preVideoLenght); try { mediaRecorder.prepare(); mediaRecorder.start(); infoText.setText(R.string.recording); return true; } catch (Exception e) { return false; }

Categories : Java

How to fit the video Width & Height with respect to vitamio video view in android
From VOV IO's web-site (vitamio VOVIO - focus on Android multimedia application): Vitamio is a multimedia framework for all Android devices. Vitamio works like the Android's default MediaPlayer except that it includes much more powerful features. And it's absolutely free ! Network Protocols: The following network protocols are supported for audio and video playback: MMS RTSP (RTP, SDP) HTTP progressive streaming HTTP live streaming (M3U8), for Android 2.1+ Media formats: Many audio and video codecs are packed into Vitamio beside the default media format built in Android platform, some of them are listed below. divx/xvid wmv flv ts rmvb mkv mov m4v avi mp4 3gp Subtitles: Vitamio support the display of many external and embedded subtitle formats. SubRip(.srt) Sub Station Alpha(.ssa)

Categories : Android

Can't Play Video using android default video player using intent
You can try VideoView. (Documentation) try{ VideoView videoView = (VideoView) findViewById(R.id.VideoView); MediaController mediaController = new MediaController(this); mediaController.setAnchorView(videoView); // Set Audio/Video String strfilename = "http://localhost/h.mp4"; Uri video = Uri.parse(strfilename); videoView.setMediaController(mediaController); videoView.setVideoURI(video); videoView.start(); } catch (Exception e) { //Handle Errors } EDIT Android is also picky about the way videos are encoded when using videoView. (See below quote from link) For video content that is streamed over HTTP or RTSP, there are additional requirements: •For 3GPP and MPEG-4 containers, the moov atom must precede any

Categories : Java



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.