Giter Club home page Giter Club logo

rtsp-server's Introduction

RTSP-Server

This module is designed to accept a number of sources to connect and transmit audio and video streams. Clients can connect and send RTSP commands to receive RTP data.

This was designed to make rebroadcasting audio and video data over a network simple.

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

LINUX

To install debian jessie dependences:

   sudo apt-get install libmoose-perl liburi-perl libmoosex-getopt-perl libsocket6-perl libanyevent-perl
   sudo cpan AnyEvent::MPRPC::Client

Clone from git
   git clone https://github.com/revmischa/rtsp-server

Then make, test and install
   perl Makefile.PL
   make
   make test
   make install

MAC OS X

cpanm Moose
cpanm Socket6
cpanm MooseX::Getopt
cpanm URI
cpanm AnyEvent

sudo cpan AnyEvent::MPRPC::Client

Clone from git
   git clone https://github.com/revmischa/rtsp-server

Then make, test and install
   perl Makefile.PL
   make
   make test
   make install

Use ffmpeg to stream your local camera

You can view available cameras with: ffmpeg -f avfoundation -list_devices true -i ""

If you are using a Macbook Pro, then use the below commands:

brew install ffmpeg jack

ffmpeg -re -f avfoundation -video_size 320x240 -framerate 30 -pixel_format bgr0
-i "FaceTime HD Camera" -f rtsp -muxdelay 0.1 rtsp://127.0.0.1:5545/a_video_stream

RUNNING

Simply fire up the included rtsp-server.pl application and it will listen for clients on port 554 (standard RTSP port), and source streams on port 5545.

To begin sending video, you can use any client which supports the ANNOUNCE and RECORD RTSP methods, such as FFmpeg:

ffmpeg -re -i /input.avi -f rtsp -muxdelay 0.1 rtsp://12.34.56.78:5545/abc

You should then be able to play that stream with any decent media player. Just point it at rtsp://12.34.56.78/abc

If you don't want to run it as root, you may specify non-priviliged ports with --clientport/-c and --sourceport/-s

TODO:

Priv dropping, authentication, client encoder, stats, tests

DEPENDENCIES

This module requires these other modules and libraries:

Moose, AnyEvent::Socket, AnyEvent::Handle

COPYRIGHT AND LICENCE

Copyright (C) 2014 by Mischa Spiegelmock

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.

rtsp-server's People

Contributors

revmischa avatar mstorsjo avatar thealmightygrant avatar sabado avatar

Watchers

James Cloos avatar  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.