All Projects → lucaszanella → rrtsp_client

lucaszanella / rrtsp_client

Licence: other
Rust high level RTSP client

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to rrtsp client

smart rtmpd
RTMP server, smart, compact, high performance(c, c++), high concurrency, easy to maintain, easy to deploy, (supports multiple operating systems Windows and Linux, ARM, FreeBSD)
Stars: ✭ 159 (+1225%)
Mutual labels:  h264, rtsp, h265
Testing Video
Generator of test video files for testing your media playback devices and calibrate TV sets
Stars: ✭ 70 (+483.33%)
Mutual labels:  h264, mp4, h265
Nager.VideoStream
Get images from a network camera stream or webcam
Stars: ✭ 27 (+125%)
Mutual labels:  h264, rtsp, h265
Node Video Lib
Node.js Video Library / MP4 & FLV parser / MP4 builder / HLS muxer
Stars: ✭ 264 (+2100%)
Mutual labels:  h264, mp4, h265
Jmuxer
jMuxer - a simple javascript mp4 muxer that works in both browser and node environment.
Stars: ✭ 222 (+1750%)
Mutual labels:  h264, rtsp, mp4
mini
OpenSource Mini IP camera streamer
Stars: ✭ 64 (+433.33%)
Mutual labels:  h264, rtsp, mp4
Media Stream Library Js
JavaScript library to handle media streams on the command line (Node.js) and in the browser.
Stars: ✭ 192 (+1500%)
Mutual labels:  h264, rtsp, mp4
demuxer
A tool for demux ts/mp4/flv by typescript. Support HEVC/AVC/AAC codec
Stars: ✭ 108 (+800%)
Mutual labels:  h264, mp4, h265
Wxinlineplayer
🤟Super fast H.264/H.265 FLV player
Stars: ✭ 873 (+7175%)
Mutual labels:  h264, h265
Video Stream.js
🔜 📼 Video stream middleware for express.js
Stars: ✭ 37 (+208.33%)
Mutual labels:  h264, mp4
colab-ffmpeg-cuda
FFmpeg build with CUDA support for Linux (especially for Google Colab)
Stars: ✭ 40 (+233.33%)
Mutual labels:  h264, h265
Ksylive ios
金山云直播SDK [ iOS推流+播放 ]融合版 支持美颜滤镜(Beauty Filter)、美声(Beauty Voice)、软硬编(Software/Hardware Encoder) 、网络自适应(Network Auto Adapt)、混音(Audio Mixer)、混响(Reverb)、画中画(PIP)
Stars: ✭ 861 (+7075%)
Mutual labels:  h264, h265
Rtsp Simple Server
ready-to-use RTSP / RTMP server and proxy that allows to read, publish and proxy video and audio streams
Stars: ✭ 882 (+7250%)
Mutual labels:  h264, rtsp
wyzecam-hls
Converts MP4 files from WyzeCam NFS to HLS stream. Much more stable alternative to RTSP firmware.
Stars: ✭ 58 (+383.33%)
Mutual labels:  rtsp, nvr
Ffmediaelement
FFME: The Advanced WPF MediaElement (based on FFmpeg)
Stars: ✭ 733 (+6008.33%)
Mutual labels:  h264, mp4
Mp4composer Android
This library generate an Mp4 movie using Android MediaCodec API and apply filter, scale, trim, transcode, crop, timeScale, mute and rotate Mp4.
Stars: ✭ 674 (+5516.67%)
Mutual labels:  h264, h265
Digital video introduction
A hands-on introduction to video technology: image, video, codec (av1, vp9, h265) and more (ffmpeg encoding).
Stars: ✭ 12,184 (+101433.33%)
Mutual labels:  h264, h265
Ffmediatoolkit
FFMediaToolkit is a cross-platform video decoder/encoder library for .NET that uses FFmpeg native libraries. It supports video frames extraction, reading stream metadata and creating videos from bitmaps in any format supported by FFmpeg.
Stars: ✭ 156 (+1200%)
Mutual labels:  h264, mp4
Nodeplayer.js
Pure JavaScrip HTML5 live stream player
Stars: ✭ 157 (+1208.33%)
Mutual labels:  h264, h265
Voukoder
Provides an easy way to include the FFmpeg encoders in other windows applications.
Stars: ✭ 436 (+3533.33%)
Mutual labels:  h264, h265

RRTSP Client

Currently works, but a lot of work to do. PRs welcome!

Example

use futures::lock::Mutex;
use log::{info};
use rrtsp_client::client::{Body, Client, Data, Url, Host};
use std::sync::Arc;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();
    
    let uri_str = "rtsp://admin:[email protected]:10554/tcp/av0_0";
    let url = Url::parse(uri_str).unwrap();
    let port = url.port().unwrap_or(554);

    let ip_address = match url.host() {
        //For RTSP URLs, URL.host() does not return Host::Ipv4 or 6, it returns Domain
        Some(Host::Domain(domain)) => format!("{}:{}", domain, port).parse().unwrap(),
        None => panic!("missing host/url"),
        _ => panic!(
            "only IP hosts are accepted. Your host: {:?}",
            url.host()
        ),
    };

    info!("Starting RTSP client for uri {}", uri_str);

    let rtsp_client = Arc::new(Mutex::new(
        Client::new(uri_str, None, None, rtsp_types::Version::V1_0).unwrap(),
    ));

    Client::play(
        rtsp_client,
        ip_address,
        Arc::new(|data: &Data<Body>| {
            info!("<<< {} bytes", &data.len());
        }),
    )
    .await.unwrap();

    Ok(())
}

Cargo.toml

Still gotta publish to crates.io

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].