Giter VIP home page Giter VIP logo

simpsons-tv's Introduction

The Simpsons TV project

This repository supports my modifications to The Simpsons TV project originally created by Brandon Withrow and enhanced by D.J. Hatfield in his larger 3.5" screen version.

What's different in this version?

I've primarily followed the D.J. Hatfield's Instructables guide however his build is based on the "Buster" version of Raspberry Pi OS which is more difficult (not impossible though!) to find these days and impacts some of the software used in the build. For example, the video player, OMXPlayer, is not available in Bullseye. This is the script I've started using in my build.

This repository includes:

  • player.py: a modified version of D.J. Hatfield's Python script to control playback and selection of video files using VLC instead of OMXPlayer.
  • player-alt.py: an alternate version of the player script that uses a more efficient approach to respond to GPIO signals. The result is less code and a simpler programming model, at least to me.

Warning

  • There are some differences in behaviour in my versions of the scripts and D.J. Hatfield's version. This is a result of changes in using VLC and some choices I made for my build. Read on for more details.
  • I am not a Python programmer! I've made changes based on my knowledge of other programming languages, some quick reading of documentation, trial and error. The scripts work for me, but your mileage may vary.

How player.py differs from the original

  1. VLC is used for playback instead of OMXPlayer.
  2. The script will play back files with the extension .mkv as I encoded my videos using a Matroska container format. If you're using mp4 files, replace mkv with mp4 on line 106 of the script.

How player-alt.py differs from the original

  1. VLC is used for playback instead of OMXPlayer.
  2. The script will scan all directories in /home/pi/simpsonstv/videos/ and pick video files. It isn't necessary to list all the "channel" directories you want to use.
  3. The script will play back files with the extension .mkv.
  4. I've used GPIO event handlers to GPIO signals (e.g. button presses) instead of a tight loop. This uses less CPU time and, to me, is a neater approach. This has some other consequences:
    • I have not implemented the VCR two-button shutdown behaviour of the original script.
    • I have implemented but not tested the safe shutdown signal handler (GPIO 11). I didn't implement this circuit in my build. It might work! ๐Ÿ˜‰
  5. I've used a VLC media list to make it easier to navigate between videos (either automatically after finishing a video, or manually by using the right VCR button). There is a significant downside to this choice:
    • I couldn't find a way to display the current channel or video name upon playback or changing to the next video or channel. I tried using --sub-filter=marq when initialising VLC and then adding a function to set the marquee message but it didn't work for me, I would get an error lbvlc no matching alpha blending routing (chroma: YUVA DPV0). If anyone knows of a fix or an alternative, I'd love to hear about it - feel free to submit a pull request!

A note about usbmount

The usbmount package has been removed from Raspberry Pi OS "Bullseye". This package was used in D.J. Hatfield's build instructions to allow a USB device to be plugged into the Raspberry Pi to transfer video files. I'm not using this process to copy files to the Raspberry Pi as I simply transferred them over my local network.

How to use Raspberry Pi OS "Bullseye" for the The Simpsons TV

If you're following D.J. Hatfield's excellent Instructable, you can make the following changes to his instructions to install Raspberry Pi OS "Bullseye" instead of "Buster" and use VLC instead of OMXPlayer.

The step numbers refer to D.J. Hatfield's Instructable

Step 16: Set Up the Raspberry Pi: Installing the OS on the Micro SD Card

When selecting the Operating System using the Raspberry Pi Imager, select Raspberry Pi OS (Legacy, 64-bit) Lite, the "Bullseye" version.

Raspberry Pi OS Imager user interface

Install OMXPlayer

Instead of installing OMXPlayer, we'll be installing VLC. Instead of following the steps in D.J. Hatfield's guide for this step, run the following commands:

sudo apt-get install vlc
sudo apt-get install python3-pip
sudo pip install python-vlc

Then continue following the instructions in the Set Up Directory Structure section.

Set Up Directory Structure

Follow the original instructions including creating the player.py file:

sudo nano ~/simpsonstv/player.py

Instead of copying and pasting the script in the Instructable, open either player.py or player-alt.py depending on what functionality you're looking for and copy/paste the contents of one of these files into the nano text editor (paste in the nano editor by copying the text below, then selecting your terminal window, then right-clicking your mouse.)

If you're using player.py be sure to follow the original instructions to configure your "channels" by defining the contents of the Directories array.

If you're using player-alt.py you do not need to define the Directories array but you should continue with the remaining instructions to save your changes and close the nano editor.

All other instructions are the same.

simpsons-tv's People

Contributors

dariom avatar

Stargazers

gugnheim avatar  avatar

Watchers

 avatar  avatar

simpsons-tv's Issues

Questions.

I'm building the tv now following Dj's instructions. I've got all the movies (including home movies) in folders on my pc in mp4 format ready to go. I'd like to maintain the functionality of the buttons and where it tells you what you're watching as you "change the channel". I am having the world's hardest time getting the p2 to ssh. I've flashed and re flashed buster lite , I've done the config and ssh files , I've done the shift control x at imaging to add my WiFi credentials. I'm doing it headless without a screen (micro hdmi cable)... but I'm using the exact uiniker 3.5 on the instruction.

I'm assuming just using a supported os and using VLC vs OXM should make my life easier?

This is my first time using git etc so I'm not sure how to grab the right script.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.