Skip to main content

A simple wireless display receiver/sink for Raspberry Pi

Project description

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.

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

Development

$ sudo apt install gstreamer1.0-tools
$ git clone https://github.com/miurahr/picast.git picast
$ cd picast
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -U pip
$ pip install -r requirements.txt
$ picast --debug

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

Debug

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

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.

Project details


Download files

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

Source Distribution

picast-0.3.2.tar.gz (40.6 kB view hashes)

Uploaded Source

Built Distribution

picast-0.3.2-py3-none-any.whl (33.1 kB view hashes)

Uploaded Python 3

Supported by

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