Skip to main content
Travis test status https://badge.fury.io/py/picast.svg Documentation status https://coveralls.io/repos/github/miurahr/picast/badge.svg?branch=master

Description

picast is a simple wifi display receiver written by Python3 on Raspberry Pi. Current status is early alpha. Bug reports and contributions are welcome.

Dependency

picast depends several external utilities and some are only on Raspbian.

  • tvservice (raspbian only)

  • udhcpd (debian/ubuntu only)

  • wpa_supplicant

  • wpa_cli

  • vlc

Installation and run

Run apt install command on Raspbian(buster or later) / Raspberry Pi Zero W/WH, RaPi 3B+, RaPi 4.

$ sudo apt install net-tools python3 udhcpd python-gst-1.0 libgtk-3-dev python3-gi python3-pip gir1.2-gtk-3.0
$ sudo apt install gir1.2-gstreamer-1.0 gir1.2-gst-plugins-base-1.0
$ sudo apt install gstreamer1.0-plugins-good gstreamer1.0-gtk3 gstreamer1.0-plugins-rtp
$ sudo apt install gstreamer1.0-omx-rpi gstreamer1.0-omx-rpi-config vlc
$ sudo apt install --no-install-recommends lxde
$ python3 -m pip install picast
$ picast

Customize

When you want customize for your environment, please copy picast/settings.ini to your favorit place and edit it.

then launch picast such as follows:

$ picast --config /home/pi/settings.ini

Development

It is recommended to use virtualenv to deploy development environment. Because python3-gi module is a binding library to GTK++ libraray, so it is not easy to install using python standard pip.

It is recommended to use system’s site-packages python3-gi library.

$ sudo apt install gstreamer1.0-tools
$ git clone https://github.com/miurahr/picast.git picast
$ cd picast
$ python3 -m venv --system-site-packages venv
$ source venv/bin/activate

And then install picast as an editable development environment.

$ pip install -e .

Then you can launch in increased debug level.

$ picast --debug

Debug log

There is a debug log at /var/tmp/picast.log. It is configured in logging.ini.

IDE

It is recommended to use PyCharm professional edition, which has a remote deploy and debug feature.

Preparation

Increase GPU memory for decoding fullHD video stream. add gpu_mem=128 to /boot/config.txt

Usage

Picast search for the wireless display named “picast” on the source device you want to cast. Use “12345678” for a WPS PIN number. It is recommended to initiate the termination of the receiver on the source side. After Pi connects to the source, it has an IP address of 192.168.173.80.

These parameters are configured in settings.ini.

Autostart

Edit /home/pi/.config/lxsessions/LXDE/autostart

@xscreensaver -no-splash
@lxterminal -l -e /home/pi/picast/bin/picast

Known issues

  • Latency: Limited by the implementation of the RTP player used.

  • WiFi: The on-board WiFi chip on Pi 3/Zero W only supports 2.4GHz. Due to the overcrowded nature of the 2.4GHz spectrum and the use of unreliable rtp transmission, you may experience some video glitching/audio stuttering. It may be better with Pi 3B+/4 that support IEEE802.11ac 5GHz.

  • HDCP(content protection): Neither the key nor the hardware is available on Pi and therefore is not supported.

Release files for picast 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for picast 0.4.0
File Size Uploaded
picast-0.4.0.tar.gz 42.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for picast 0.4.0
File Interpreter ABI Platform
picast-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 76.3 kB

Release files / picast-0.4.0.tar.gz

Download URL picast-0.4.0.tar.gz
Size 42.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f8dc4375e80f31f27d3871cf82cf81c93946952e2b6fcae61b78b437e6197bb4
BLAKE2b-256 checksum
How to use checksums
5082dede5d79ecf36e62650a052eacb4ea4bdca367cda70c4c28f671ad54b96a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / picast-0.4.0-py3-none-any.whl

Download URL picast-0.4.0-py3-none-any.whl
Size 34.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a85e2318c7ea9d27bd140efb95b5897fdafaa7c2c01ac293cfa1f68de9a8117
BLAKE2b-256 checksum
How to use checksums
9d19a52878e58726c1dbb6c4015b0f3481c1b89cb209ee0a4ef2112c0a64f76c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3

2 release files

0.2.3

2 release files

0.2.1

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page