RTSP::Server(3pm)
π RTSP::Server π
okay so bestie, you found the manual page for RTSP::Server β part of the User Contributed Perl Documentation. yes it's really called that. it's a whole thing. anyway, sit down, hydrate, and let me tell you about this little legend. π«Ά
β¨ NAME β¨
RTSP::Server β a lightweight RTSP/RTP server. it's giving... icecast, but for audio/video streams. π
β¨ SYNOPSIS β¨
here's the whole vibe in code form, no cap:
use AnyEvent;
use RTSP::Server;
# defaults:
my $srv = new RTSP::Server(
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
# (returns immediately)
$srv->listen;
# main loop
my $cv = AnyEvent->condvar;
# ...
$cv->recv;
undef $srv; # when the server goes out of scope, all sockets will
# be cleaned up
like. it's so clean?? the undef $srv moment when it goes out of scope and every socket gets cleaned up is genuinely iconic β self-care behavior fr fr. β¨
β¨ DESCRIPTION β¨
so what does this thing DO. this server exists so you can rebroadcast RTP media streams out to clients, and you control the whole thing with RTSP. that's the whole plot. π‘
if you want the full lore, go read the README, it has more info. iykyk. π
β¨ USAGE β¨
okay so once the server is up and running, here's the flow bestie, pay attention π:
- stream sources can send an
ANNOUNCEfor whatever mountpoint they want πΈ - then they follow up with a
RECORDrequest to actually start streaming π₯ - after that, clients can connect on the client port at the same mountpoint π
- and they send a
PLAYrequest to receive the RTP data being streamed from the source π¦
that's it. that's the whole handshake-to-streaming pipeline. slay. π
β¨ BUNDLED APPLICATIONS β¨
it ships with rtsp-server.pl, which basically just contains the synopsis. yeah. it IS the synopsis. we love a low-effort king. π
π§ COMING SOON π§
the future features, manifesting as we speak:
- Priv dropping
- authentication
- client encoder
- stats
- tests
not me being excited for all of these. π
β¨ SEE ALSO β¨
go bother these queens when you're done here π:
RTSP::ProxyRTSP::ClientAnyEvent::Socket
β¨ AUTHOR β¨
Mischa Spiegelmock, <revmischa@cpan.org> β thank you for your service π«‘π
β¨ COPYRIGHT AND LICENSE β¨
Copyright (C) 2010 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.
and that's the whole page bestie!! π this was documented with perl v5.38.2 and dated 2024-05-15, so if you're reading this in some distant future era, that's when the lore was last updated. stay hydrated, stream responsibly, and remember β when the server goes out of scope, everything gets cleaned up. we should all be so lucky. β¨ππ¦
π¦ where this page comes from
- debian trixie: librtsp-server-perl 0.06-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: librtsp-server-perl 0.06-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librtsp-server-perl 0.06-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms