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

File metadata

File hashes

Hashes for media_server_client_quic-0.1.9-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 509e3c2036259d9f39bb8de17a773b5aca4109f3d045851595bc7eab5af55db9
MD5 048aca013ed8bc7e36f58d221d81560c
BLAKE2b-256 f5aa70e51da2110e54142ff24997b88ba2d84459ac2620c904debf8781a85a7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for media_server_client_quic-0.1.9-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 3d97e4f98d2f152d50f3581ae45e79ae61a47e59b633ad7191c57d6a59d8e1b9
MD5 59fd57343fbc19dfaec38dc0dbdf79ec
BLAKE2b-256 289c6e331b42d6ba6de8c904af924da4803c13b7da214013a9f634373b2b59dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for media_server_client_quic-0.1.9-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bf4ccac782346681458f3c09ff2245acacf3e070774d2a902609c7fdec267bd0
MD5 17f511df62a8cde39d4de07102eaf24d
BLAKE2b-256 03167226f5717d4c1dc0e1fdb5d6c019c0b916122b1483aaec95ee284c0e4a59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for media_server_client_quic-0.1.9-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 3950eac734976de1796a9acfeb8b1f15f3ee160db6e26c04873ee7d928642e87
MD5 437e1c76771d9ea2fcfa3e1c6d7e76af
BLAKE2b-256 9da0a6d5870a19eeda6c2d398447d15c5fafd7e5919699fe012b461af5719118

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