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

Skip to content

renyayy/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

Components

moqt

The core Go package implementing the MOQ Lite protocol interactions, including:

  • Session establishment and management
  • Track publishing and subscription
  • Announcement handling
  • Stream multiplexing and routing

This implementation is specifically designed for the MOQ Lite specification, focusing on simplicity and performance for real-time media streaming applications.

moq-web

TypeScript/JavaScript implementation providing WebTransport support for browsers, including:

  • WebTransport session management
  • Stream ID calculation and tracking
  • Reader/Writer interfaces for QUIC streams
  • Integration with browser WebTransport API

interop

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

Development

Prerequisites

  • Go 1.25.0 or later
  • just command runner

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. Set up the development environment:

    just dev-setup

This command will perform the following:

  • Install the required certificate tools (mkcert).
  • Install development tools (goimports, golangci-lint).
  • Download project dependencies.
  • Generate development certificates.

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
just fmt

# Run linter
just lint

# Run tests
just test

# Perform overall quality checks (formatting and linting)
just check

Build & Clean

# Build the code
just build

# Clean up generated files
just clean

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:
    just fmt
    just lint
    just 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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 59.2%
  • Go 40.0%
  • Other 0.8%