EasyCamera | Wrapper around the android Camera class | Camera library
kandi X-RAY | EasyCamera Summary
kandi X-RAY | EasyCamera Summary
Wrapper around the android Camera class that simplifies its usage (read more about the process). By default, preview stops when a picture is taken. If you want to restart preview, specify .withRestartPreviewAfterCallbacks(true) on the Callbacks object. If you need the android.hardware.Camera object, get it via camera.getRawCamera().
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start preview of camera
- Takes a photo of the camera
- Converts a callback to a callback or null if not present
- Open a specific camera
- Get the default camera
- Starts preview
- Helper method to align camera orientation and view orientation
- Set the callback for preview preview of the camera
- Reconnect camera
- Set the auto focus callback
- Set the error callback
- Set the display orientation of the camera
- Set the callback for one shot preview
- Set the camera parameters
- Set the preview callback for the camera
- Set a listener for when zoom changes
- Start face detection
- Start smooth zoom
- Stop the camera detection
- Stops the camera preview
- Stop smooth zoom
- Configure a FaceDetection instance
- Enable Shutter Sound Sound
EasyCamera Key Features
EasyCamera Examples and Code Snippets
Community Discussions
Trending Discussions on EasyCamera
QUESTION
Background:
On Windows 10 I'm using getUserMedia (gUM) and MediaRecorder in Google Chrome (v71) to capture and encode a video stream.
- I'm using the constraints parameter to gUM to tell it I want a video format of 352x288.
I'm requesting
video/webm; codecs="avc1.42E01E"
as the MIME type of the encoded stream (that's H.264 boxed in Matroska).I'm selecting a cheezy webcam built into a laptop as the video source. It's called "EasyCamera" made by DMAX-AVC. It's tempting to call it CheezyCamera.
The video stream gets generated just fine.
Problem:
The dimensions of the encoded video in the stream are 440x360 rather than my requested 352x288. This information is embedded in the recorded stream, and only visible from the consumer of that data. Use of the various APIs reveals the gUM stream, MediaRecorder, and element metadata all think the dimensions are the ones I asked for.
Of course, webcam, gUM, and MediaRecorder treat the constraints parameter as suggestions, and are free to respond with something different. In this case they respond with 440x360 when I request 352x288. This system functions as designed; that is not my problem.
To clarify, the unexpected 440x360 dimensions are only visible to the consumer of the recorded stream. I hope to find a way to know the producer-side webcam, gUM, and MediaEncoder signal chain is producing a different resolution than I requested.
How does the stream consumer know the stream dimensions? They're in the 'PixelWidth' and 'PixelHeight' Matroska boxes, and they're baked in to the H.264 stream. (Oddly enough, considering this is a software-chosen resolution, it isn't an integral number of 16x16 macroblocks. It still works of course.)
I can't parse the recorded data in the browser because it's stored in opaque blobs.
When I use a different, better, webcam (a Logitech C615) my encoded video stream is the size I requested.
My question:
Is there any way in the webcam / gUM / MediaRecorder / signal chain to find the actual dimensions of the encoded stream in the browser actually recording the stream? That is, can I find the signal chain's response to my requested dimensions without decoding the generated stream?
ANSWER
Answered 2019-Jan-27 at 19:43Use MediaStream.getVideoTracks()
method to get the video track (MediaStreamTrack), then use MediaStreamTrack.getSettings()
to get MediaTrackSettings object, which contains the height and width of the video of the stream.
So if I request a video of 0 height specified as Constraints, I get a video of height 1 pixels. While streaming we can retrieve both the height I requested and the height I am getting as output.
QUESTION
Weird problem here, i use this command to capture my webcam through ffmpeg (through cmd on windows):
...ANSWER
Answered 2017-Jun-04 at 09:11The problem is that, in the commandline, video="Lenovo EasyCamera"
uses the quotes to make sure the space doesn't make it another argument.
You can see this with a test python file:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install EasyCamera
You can use EasyCamera like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the EasyCamera component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page