https://github.com/petrenkovitaliy/local_video_stream
Local server for video streaming
https://github.com/petrenkovitaliy/local_video_stream
actix ffmpeg sse videostreaming
Last synced: 3 months ago
JSON representation
Local server for video streaming
- Host: GitHub
- URL: https://github.com/petrenkovitaliy/local_video_stream
- Owner: petrenkoVitaliy
- Created: 2024-06-13T20:50:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-18T00:18:34.000Z (12 months ago)
- Last Synced: 2025-02-05T20:06:42.036Z (4 months ago)
- Topics: actix, ffmpeg, sse, videostreaming
- Language: Rust
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# local_video_stream
[](https://github.com/petrenkoVitaliy/local_video_stream/actions)
Local server for video streaming and conversion based on
[Actix](https://github.com/actix/actix-web)
and [FFmpeg](https://github.com/FFmpeg/FFmpeg)### API:
- `GET /` - return root html
- `GET /chunk` - Pipe: return video chunk pipe
- `GET /status` - SSE - check video existence status and start converting if needed
- `PUT /source` - update videos' source folder
### Flow
`/status` request checks if requested video is in MP4 format or was already converted to MP4 and sends success response.
Otherwise, it starts conversion with FFmpeg in a separate process and sends SSE events to client with current conversion progress.`/chunk` selects file source and range based on request meta and sends buffer to client.
#### FFmpeg handling
Handler and output parser - [converter_service.rs](src/service/converter_service.rs)