Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
d4c7c4a
moq-cli: unified import/export endpoint grammar
kixelated Jul 1, 2026
77a25e8
Merge remote-tracking branch 'origin/main' into claude/competent-rhod…
kixelated Jul 1, 2026
3af77a7
moq-cli: wire rtmp/srt dial-out (#1982) and ship binary as `moq`
kixelated Jul 1, 2026
3376775
moq-cli: default the broadcast name to "" (the root broadcast)
kixelated Jul 1, 2026
0f19a93
moq-cli: address review — MoQ side before verb, format-as-subcommand
kixelated Jul 1, 2026
5e8d1df
moq-cli: address CodeRabbit — use `moq` in docs, tighten validation
kixelated Jul 1, 2026
704989f
moq-cli: add rustdoc to public command fields
kixelated Jul 1, 2026
b1dc6da
moq-cli: move --fragment-duration onto the fmp4/mkv sinks
kixelated Jul 1, 2026
e0bda3c
moq-cli: rename --catalog to --catalog-format
kixelated Jul 1, 2026
437ce30
moq-cli: add main.rs module doc; derive Docker binary from build output
kixelated Jul 1, 2026
396297c
Merge remote-tracking branch 'origin/main' into claude/competent-rhod…
kixelated Jul 1, 2026
b8eb8df
moq-cli: factor stdout fragment-duration into a shared Fragmented struct
kixelated Jul 1, 2026
d357683
moq-cli: scope every gateway endpoint to a single broadcast
kixelated Jul 1, 2026
6c7b1d8
moq-cli: parse_url tests + clearer SRT --latency help
kixelated Jul 1, 2026
0857445
moq-cli: address review — --latency-max, drop --dir, hls arg structs,…
kixelated Jul 1, 2026
53ee953
moq-cli: move the iroh transport config into MoqSide
kixelated Jul 1, 2026
e02dd10
moq-cli: bump to 0.8.0
kixelated Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/homebrew/Formula/moq-cli.rb.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class MoqCli < Formula
end

def install
bin.install "bin/moq-cli"
bin.install "bin/moq"
end

test do
system bin/"moq-cli", "--help"
system bin/"moq", "--help"
end
end
17 changes: 4 additions & 13 deletions .github/workflows/moq-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,10 @@ jobs:
# and AlmaLinux/RHEL/Rocky 9+ (.rpm).
run: cargo zigbuild --release --target ${{ matrix.target }}.2.34 -p moq-cli

- name: Rename binary
shell: bash
env:
TARGET: ${{ matrix.target }}
run: |
# The crate is named moq-cli but the .deb / .rpm and Homebrew
# formula present the binary as `moq`. Cargo produces
# target/release/moq-cli by default (no [[bin]] override),
# so make a sibling copy that the downstream packaging steps
# can point at without each one needing to know the rename.
cp "target/${TARGET}/release/moq-cli" "target/${TARGET}/release/moq"

- name: Package bare binary
shell: bash
run: |
# The crate is named moq-cli but its `[[bin]]` ships as `moq`.
version="${{ steps.parse.outputs.version }}"
target="${{ matrix.target }}"
name="moq-cli-v${version}-${target}"
Expand All @@ -83,7 +72,7 @@ jobs:
run: |
name="moq-cli-${VERSION}-${TARGET}"
mkdir -p "dist/${name}/bin"
cp "target/${TARGET}/release/moq-cli" "dist/${name}/bin/moq-cli"
cp "target/${TARGET}/release/moq" "dist/${name}/bin/moq"
cp LICENSE-MIT LICENSE-APACHE "dist/${name}/"
if [[ -f rs/moq-cli/README.md ]]; then
cp rs/moq-cli/README.md "dist/${name}/"
Expand Down Expand Up @@ -166,6 +155,7 @@ jobs:
run: |
./rs/scripts/package-binary.sh \
--crate moq-cli \
--bin moq \
--target ${{ matrix.target }} \
--version ${{ steps.parse.outputs.version }} \
--output dist
Expand Down Expand Up @@ -213,6 +203,7 @@ jobs:
run: |
./rs/scripts/package-windows.sh \
--crate moq-cli \
--bin moq \
--target ${{ matrix.target }} \
--version ${{ steps.parse.outputs.version }} \
--output dist
Expand Down
37 changes: 4 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ moq-msf = { version = "0.3", path = "rs/moq-msf" }
moq-mux = { version = "0.7", path = "rs/moq-mux" }
moq-native = { version = "0.17", path = "rs/moq-native", default-features = false }
moq-net = { version = "0.1", path = "rs/moq-net" }
moq-rtc = { version = "0.0.1", path = "rs/moq-rtc" }
moq-rtmp = { version = "0.0.1", path = "rs/moq-rtmp" }
moq-srt = { version = "0.0.1", path = "rs/moq-srt" }
moq-token = { version = "0.6", path = "rs/moq-token" }
moq-video = { version = "0.0.6", path = "rs/moq-video" }
qmux = { version = "0.2", default-features = false }
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ RUN --mount=type=cache,target=/root/.cache --mount=type=cache,target=/nix,from=n
# Default to `/bin/sh` for the entrypoint if no package is specified
ARG package="sh"

# Create entry.sh script that knows which binary to run
RUN echo '#!/bin/sh' > /output/entry.sh && \
echo "exec /bin/${package} \"\$@\"" >> /output/entry.sh && \
# Create entry.sh script that knows which binary to run. Derive it from the
# single binary the package produced (so a crate whose `[[bin]]` name differs
# from its package name, e.g. `moq-cli` shipping as `moq`, just works); fall
# back to the package name when there's no binary (the `sh` default).
RUN binary="$(ls /output/result/bin 2>/dev/null | head -n1)"; \
[ -n "$binary" ] || binary="${package}"; \
printf '#!/bin/sh\nexec /bin/%s "$@"\n' "${binary}" > /output/entry.sh && \
chmod +x /output/entry.sh

# Final image (when no specific package is selected, defaults to sh)
Expand Down
32 changes: 16 additions & 16 deletions demo/pub/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,25 @@ tos url='http://localhost:4443' *args:

# Publish a video using ffmpeg (CMAF / fMP4) to a relay server.
cmaf name url='http://localhost:4443' *args:
cargo build --bin moq-cli
cargo build --bin moq
just ffmpeg-cmaf "media/{{ name }}.mp4" |\
cargo run --bin moq-cli -- \
{{ args }} publish --url "{{ url }}" --name "{{ name }}.hang" fmp4
cargo run --bin moq -- \
{{ args }} --client-connect "{{ url }}" --broadcast "{{ name }}.hang" import fmp4

# Publish a video using ffmpeg (MPEG-TS) to a relay server.
ts name url='http://localhost:4443' *args:
cargo build --bin moq-cli
cargo build --bin moq
just ffmpeg-ts "media/{{ name }}.mp4" |\
cargo run --bin moq-cli -- \
{{ args }} publish --url "{{ url }}" --name "{{ name }}.hang" ts
cargo run --bin moq -- \
{{ args }} --client-connect "{{ url }}" --broadcast "{{ name }}.hang" import ts

# Publish a video via iroh.
iroh name url prefix="":
just download "{{ name }}"
cargo build --bin moq-cli
cargo build --bin moq
just ffmpeg-cmaf "media/{{ name }}.mp4" |\
cargo run --bin moq-cli -- \
--iroh-enabled publish --url "{{ url }}" --name "{{ prefix }}{{ name }}.hang" fmp4
cargo run --bin moq -- \
--iroh-enabled --client-connect "{{ url }}" --broadcast "{{ prefix }}{{ name }}.hang" import fmp4

# Generate and ingest an HLS stream from a video file.
hls name relay="http://localhost:4443":
Expand Down Expand Up @@ -142,7 +142,7 @@ hls name relay="http://localhost:4443":
trap cleanup SIGINT SIGTERM EXIT

echo ">>> Importing HLS via moq-cli"
cargo run --bin moq-cli -- hls --url "{{ relay }}" import --broadcast "{{ name }}.hang" --playlist "$OUT_DIR/master.m3u8"
cargo run --bin moq -- --client-connect "{{ relay }}" --broadcast "{{ name }}.hang" import hls "$OUT_DIR/master.m3u8"
EXIT_CODE=$?

cleanup
Expand All @@ -151,24 +151,24 @@ hls name relay="http://localhost:4443":
# Publish a video using H.264 Annex B format.
h264 name url="http://localhost:4443" *args:
just download "{{ name }}"
cargo build --bin moq-cli
cargo build --bin moq

ffmpeg -hide_banner -v quiet \
-stream_loop -1 -re \
-i "media/{{ name }}.mp4" \
-c:v copy -an \
-bsf:v h264_mp4toannexb \
-f h264 \
- | cargo run --bin moq-cli -- publish --url "{{ url }}" --name "{{ name }}.hang" avc3 {{ args }}
- | cargo run --bin moq -- {{ args }} --client-connect "{{ url }}" --broadcast "{{ name }}.hang" import avc3

# Publish a video using ffmpeg directly from moq to the localhost.
serve name *args:
just download "{{ name }}"
cargo build --bin moq-cli
cargo build --bin moq
just ffmpeg-cmaf "media/{{ name }}.mp4" |\
cargo run --bin moq-cli -- \
{{ args }} serve --listen "[::]:4443" --tls-generate "localhost" \
--name "{{ name }}.hang" fmp4
cargo run --bin moq -- \
{{ args }} --server-bind "[::]:4443" --tls-generate "localhost" \
--broadcast "{{ name }}.hang" import fmp4

# Generate and serve an HLS stream from a video for testing.
serve-hls name port="8000":
Expand Down
Loading
Loading