/streamx

Django streaming platform with nginx-rtmp

Primary LanguageTypeScript

StreamX

Live streaming platform. Written to learn Django Rest Framework and Channels. Used stack is Django and Next.js with addition of nginx-rtmp.

Showcase

Showcase

Development

To run developing environment, you need to have pipenv, python >=3.10, nodejs >=16.0.0 and npm installed.

Get started with opening 3 terminals for seperate services. API:

pipenv shell # activate virtual environment
cd streamx-api
python manage.py runserver

Frontend:

cd streamx-web
yarn  # install dependencies
yarn dev

RTMP server: Before starting nginx, you need to have nginx files in nginx folder. You can get them from here, don't forget to choose the right version - Gryphon (because it has rtmp module included).

cd nginx
start nginx

Production

I use Render to deploy my app. You can use any other service, but you need to have 3 services running: API, Frontend and RTMP server. To run server with render.yaml file just go to Render.com dashboard and select Blueprints.

Conclusion

I learned a lot from this project. I learned how to use Django Rest Framework, Channels and nginx-rtmp. I also learned how to deploy my app to Render.com. I'm happy with the result, but there are still some things to do, so if you want to contribute, feel free to do so. I will be happy to see your pull requests.