HLS Video Transcoder Microservice
- This project is using Python 3
- Built on top of Flask with Peewee ORM
- Currently uses sqlite for simplicity
-
Move to this project directory and do the usual
pip install -r requirements.txt
-
Run
setup.py
python3 setup.py
If you receive an input like
FFMPEG not installed! Please install ffmpeg and add it to PATH
Then please install FFMPEG from it's official site
- Simply run
python app.py
-
Upload video
[POST] http://host/video
files = ['video_file']
POST with
multipart/form-data
-
Get video status
[GET] http://host/video/<video_id>
-
Add video to transcoder queue
[POST] http://host/queue
json = {"video_id" : <int>, "qualities" : ["360p", "480p", "720p", "1080p"]}
-
Get HLS stream manifest
[GET] http://host/static/<video_filename_without_ext>/master.m3u8
Success :
{"filename":<filename>, "id":<int>, "in_queue":<bool>, "is_processed":<bool>, "video_qualities":<List[int]>, "created_at":<DATE>, "updated_at":<DATE>}
Fail :
{"code" : <int>, "error" : <str>}
To be defined