Coder Social home page Coder Social logo

deadolus / rtsp-webcam Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 830 KB

Publish your cheap, chinese RTSP cam to a Streaming Webcam

License: GNU Affero General Public License v3.0

Shell 5.71% PHP 94.29%
webcam rtsp nginx hassio hass video-js ffmpeg php bash

rtsp-webcam's Introduction

RTSP to Webcam

This is a project to convert your cheap chinese RTSP "Webcam" via php to a php hosted webcam. I do not thrust the chinese webcam, so it is blocked (via my router) to access the internet. RTSP is badly supported by browsers, so it is transcoded via ffmpeg to something most browsers should understand. This transcoded video stream is then published via a simple PHP website. The website uses only one user/password so far.

Use this to connect your cheap chinese to the internet without exposing yourself to the bad security risk from the camera. Keep a watch on your dog/plant/baby/apartment from anywhere on the planet.

I did not find any similar solution on the web, so I invested some time and came up with this solution.

My setup runs on a raspberry pi, connected via static IP to the internet. The webcam is also connected to https://www.home-assistant.io/ and a webhook moves the camera. Webpage

How to

  1. Change the configuration in babycam.sh to your user/pass and IP.
  2. Start the script, it should now generate output under /tmp/babycam
  3. Install nginx with php support
  4. Use the file under nginx/babycam as a template for your own setup, I use letsencrypt for https encryption.
  5. Start nginx and navigate to the webpage you configured for nginx
  6. Login with your user/pass and click play. You should now see your webcam (I have a delay of about 7 seconds on my stream).

Issues

  • Should use ldash to reduce delay, but so far the standard ffmpeg binary on raspberry pi does not support it. 7 seconds is good enough for my use case.
  • Needs better documentation, I know.

rtsp-webcam's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kleberit

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.