Skip to main content

No project description provided

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Media Server Client

A unified media streaming client library that supports both WebSocket and QUIC transport protocols.

Features

  • Stream H264-encoded video frames to media servers
  • Send audio frames alongside video
  • Choose between WebSocket and QUIC transport protocols
  • Simple, consistent API regardless of transport protocol
  • Python bindings for cross-platform compatibility
  • High-performance Rust implementation

Installation

From PyPI

pip install media-server-client

From Source

cd src/rust/modules/media-server-client
pip install maturin
maturin develop

Using the Build Script

The repository includes a build script that simplifies the build process:

# Build in development mode (default)
./build.sh

# Build in release mode
./build.sh --release

# Build and install locally
./build.sh --install

# Clean before building
./build.sh --clean

# Build in release mode, clean first, and install locally
./build.sh --release --clean --install

Usage

Python Example

from media_server_client import MediaStreamingClient

# Create a client with the desired transport (websocket or quic)
client = MediaStreamingClient(transport_type="websocket")  # or "quic"

# Connect to server
client.connect("localhost", 8080)

# Send video frames
with open("frame.h264", "rb") as f:
    frame_data = f.read()
    client.send_video_frame(
        frame_data,
        is_keyframe=True,
        width=1920,
        height=1080
    )

# Disconnect when done
client.disconnect()

See the examples/stream_example.py for a complete example that streams a video file to a media server.

Example Script

The repository includes an example script that demonstrates how to use the library to stream a video file:

# Using WebSocket transport (default)
python examples/stream_example.py --host localhost --port 8080

# Using QUIC transport
python examples/stream_example.py --host localhost --port 8080 --transport quic

# Custom video file
python examples/stream_example.py --video path/to/video.mp4

# Control streaming frame rate
python examples/stream_example.py --fps 30

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

media_server_client_quic-0.1.11-cp312-cp312-manylinux_2_34_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

media_server_client_quic-0.1.11-cp312-cp312-manylinux_2_34_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

media_server_client_quic-0.1.11-cp311-cp311-manylinux_2_34_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

media_server_client_quic-0.1.11-cp311-cp311-manylinux_2_34_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

File details

Details for the file media_server_client_quic-0.1.11-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for media_server_client_quic-0.1.11-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 50fa32c7bbf84faf0ad363ca9f320cec6f39b3878d0e94f691be603f6f5552c8
MD5 cd9ab9ffa5c693ad51f6258145fa68fc
BLAKE2b-256 fb0c78f98046558028ddb5f93bb8f99d80b10886342911f66dcea6a09a6c7893

See more details on using hashes here.

File details

Details for the file media_server_client_quic-0.1.11-cp312-cp312-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for media_server_client_quic-0.1.11-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 a590bca4adee0820126b5ef521d20bb805559296f78d0ab94ff427820d073692
MD5 3764fef6953e784e12a702851330beff
BLAKE2b-256 6009e5101779911279a0bf43392a968c91cecc8228a5b4002146f1d56a957f43

See more details on using hashes here.

File details

Details for the file media_server_client_quic-0.1.11-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for media_server_client_quic-0.1.11-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9763c35b2808c722d611a0bd5b089c9e40d65fbb8e70d0f6e0ff2351460e437f
MD5 91bc9e50e000e8d9c429f74873d2dd8e
BLAKE2b-256 4e8c3f0f833b5687f3f07ced2e3e20c24cd2f0e1b7e0ee1084f52a09697c712e

See more details on using hashes here.

File details

Details for the file media_server_client_quic-0.1.11-cp311-cp311-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for media_server_client_quic-0.1.11-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 9b81933128621acf5ad136d5d63f8986e986f9ed022f95a2e321c8b035551135
MD5 0d4d0b2a46d34efe85267c6a5951bc20
BLAKE2b-256 d64cd47a716ce29f1b3fc0632aea17be7aefc13943b346939816a01233c8fb91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page