Code Monkey home page Code Monkey logo

debian-python-live555's Introduction

debian-python-live555

Giuseppe De Marco, demarcog83 at gmail.com

forked from
https://pypi.python.org/pypi/live555/1.0
Mike McCandless, mikemccand at gmail.com

This contains a small Python3 wrapper around the Live555 Streaming Media APIs, so that you can load video frames. It only wraps a tiny, tiny subset of all of Live555's APIs, specifically the APIs necessary to pull frames via RTSP/RTP from an IP camera.

Mike McCandless tested on Linux with the surprisingly excellent Lorex LNB2151/LNB2153 cameras, with H264 video.
I'm only tested with ipcam Maygion h264, not so surprising as camera but works.

INSTRUCTIONS:

  1. First install the Live555 library from Debian repository
    aptitude install livemedia-utils liblivemedia-dev python3 python3-dev python3-pip

  2. Download/clone this repo

  3. then
    python3 setup.py build python3 setup.py install

  4. Run the example (some costants should be configured in example.py)
    python3 example.py 10.17.4.118 1 10 out.264

    That will record 10 seconds of H264 video from the camera at
    10.17.4.118, channel 1, saving it to the file out.264.

Some alternative methods with live555 and ffmpeg

This forge two files: video-H264-1 and audio-PCMU-2
openRTSP rtsp://admin:[email protected]:80

Then convert it in a viewable format
...only video
ffmpeg -i video-H264-1 -acodec copy -vcodec copy -map 0:0 merged.mp4

... or video and audio
ffmpeg -i video-H264-1 -i audio-PCMU-2 -acodec copy -vcodec copy -map 0:0 -map 1:0 merged.mp4

...With vlc (see python-vlc for python integration)

vlc -I dummy rtsp://admin:[email protected]:80 --sout=file/ts:mystream.mpg

debian-python-live555's People

Contributors

peppelinux avatar

Watchers

James Cloos avatar Ivan Palijan avatar

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.