Giter Club home page Giter Club logo

funny-puppies-yt-player-script's Introduction

What and why?

I had an old HP 5:4 monitor and a Jetson Nano 2Gb which were not used for anything. So I decided to turn them into permanent "funny puppies" TV in my living room.

Unfortunately Jetson comes with a really old Ubuntu image from Nvidia, so I wasn't able to run modern yt-dlp and mpv in it. I had to pack everything inside Docker.

This is the result.

Status

In practice I bumped into errors about DRI and DRM devices not available to mpv from inside Docker, and inability to access X11 display from within the container.

Even after solving most of the issues, I got mpv running and displaying a window buffer, but no video got drawn (instead GUI just stuck while mpv was running in the container).

I decided to call it quits and ended up running screenhappy.io on Chromium instead of puppies videos.

Learnings

I did learn a couple of new things though:

  • Unofficial YT API: api_url="https://yt.lemnoslife.com/search?part=snippet&maxResults=25&q=funny+puppies&type=video"
  • How to set up python venv inside Docker container (see Dockerfile)

Use

Build the Docker Container

Run the following command in the directory containing your Dockerfile and script:

docker build -t yt-video-player .

Run the Docker Container

Running the container can be tricky due to the need for X11 display for mpv. If you're running on a Linux host and want to try displaying the GUI, you can pass the X11 display socket and environment variable like this:

./run.sh

funny-puppies-yt-player-script's People

Contributors

wiegerwolf avatar

Watchers

 avatar

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.