a raspberry pi mini tv with youtube channels that will turn on only when you're standing in front of it.
The application uses streamlink to extract live channel stream. and uses youtube-dl to download playlist files using preconfigured cron jobs then merge them using (ffmpeg)[http://ffmpeg.org/] and uses omxplayer to play both.
Use pipenv to build the Environment and run the application:
pipenv install /project/path
pipenv run python -m tj_frame
Use walli.service with debian systemctl to autorun the script everytime the device restarts:
sudo systemctl daemon-reload
sudo systemctl enable walli.service
Note: Add an outage.mp4 file to working directory to play as an outage footage when one of the channels is not available (currently not configurable).
-
global configuration:
contains for each channel:
- target playlist / livestream
- player configuration file used
- for playlist: filename used to merge downloaded files.
-
extractotr configuration
contains configuration for python wrappers of both streamlink and youtube_dl, and the cron used by scheduler to schedule playlist downloads.
-
player configuration:
contains omxplayer configuratiton (read more about it here)
- sensor will wake up the player when anybody is standing closer than threshold (configurable through global configuration)
- response time is decided by the delay field in global configuration as well (slow response might be preferable sometimes to avoid frame waking up and sleeping too often)
- button press will either be: short will toggle the channel long will enable/disable the sensor (and keep player at current state.)
Licensed under GNU General Public License v3.0