Metadata-Version: 2.1
Name: picast
Version: 0.2
Summary: A simple wireless display receiver/sink for Raspberry Pi
Home-page: http://github.com/miurahr/picast
Author: Hioshi Miura
Author-email: miurahr@linux.com
License: GPL3
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: X11 Applications
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Topic :: Utilities
Requires: PyGObject
Requires: pyyaml
Requires: zeroconf

A Simple Wireless Display Receiver on Raspberry Pi
==================================================

.. image:: https://travis-ci.org/miurahr/picast.svg?branch=master
    :target: https://travis-ci.org/miurahr/picast
    :alt: Travis test status

.. image:: https://readthedocs.org/projects/picast/badge/?version=latest
    :target: https://picast.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation status

.. image:: https://coveralls.io/repos/github/miurahr/picast/badge.svg?branch=master
    :target: https://coveralls.io/github/miurahr/picast?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
------------

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

.. code-block:: console

    $ 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

For debug and development;

.. code-block:: console

    $ sudo apt install gstreamer1.0-tools

.. code-block:: console

    $ git clone https://github.com/miurahr/picast.git picast


Run
---

.. code-block:: console

    $ cd picast
    $ bin/picast


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

.. code-block:: bash

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

* Resolution: picast advertised some fixed resolutions rather than connected display resolution.

* Latency: Limited by the implementation of the rtp player, omxplayer, 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.

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


License and copyright
---------------------

* Copyright 2019 Hiroshi Miura
* Copyright 2018 Hsun-Wei Cho

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.


