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.8-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.8-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.8-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.8-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.8-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for media_server_client_quic-0.1.8-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5e7ee62e98432977dbf3edcb85e5e9028283096dd1536b0a065b3036c867fbf8
MD5 fe95d3081160d2d5b60c79d529e24d4e
BLAKE2b-256 5cd2fa107536a5ef4b90a008e27f3ae1a569b72fedfa5846489f6c62e711ce45

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for media_server_client_quic-0.1.8-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 a609fe40dd7f8d86d9e64be73bd5ca1aa4c5a265fa7d859eb45cffbc266d25ad
MD5 3102ddfd501c3ea45fd080ca80d8bf30
BLAKE2b-256 de3d977dbd4d0712fd83af04221583049a4ccb7f941f92d8feedc6a0a5cb6dfa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for media_server_client_quic-0.1.8-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 81385c66a45fc468da4d9e3e3646c459196251b5ea80fb2a8fdd15f3b49e6865
MD5 f0699bfacc7e7c31ee6e36a6bcd042b4
BLAKE2b-256 553c38165afb52d7b98134c5fb9816692a5b3340dfa9bf24eb8d5d319e403c6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for media_server_client_quic-0.1.8-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 5a7a33ad36e434cf74586f09be865435979d5f556ab80fb4128f712d45009f34
MD5 bc8f45431cf0a100ec0a059a484cf62b
BLAKE2b-256 02c7cc1e79d2ae657db2724d8db3e269d425c73464e96250930d1f70b87f5901

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