Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Zi5han/gomoqt

 
 

Repository files navigation

gomoqt

A Go implementation of Media over QUIC Transport (MOQT), specifically implementing the MOQ Lite specification for efficient media streaming over QUIC.

codecov

Overview

This implementation follows the MOQ Lite specification, providing a foundation for building real-time media streaming applications using QUIC transport. MOQ Lite is a simplified version of the Media over QUIC Transport protocol, designed for lower latency and reduced complexity while maintaining the core benefits of QUIC-based media delivery.

Features

  • MOQ Lite Protocol: Core implementation of the MOQ Lite specification

  • WebTransport Support: Full support for WebTransport connections in browsers

  • Raw QUIC Support: Direct QUIC connections for native applications

  • Track Management: Publisher/Subscriber pattern for media track handling

  • Multiplexed Streaming: Efficient multiplexing of multiple media tracks

  • Sample Applications: Complete examples demonstrating various use cases

  • Real-Time Streaming: Minimized end-to-end latency for interactive use cases (live events, conferencing, low-latency monitoring). Suitable where responsiveness matters to user experience.

  • Uninterrupted Streaming: Robust playback on varying network conditions. Built on QUIC/WebTransport primitives to reduce stalls and improve recovery from packet loss.

  • Efficient Content Delivery: Protocol-level optimizations and multiplexing reduce connection overhead and infrastructure cost when serving many concurrent viewers or streams.

  • Seamless Playback: Jitter and buffer management designed to reduce rebuffering and provide smooth continuous playback for viewers.

  • Optimized Quality: Adaptive delivery patterns that prioritize usable quality under constrained bandwidth, enabling consistent UX across device classes.

Components

moqt

The core Go package for implementing and handling the Media over QUIC (MOQ) protocol.

moq-web

TypeScript implementation of the MOQ protocol for the Web.

interop

Interoperability testing tools and examples for validating MOQ implementations across different platforms.

Development

Prerequisites

  • Go 1.25.0 or later
  • Mage build tool (install with go install github.com/magefile/mage@latest)

Getting Started

  1. Clone the repository:

    git clone https://github.com/OkutaniDaichi0106/gomoqt.git
    cd gomoqt
  2. Install the package:

    go get github.com/OkutaniDaichi0106/gomoqt
  3. Install Mage build tool:

    go install github.com/magefile/mage@latest

Note: Development setup commands (dev-setup, certificate generation, etc.) are still available via the Justfile. The core build commands (test, lint, fmt, build, clean) have been migrated to Mage.

Development Commands

Running Examples

# Start the interop server
just interop-server

# In another terminal, run the interop client
just interop-client

Code Quality

# Format code
mage fmt

# Run linter (requires golangci-lint: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest)
mage lint

# Run tests
mage test

Build & Clean

# Build the code
mage build

# Clean up generated files
mage clean

# Show available commands
mage help

Examples

The examples directory includes sample applications demonstrating how to use gomoqt:

  • Interop Server and Client (interop/): Interoperability testing between different MOQ implementations
  • Broadcast Example (examples/broadcast/): Broadcasting functionality demonstration
  • Echo Example (examples/echo/): Simple echo server and client implementation
  • Native QUIC (examples/native_quic/): Direct QUIC connection examples
  • Relay (examples/relay/): Relay functionality for media streaming

Documentation

Specification Compliance

This implementation targets the MOQ Lite specification, which provides a simplified approach to Media over QUIC Transport. The current implementation status can be found in the moqt package README, which includes detailed tracking of implemented features according to the specification sections.

Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/amazing-feature).
  3. Make your changes.
  4. Verify code quality:
    mage fmt
    mage lint
    mage test
  5. Commit your changes (git commit -m 'Add amazing feature').
  6. Push your branch (git push origin feature/amazing-feature).
  7. Open a Pull Request.

License

This project is licensed under the MIT License; see LICENSE for details.

Acknowledgments

About

Pure Go implementation of the Media over QUIC

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 66.1%
  • TypeScript 33.4%
  • Other 0.5%