Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more documentation

  • Loading branch information...
commit b3d3469cd44a57547be7de5110dccaeff6f1be4f 1 parent b56c414
@revmischa authored
Showing with 38 additions and 16 deletions.
  1. +11 −3 README
  2. +26 −11 lib/RTSP/Server.pm
  3. +1 −2  rtsp-server.pl
View
14 README
@@ -20,15 +20,23 @@ To install this module type the following:
RUNNING
Simply fire up the included rtsp-server.pl application and it will
-listen for clients on port 5454, and source streams on port 5455.
+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 -i /input.avi -f rtsp rtsp://12.34.56.78:555/abc
+ffmpeg -i /input.avi -f rtsp 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:554/abc
+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
+
+COMING SOON:
+
+Priv dropping, authentication, client encoder, stats, tests
DEPENDENCIES
View
37 lib/RTSP/Server.pm
@@ -26,7 +26,7 @@ has 'client_listen_port' => (
has 'source_listen_port' => (
is => 'rw',
isa => 'Int',
- default => '555',
+ default => '5545',
cmd_flag => 'serverport',
cmd_aliases => 's',
metaclass => 'MooseX::Getopt::Meta::Attribute',
@@ -187,22 +187,29 @@ sub build_logger {
);
}
-1;
+__PACKAGE__->meta->make_immutable;
__END__
=head1 NAME
-RTSP::Server - Lightweight RTSP/RTP server. Like icecast, for video.
+RTSP::Server - Lightweight RTSP/RTP server. Like icecast, for
+audio/video streams.
=head1 SYNOPSIS
use AnyEvent;
use RTSP::Server;
+ # defaults:
my $srv = new RTSP::Server(
- log_level => 2,
- max_clients => 10,
+ log_level => 2, # 0 = no output, 5 = most verbose
+ max_clients => 100,
+ client_listen_port => 554,
+ source_listen_port => 5545,
+ rtp_start_port => 20000,
+ client_listen_address => '0.0.0.0',
+ source_listen_address => '0.0.0.0',
);
# listen and accept incoming connections asynchronously
@@ -219,16 +226,24 @@ RTSP::Server - Lightweight RTSP/RTP server. Like icecast, for video.
=head1 DESCRIPTION
-This server is designed to enable to rebroadcasting of RTSP/RTP
-streams to clients.
+This server is designed to enable to rebroadcasting of RTP media
+streams to clients, controlled by RTSP. Please see README for more
+information.
-=head2 EXPORT
+=head1 USAGE
-None by default.
+After starting the server, stream sources may send an ANNOUNCE for a
+desired mountpoint, followed by a RECORD request to begin streaming.
+Clients can then connect on the client port at the same mountpoint and
+send a PLAY request to receive the RTP data streamed from the source.
-=head1 TODO
+=head1 BUNDLED APPLICATIONS
-Authentication, automated tests.
+Includes rtsp-server.pl, which basically contains the synopsis.
+
+=head2 COMING SOON
+
+Priv dropping, authentication, client encoder, stats, tests
=head1 SEE ALSO
View
3  rtsp-server.pl
@@ -7,9 +7,8 @@
use AnyEvent;
use RTSP::Server;
+# you may pass your own options in here or via command-line
my $srv = RTSP::Server->new_with_options(
- max_clients => 10,
- log_level => 4,
);
# listen and accept incoming connections
Please sign in to comment.
Something went wrong with that request. Please try again.