-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ref: c8a8d232be649
- Loading branch information
0 parents
commit 570faa4
Showing
335 changed files
with
60,129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
# Created by https://www.toptal.com/developers/gitignore/api/linux,node,rust,react | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=linux,node,rust,react | ||
|
||
### Linux ### | ||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# vuepress v2.x temp and cache directory | ||
.temp | ||
|
||
# Docusaurus cache and generated files | ||
.docusaurus | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
### Node Patch ### | ||
# Serverless Webpack directories | ||
.webpack/ | ||
|
||
# Optional stylelint cache | ||
|
||
# SvelteKit build / generate output | ||
.svelte-kit | ||
|
||
### react ### | ||
.DS_* | ||
**/*.backup.* | ||
**/*.back.* | ||
|
||
node_modules | ||
|
||
*.sublime* | ||
|
||
psd | ||
thumb | ||
sketch | ||
|
||
### Rust ### | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/linux,node,rust,react | ||
|
||
certs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "repos/moq-rs/third_party/mp4-rust"] | ||
path = repos/moq-rs/third_party/mp4-rust | ||
url = https://github.com/streaming-university/mp4-rust.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export CAROOT ?= $(shell cd scripts; go run filippo.io/mkcert -CAROOT) | ||
|
||
.PHONY: pub-moq pub-dash | ||
|
||
dev: certs/localhost.crt | ||
@docker compose stop | ||
@docker compose rm -fsv | ||
@docker container prune -f | ||
@docker compose --profile dev up --build --remove-orphans --renew-anon-volumes | ||
|
||
prod: certs/localhost.crt | ||
@docker compose stop | ||
@docker compose rm -fsv | ||
@docker container prune -f | ||
@docker compose --profile prod up --build --remove-orphans --renew-anon-volumes | ||
|
||
pub-moq: | ||
@scripts/pub-moq.sh --docker 1 --testsrc 1 | ||
|
||
pub-dash: | ||
@scripts/pub-dash.sh --testsrc 1 | ||
|
||
certs/localhost.crt: | ||
@git submodule update --init --recursive | ||
@scripts/cert | ||
@mkdir -p certs | ||
@mv scripts/localhost.* certs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Media-over-QUIC vs DASH | ||
|
||
## Development (no Docker) | ||
This section is under construction. | ||
|
||
## Development using Docker | ||
|
||
You need to have [Docker](https://docs.docker.com/get-docker/), [Go](https://go.dev/), and [FFmpeg](https://ffmpeg.org/) installed in your machine. | ||
|
||
> Go has to be installed because we use it to install CA certificates in the docker image and your browser will trust the certificates generated by the server. | ||
> [!IMPORTANT] | ||
> Generated certificates are only valid for 10 days. If you ever face SSL errors, you can regenerate the certificates by running `make certs/localhost.crt`. | ||
### Running the server | ||
|
||
```bash | ||
make dev | ||
``` | ||
|
||
After running the command above, you should be able to access the server at [https://localhost:5173](https://localhost:5173). | ||
|
||
#### Remarks: | ||
|
||
- With this command, any changes you make in `repos/demo` and `repos/moq-rs` will be reflected in the server. | ||
- No need to setup CA yourself, or modify `/etc/hosts` to trick the browser into trusting the certificates. | ||
- When a file related to `moq-pub` changes, at the same time `moq-relay` will restart. So you have to wait until `moq-pub` fails for it to restart itself. Otherwise you can just send SIGINT and restart `moq-pub` | ||
|
||
### Starting a stream | ||
|
||
```bash | ||
make pub-moq | ||
make pub-dash | ||
``` | ||
|
||
These will run FFmpeg and supply the generated stream to moq (via pipe) and dash (via http). Look at `scripts/pub-moq` and `scripts/pub-dash` to see how we use FFmpeg to publish the stream. | ||
|
||
## Production | ||
|
||
### Building the server | ||
|
||
```bash | ||
make prod | ||
``` | ||
|
||
The only difference between `dev` and `prod` is that no live-reloading is enabled in the `prod` version. | ||
|
||
### Starting the stream | ||
|
||
This is the same as in development. |
Oops, something went wrong.