GithubHelp home page GithubHelp logo

arksine / easycam Goto Github PK

View Code? Open in Web Editor NEW
39.0 10.0 14.0 1.28 MB

Easycap viewer for android

License: BSD 3-Clause "New" or "Revised" License

Java 55.28% C++ 40.34% C 1.04% Makefile 0.93% RenderScript 2.41%

easycam's Introduction

Easycam - Easycap monitor for android

Easycam was created as an alternative to Carcam, an app used for displaying a backup camera in automotive installs. Easycam was built and tested on a Nexus 7 (2012) running Autodroid 1.2. Initially Easycam's v4l2 functionality was based on the android-webcam library developed by the OpenXC project.

FAQ

Q: Easycap viewer on the play store works with my UTV007 device, so why do I get an error message when using easycam?
A: The developers for the Easycap Viewer app created their own UTV007 Android user space driver. Easycam makes use of existing kernel space drivers written for linux. You are getting an error either because your kernel doesn't have the driver, or SELinux is blocking.

Q: Will you create a user space driver for easycam?
A: I haven't ruled it out for the future, but it won't be anytime soon. Even though the hard work of reversing the windows drivers has already been done, porting a driver to user space isn't trivial. It would also require a major rewrite of easycam, because all of the rendering is currently done in native code, whereas it would be more efficient to do everything in managed code when using a user space driver.

Q: How do I add the driver to my kernel?
A: If you are fortunate you can find a rom or kernel for your device that already has the easycap drivers built in. Otherwise you will have to build the driver yourself. You have the option of compiling the driver directly into the kernel or building the driver as a module Google "compiling a kernel module for android" and "compiling an android kernel" to get yourself started.

Q: My attempt to build easycam results in an ndk error, what is going wrong?
A: First, you need NDK r10e. No other version is supported for this app, although older versions (r10d or r10c) may work. NDK 11 left out support for renderscript, which easycam requires. Next, if you are using Windows 8 or above, there is an issue with the file "llvm-rs-cc.exe". You need to navigate to the file in your NDK folder and change its compatibility to Windows 7 or Windows XP SP3.

Supported Devices

My goal when creating Easycam was to support all EZcap clones. The status of each is as follows:

UTV007 - Easycam was built and tested using a UTV007 based device. These devices should function well.

STK1160 - As of the date of this writing I have been unable to test STK1160 based devices. I believe that they should work without issue given that they work with Carcam, however without testing I can't be sure.

em28xx - I don't own an Empia based Easycap device. I was however able to dig up an old KWorld USB2800 device. Unfortunately I was unable to get the driver to recognize that it was a USB2800 device. This is likely a result of an old em28xx driver in Autodroid, or the old 3.1 kernel used. Unfortunately because of this I can't confirm that Empia devices work. It will be interesting to see if anyone releases a capture device using Empia's newer chipsets. Supposedly they support UVC, which should eliminate driver issues.

Somagic - I do own an Easycap002, which is a Somagic based device with 4 composite inputs. Somagic devices are tricky because they require firmware that you must extract from the windows driver. See the following URL for info on how to extract the firmware:

      https://code.google.com/p/easycap-somagic-linux/wiki/GettingStarted#Extracting_firmware 

After extraction you need to get it on your Android device. The firmware must be renamed smi2021_3X.bin, where X is the version of driver supplied with your device. For example, if the windows driver file is named SmiUsbGrabber3F.sys, the extracted firmware will need to be named smi2021_3f.bin. After extraction it must be placed in the system/etc/firmware folder, the owner must be root, and the privileges should be set to 644.

After testing I WAS able to get the Easycap002 to run, but I cannot recommend it. There are major stability issues when attempting to capture using these devices. Dropped frames, force quits, hard resets...you name it, it happened. Support is in the app to try them, and perhaps the single composite based Somagic devices will work better. If you decide to try them, you have been warned.

Running the app

On first run the settings activity will show. Make absolutely sure you set your TV Standard (region) correctly here. The app will attempt to autodetect the type of device you have and the location of the device file (ie. /dev/video0). The location option may be toggled for manual entry if you have multiple Easycap devices hooked up to your tablet. There are also various visual settings included, which are self explanatory.

Unlike Carcam, there is no background service that attempts to detect a signal and launch the app. That functionality never worked well for me, as it seemed to cause stability issues rather than function as it should. In my opinion a better way to get this functionality would be to use an Arduino to detect voltage on the reverse wire. Obviously there would be a lot of work to get it working (step down 12v to 5v, protect from voltage spikes, an app to communicate between the Arduino and the tablet), but it would be much more reliable than having a background loop continuously putting a drain on your tablet's resources, having to deal with deep sleep, etc.

Building Easycam

Easycam was built using Android Studio 2.0 beta7 and targets a minimum of Android API 19, with NDK r10e.

Note: If you are having trouble building on windows, it is likely due to a compatibility issue with llvm-rs-cc.exe in the NDK. This can be resolved by navigating to \toolchains\renderscript\prebuilt\windows-x86_64\bin, right clicking on llvm-rs-cc.exe and changing the compatibility mode to Windows 7 or Windows XP SP3.

License

Copyright (c) 2014-2016 Eric Callahan licensed under the BSD license.

easycam's People

Contributors

arksine avatar hikernl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easycam's Issues

OpenCV Help

hi, all compilation problem has been solved and i want to process camera image with opencv, anyone can help me to how i get image before reflect to surfaceview?

NDK-Error

Error:Execution failed for task ':easycam:ndkBuild'.

Process 'command 'C:\Users\miller\AppData\Local\Android\android-ndk-r10e/ndk-build.cmd'' finished with non-zero exit value 2

Error Connecting Device

Hi,

I am using EasyCap to convert RCA to usb to stream video from Surveillance system.

I have selected UTV007 as device type and NTSC as color coding standard.

Every time i am getting "Error connecting device" and Black screen.

Help will be appreciated !!

Thanks.

"Unable to load device"

Hello, I have UTV007 easycap device,
I compiled and tested your project on 3 smartphones - LG g2 , sony xperia z5 premium, and LG g3,
the device recognized by the app but show toast message : "Unable to load device" and then "Error connecting to device"

Tried it with EasyCap Viewer from play store and it worked good.

Any idea how to solve it?

Device is busy, a lot of videoX devices

Hi,

I compiled and tested this app on my Xperia Z1 and Z3. But it didn't work on neither.

I have UTV007 model easycap device. I tested it with EasyCap Viewer on play store and it worked.

But using this source, I got no luck of making it work. I have a lot of videoX devices under /dev/

Ranging from video0->video13 & video32->39

Do you have any guess what may be the problem? I will be very happy if this works.

Thanks

apk in source

Hi,

Is it possible to add a apk file to the source?
Somehow i can't create the apk file using android studio.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.