Play your favorite live streams from command line

Overview

Streamlib

Streamlib is a meta-player for media streams. The streamlib CLI works against a curated library of video and audio streams, and enables querying and playback through a standard media player, defaulting to mpv which is the recommended player.

The most important feature Streamlib provides is the ability to generate timestamped authentication tokens on streams that require some basic level of authentication to them. See the Queries section for more details.

Usage

Streamlib is still moving fast and has yet to been officially packaged, but the basic functionality works!

Running it requires checking out the git repository and then calling:

$ cargo run -- groove

The single argument will run a case-insensitive match against all known metadata and pick the first matching stream. Upcoming versions will include a console-based interactive interface.

Entire library can be dumped with the -L flag:

$ cargo run -- -L

Or filtered to show a specific query:

$ cargo run -- -L somafm

An alternate player can be set with the -p/--player flag:

$ cargo run -- -p vlc groove

But note that some features critical for playing streams (such as customizing HTTP headers) are unavailable and will cause some streams to fail.

Use the -l/--library flag to point streamlib to a local library directory for testing new additions:

$ cargo run -- --library /path/to/local/library groove

Testing

$ cargo test

Library

To add new content and test it you'll need to clone both repositories:

$ git clone https://github.com/streamlib/streamlib
$ git clone https://github.com/streamlib/library
# add any files you want to the library
$ cd streamlib
$ cargo run -- --library ../library groove

See https://github.com/streamlib/library for more details.

License

GPLv3

