diff --git a/DOCKER_DEVELOPMENT.md b/DOCKER_DEVELOPMENT.md new file mode 100644 index 0000000..613ec9d --- /dev/null +++ b/DOCKER_DEVELOPMENT.md @@ -0,0 +1,17 @@ +# Developing using docker + +To develop using docker, make sure you have `docker` installed. Run the following command to start simulations of SRT and RTMP streamings, and a bash session where you can run commands such as you'd in your local machine. + +```bash +make run-docker-dev +``` + +Inside the container, you can start the donut server. + +```bash +make run-server-inside-docker +``` + +You can access [http://localhost:8080/demo/](http://localhost:8080/demo/), using preferable the Chrome browser. You can connect to the simulated SRT and see donut working in practice. + +You can work and change files locally, in your OS, and restart `CTRL+C + make run-server-inside-docker` the donut server in the container. It's fast because it avoids rebuilding all images. It'll offer a faster feedback cycle while developing. diff --git a/MAC_DEVELOPMENT.md b/MAC_DEVELOPMENT.md new file mode 100644 index 0000000..6ac0fdc --- /dev/null +++ b/MAC_DEVELOPMENT.md @@ -0,0 +1,36 @@ +# Running on MacOS + +To develop using your mac, make sure you have `ffmpeg@5` installed: + +```bash +brew install ffmpeg@5 +``` + +You can have multiple versions of ffmpeg installed in your mac. To find where the specific `ffmpeg@5`` was installed, run: + +```bash +sudo find /opt/homebrew -name avcodec.h +``` + +Let's assume the prior command showed two entries: + +```bash +sudo find /opt/homebrew -name avcodec.h +/opt/homebrew/Cellar/ffmpeg/7.0_1/include/libavcodec/avcodec.h +/opt/homebrew/Cellar/ffmpeg@5/5.1.4_6/include/libavcodec/avcodec.h +``` + +You must configure the CGO library path pointing it to the ffmpeg 5 folder. + +```bash +export CGO_LDFLAGS="-L/opt/homebrew/Cellar/ffmpeg@5/5.1.4_6/lib/" +export CGO_CFLAGS="-I/opt/homebrew/Cellar/ffmpeg@5/5.1.4_6/include/" +export PKG_CONFIG_PATH="/opt/homebrew/Cellar/ffmpeg@5/5.1.4_6/lib/pkgconfig" +``` + +Now, you can run it locally: + +```bash +go run main.go -- --enable-ice-mux=true +go test -v ./... +```