A Rust-powered backend service that allows users to extract and download videos from social media platforms like Facebook. It provides a simple HTTP API to retrieve video URLs and thumbnail images.
- Extract direct video URLs from Facebook links
- Retrieve thumbnail image URLs
- RESTful API using Actix-web framework
- Supports various compression formats (Brotli, Gzip, Deflate)
- Containerized with Docker for easy deployment
- Rust 1.54 or higher
- Cargo package manager
Clone the repository:
git clone https://github.com/neerajshdev/ReelSaverRustBackend.git
cd ReelSaverRustBackendBuild the project:
cargo build --releaseRun the server:
cargo run --releaseBy default, the server will run on 0.0.0.0:8000.
You can also run the application using Docker:
docker build -t reelsaver-backend .
docker run -p 8000:8000 reelsaver-backendOr using Docker Compose:
docker-compose up -dA simple health check endpoint that returns "Hello, world!".
Extract video data from a social media URL.
Request Body:
{
"video_url": "https://www.facebook.com/example/videos/123456789"
}Response:
{
"result": "ok",
"thumbnail_url": "https://example.com/thumbnail.jpg",
"video_url": "https://example.com/video.mp4"
}If no video data is found, the result field will be "none".
src/main.rs- Application entry pointsrc/routes/- API route definitionssrc/fb_url_extractor.rs- Facebook video extraction logicsrc/instagram.rs- Instagram video extraction logicsrc/util.rs- Utility functions for compression and file operations