Crates.io | rsstreamslice_server |
lib.rs | rsstreamslice_server |
version | 0.1.0 |
source | src |
created_at | 2024-11-29 15:45:11.058679 |
updated_at | 2024-11-29 15:45:11.058679 |
description | A Rust library for efficient video streaming with support for partial content delivery. |
homepage | https://github.com/fadedreams/rsstreamslice |
repository | https://github.com/fadedreams/rsstreamslice |
max_upload_size | |
id | 1465757 |
size | 1,356,247 |
A Rust library for efficient streaming with support for partial content delivery.
A web server built using Actix that allows streaming of video and audio files with support for partial content delivery. This means that clients can request specific byte ranges from the files, enabling features like fast seeking in videos and resuming downloads for audio files.
Clone the repository:
git clone https://github.com/fadedreams/rsstreamslice.git
cd rsstreamslice
Add your media files:
Place your video and audio files (e.g., video.mp4
, mp3.mp3
) in the root directory of the project.
Build and run the server:
cargo run --bin rsstreamslice_server
Access the server: Open your web browser and navigate to:
Range
: Used to request specific byte ranges from the media files.video/mp4
for MP4 video files.audio/mpeg
for MP3 audio files.This server supports partial streaming, allowing clients to download specific byte ranges of files.
Example curl
commands:
To download a part of the video file:
curl -H "Range: bytes=0-1023" http://127.0.0.1:8080 --output video_part.mp4
To download the full video file:
curl http://127.0.0.1:8080/video --output full_video.mp4
The server uses env_logger
for logging. You can set the logging level using the RUST_LOG
environment variable. For example, to enable debug logging, run:
RUST_LOG=debug cargo run --bin rsstreamslice_server
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.