Comments
  • (no bug) a word of thanks.

    (no bug) a word of thanks.

    Today I found two utilities on Github via the awesome-rust list, that are amazing!, both made by you! I found slingr first, I now use it via Termux to cast media from my phone or tablet to my Android TV box, I can now uninstall my old casting app and replace it with slingr instead, bye (interpreted) Java, hello rust! Then I found this project... WOW. 😱 I much prefer to: stream > download Over the years I have made both scripts and functions, for youtube-dl and spotdl (a Spotify client) that allow me to this, keep organised lists to stream with mpv (instead of downloading anything) Its hassle though, as these clients are designed to download, but can stream, this is designed purely to organise streaming (no focus on downloading), now all I have to do is collect my URLs and add them to a library, Thank you! I will add a playlist to the library repo, I use it when I cant be bothered to search for anything and just want some chilled music to code with (LoFi HipHop beats). Let me close this "issue" now 🤣

    opened by nerd190 1
  • Disable experimental GUI on Windows

    Disable experimental GUI on Windows

    The nightly builds that run on the entire OS matrix are broken on Windows https://github.com/streamlib/streamlib/runs/264844691

    This is due to termion not being supported there.

    @noamt Can you please make sure the experimental GUI is disabled on Windows via conditional building?

    bug 
    opened by yuvadm 1
  • Rethink TOML format for library

    Rethink TOML format for library

    Attempting to create a large-ish TOML file (~4MB) results in unreasonable parsing times (https://github.com/alexcrichton/toml-rs/issues/342)

    Unless the cause of this issue is found and resolved, we might need to rethink the TOML design. Two possible ways to do that:

    1. Use another deserialization format that can be parsed faster. This solution might have usability issues since TOMLs are pretty nice.
    2. Compile the library (nightly? on demand on the user machine?) into some intermediate representation that can be efficiently parsed in runtime.
    bug enhancement 
    opened by yuvadm 1
  • Fix/windows build

    Fix/windows build

    opened by zohar-yzgiaev-healthy 1
  • Bump net2 from 0.2.33 to 0.2.37

    Bump net2 from 0.2.33 to 0.2.37

    Bumps net2 from 0.2.33 to 0.2.37.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump miow from 0.2.1 to 0.2.2

    Bump miow from 0.2.1 to 0.2.2

    Bumps miow from 0.2.1 to 0.2.2.

    Commits
    • 6fd7b9c Bump version to 0.2.2
    • 550efc2 Merge branch 'fix-sockaddr-convertion-v0.2.x' into 0.2.x
    • ca8db53 Stop using from_ne_bytes to be compatible with Rust < 1.32.0
    • 3e217e3 Bump net2 dep to 0.2.36 without invalid SocketAddr convertion
    • 27b77cc Adapt to winapi 0.2
    • 2783715 Safely convert SocketAddr into raw SOCKADDR
    • f6662ef Clarify wording of license information in README.
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump hyper from 0.12.35 to 0.12.36

    Bump hyper from 0.12.35 to 0.12.36

    Bumps hyper from 0.12.35 to 0.12.36.

    Changelog

    Sourced from hyper's changelog.

    v0.12.36 (2021-02-17)

    Bug Fixes

    • client: allow client GET requests with explicit body headers (23fc8b08, closes #1925)
    • dependencies: use correct minimum versions (#1974) (90c1e8f4)
    • http1: fix server misinterpretting multiple Transfer-Encoding headers (f6051250)
    • server: allow Server::local_addr to be called with custom executor (#2009) (da16ed62)

    Features

    • client:
      • add resolve timeout to HttpConnector (#1994) (d4ee6996)
      • Add connect timeout to HttpConnector (3d676fb7)
    Commits
    • 4c82565 v0.12.36
    • 6d9003d chore(lib): fix new unused variable lint
    • f605125 fix(http1): fix server misinterpretting multiple Transfer-Encoding headers
    • a115c30 chore(lib): allow deprecations in 0.12.x builds
    • d4ee699 feat(client): add resolve timeout to HttpConnector (#1994)
    • da16ed6 fix(server): allow Server::local_addr to be called with custom executor (#2...
    • 3d676fb feat(client): Add connect timeout to HttpConnector
    • 90c1e8f fix(dependencies): use correct minimum versions (#1974)
    • 4d188d1 chore(ci): update MSRV to 1.31 (parking_lot uses 2018 edition)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump smallvec from 0.6.10 to 0.6.14

    Bump smallvec from 0.6.10 to 0.6.14

    Bumps smallvec from 0.6.10 to 0.6.14.

    Release notes

    Sourced from smallvec's releases.

    v0.6.14

    • Fix a possible buffer overflow in insert_many (#252, #254).

    v0.6.13

    • Use the maybe-unit crate in place of soon-to-be-deprecated std::mem::uninitialized (#180). When built with Rust 1.36 or later, this fixes a source of undefined behavior. It also fixes deprecation warnings in Rust 1.39 and later, and test failures when run in MIRI. In Rust 1.35 and earlier it provides some safety improvements but does not completely eliminate undefined behavior. (However, we are not aware of any cases where the undefined behavior causes bugs in practice in those toolchains.)

    v0.6.12

    • Move code using default fn into its own module (#161).

    v0.6.11

    • The unstable alloc feature is no longer needed. This crate can now build with the std feature disabled on stable Rust 1.36 or later (#159).
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump http from 0.1.18 to 0.1.21

    Bump http from 0.1.18 to 0.1.21

    Bumps http from 0.1.18 to 0.1.21.

    Changelog

    Sourced from http's changelog.

    0.1.21 (December 2, 2019)

    • Fix Method::is_idempotent returning false for PUT and `DELETE.

    0.1.20 (November 26, 2019)

    • Fix possible double-free if header::Drain iterator is std::mem::forgoten (#357).
    • Fix possible data race if multiple header::ValueDrains are iterated on different threads (#362).
    • Fix HeaderMap::reserve capacity overflows (#360).
    • Fix parsing long authority-form Uris (#351).

    0.1.19 (October 15, 2019)

    • Allow % in IPv6 addresses in Uri (#343).
    Commits
    • 6443bdb v0.1.21
    • 0cbcc1e Fix Method::is_idempotent
    • 4a5b64d v0.1.20
    • 6b07ee4 Refactor Method::is_idempotent for readability (#348)
    • 6856193 Fix docs indentation (#347)
    • d3cae7c Fix parsing of long host with no scheme (#351)
    • 8ffe094 Make ValueDrain eagerly collect its extra values
    • 81ceb61 fix capacity overflows in HeaderMap::reserve
    • 32f1ae1 Remove unused 'inner label
    • 82d53db Fix HeaderMap::drain double-free if drain iterator is forgotten
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump crossbeam-deque from 0.7.1 to 0.7.4

    Bump crossbeam-deque from 0.7.1 to 0.7.4

    Bumps crossbeam-deque from 0.7.1 to 0.7.4.

    Changelog

    Sourced from crossbeam-deque's changelog.

    Version 0.8.1

    • Support targets that do not have atomic CAS on stable Rust (#698)

    Version 0.8.0

    • Bump the minimum supported Rust version to 1.36.
    • Bump crossbeam-channel to 0.5.
    • Bump crossbeam-deque to 0.8.
    • Bump crossbeam-epoch to 0.9.
    • Bump crossbeam-queue to 0.3.
    • Bump crossbeam-utils to 0.8.

    Version 0.7.3

    • Fix breakage with nightly feature due to rust-lang/rust#65214.
    • Bump crossbeam-channel to 0.4.
    • Bump crossbeam-epoch to 0.8.
    • Bump crossbeam-queue to 0.2.
    • Bump crossbeam-utils to 0.7.

    Version 0.7.2

    • Bump crossbeam-channel to 0.3.9.
    • Bump crossbeam-epoch to 0.7.2.
    • Bump crossbeam-utils to 0.6.6.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Owner
Streamlib
Play your favorite live streams from command line
Streamlib
Xiu - A simple and secure live media server in pure Rust (RTMP/HTTP-FLV/HLS/Relay).🦀

Xiu is a simple and secure live media server written by pure Rust, it now supports popular live protocols like RTMP/HLS/HTTP-FLV (and maybe other protocols in the future), you can deploy it as a stand-alone server or a cluster using the relay feature.

HarlanC 602 Jan 2, 2023
The objective of this mini-project is to create a command line application to manage a collection of multimedia files

Gestionnaire de fichiers multimédia L’objectif de ce mini-projet est de créer une application en ligne commande pour gérer une collection de fichiers

Bynawers 0 Mar 11, 2022
Media Cleaner is a simple CLI tool to clean up your media library based on your Overseerr requests and Tautulli history, written in Rust.

Media Cleaner Media Cleaner is a simple CLI tool to clean up your media library based on your Overseerr requests and Tautulli history, written in Rust

Felix Bjerhem Aronsson 21 Mar 22, 2023
Plays back videos in your terminal in an insanely slow and inefficient way.

term-video I guess this is usable now... Compilation Since this project is built using Rust, install its toolchain first, for example using rustup. gi

Pascal Puffke 7 Feb 23, 2022
Gyroflow is an application that can stabilize your video by using motion data from a gyroscope and optionally an accelerometer

Gyroflow is an application that can stabilize your video by using motion data from a gyroscope and optionally an accelerometer. Modern cameras record that data internally (GoPro, Sony, Insta360 etc), and this application stabilizes the captured footage precisely by using them. It can also use gyro data from an external source (eg. from Betaflight blackbox).

Gyroflow 3.9k Jan 5, 2023
Convert your favorite images and wallpapers with your favorite color palettes/themes

dipc doprz' image palette converter Convert your favorite images and wallpapers with your favorite color palettes/themes Color Palettes/Themes catppuc

null 50 Apr 26, 2023
Access German-language public broadcasting live streams and archives on the Linux Desktop

Deutsche Version Televido Televido (“Television” in Esperanto) lets you livestream, search, play and download media from German-language public televi

David C. 10 Nov 4, 2023
Live Server - Launch a local network server with live reload feature for static pages

Live Server - Launch a local network server with live reload feature for static pages

Lomirus 18 Nov 30, 2022
Coinlive is an interactive command line tool that displays live cryptocurrency prices.

Coinlive is an interactive command line tool that displays live cryptocurrency prices. It can also display simple historical price charts.

Mayer Analytics 9 Dec 7, 2022
📦✨ your favorite rust -> wasm workflow tool!

?? ✨ wasm-pack Your favorite Rust → Wasm workflow tool! Docs | Contributing | Chat Built with ?? ?? by The Rust and WebAssembly Working Group About Th

Rust and WebAssembly 4.8k Jan 5, 2023
Automatic wallpaper downloader of posters of your favorite movies and TV shows via TMDb.

Wallpaperflix Automatic wallpaper downloader of posters of your favorite movies and TV shows via TMDb. Prerequisities https://tauri.app/v1/guides/gett

İsmail Karslı 2 Sep 8, 2022
OSINT from your favorite services in a friendly terminal user interface

osintui Open Source Intelligence Terminal User Interface Report Bug · Request Feature Installation First, install Rust (using the recommended rustup i

Will Sheldon 639 Jan 4, 2023
🔍 quickly search with your favorite websites straight from the terminal

gg Search with your favorite websites straight from the terminal! gg-example.mp4 Configure gg To add more websites, just edit the ~/.gg.toml or %APP_D

Vedant Nandwana 4 Dec 31, 2022
A CLI app to set and organize your favorite DNS servers.

rdns A CLI app to set and organize your favorite DNS servers. Introduction rdns is a CLI utility that can set your system DNS, either directly or by m

null 4 Feb 19, 2024
CLI utility that screencaptures your Linux desktop and streams it to Kodi via UPNP/DLNA and RTSP

desktopcast Desktopcast is a little CLI application that allows you to cast your Linux desktop to any UPNP/DLNA device capable of the AVTransfer servi

Markus Ebner 25 Apr 16, 2023
on-screen keyboard display for your coding streams.

⌨ OSKD (On-screen key display) OSKD is an on-screen keyboard display that can be used during streams. It provides an intuitive and easy-to-use interfa

Sammwy 46 May 6, 2023
Small command-line tool to switch monitor inputs from command line

swmon Small command-line tool to switch monitor inputs from command line Installation git clone https://github.com/cr1901/swmon cargo install --path .

William D. Jones 5 Aug 20, 2022
Query textual streams with PromQL-like language

pq - query textual streams with PromQL Glossary Time Series - a stream of timestamped values, aka samples sharing the same metric name and, optionally

Ivan Velichko 310 Dec 23, 2022
Transforms UDP stream into (fake) TCP streams that can go through Layer 3 & Layer 4 (NAPT) firewalls/NATs.

Phantun A lightweight and fast UDP to TCP obfuscator. Table of Contents Phantun Latest release Overview Usage 1. Enable Kernel IP forwarding 2. Add re

Datong Sun 782 Dec 30, 2022