teamtuck, to python

I haven't talked about #projectone in a while, as things have become pretty busy for me. Feeling good about it in the current state as a v1.0. I'm pivoting from code over into the physical enclosure.

One thing to reflect on is that I honestly wish that I would have gone with a x86-64 mini PC over the Pi. The Pi is capable, but for the same cost, I could have went with a known working arch. and more "tried and true" variation of OS, #python and libraries. Bad luck with ARM leaves a bad taste

teamtuck, to RaspberryPi

Oh snap, funny story. Found out that I can switch from Wayland to X11 on the #raspberrypi and now #projectone may run slightly better than before. Who knew? ;)

#linux #python

adventure_tense, to random
@adventure_tense@mapstodon.space avatar

I’m sure I’m following the path of many others, but I couldn’t help but noodle on this project …

This is my attempt to duplicate the primary UX of AppleTV, using Linux Mint. It’s running on an old Mac Mini connected to our TV.

Installed the native Jellyfin player.

Then created each media channel as separate web apps, which LM does rather well. Then oversized the UI, added transparency to the panel, and even an on screen keyboard.

Just requires a mouse to be useable.

Very fun.

teamtuck,

@adventure_tense I'm currently using an old LG remote with #projectone and it does exactly what I want it to.

teamtuck, to RaspberryPi

Found out through trial and error that if you have a corrupted video on your external hard drive, your #raspberrypi will dismount the drive randomly, freeze up, and have a cow. Remove the videos in question and everything works just fine. My brain hurts.

#projectone #python

teamtuck, to random

Some of the YT downloads I put in rotation for #projectone has caused a longer than usual pause between "changing channels" and I'm not sure how to debug.

I did however store all web content durations in a Sqlite DB so that way I don't have to run FFProbe each time I build a schedule, so it's much faster.

Going to reboot a few more times to make sure I can add some stability. Sometimes there is a problem and the script won't run at all on startup.

teamtuck,

Disabling the "Gaming" channel gets the channel changing back to a reasonable speed, however another bug has presented itself.

Not sure why adding other videos and a single channel could cause all these issues....

#projectone #raspberrypi #python

teamtuck,

Ok, writing about my #python issues here is the magic trick to solving them. I literally just found the issue! Gaming channel re-enabled, everything including channel changing is back to normal.

#projectone

teamtuck,

Well crap, my "extra" Roku remote won't work with the FLIRC USB Receiver. I'll have to buy a cheap-ish IR remote on Amazon...

But dang, I found something else with MPV today that makes channel changing a little quicker!

I'm almost to a point of freezing any further changes, adding more error handling items, better logging for debugging, and start working on the hardware side.

I'll post on the blog soon and stop blowing up your feed now.

#projectone #python #raspberrypi

teamtuck, to python

Back to working on #projectone this week. Today, I've started adding a "gaming" channel, which contains random gaming videos. ID Software did a killer behind the scenes series on Doom Eternal, so why not have it on the go? I'm also throwing some classic game trailers, gameplay, gaming music, etc. One issue I'm going to have to deal with is cutting some 1080P content down to 720P so I can save a little on space. My 2TB drive is 92% full!

#python #raspberrypi

teamtuck, to python

Got my FLIRC USB IR Receiver in the mail today for #projectone. Download the app, program a keyboard key, done! And because I can't find our old Roku remote, I'm having to use my wife's old Samsung S4 since it has an IR blaster in it! Cracked screen and all.

Eventually I'll find my Roku remote and it will be a bit easier, but I'm getting closer to having this project get to a usable state!

#python #raspberrypi

teamtuck, to Amd

My awesome boss sent me an Amazon gift card, so I decided to get a bequiet Shadow Rock 3 CPU cooler for my #amd 5600X. I also got the FLIRC USB Receiver for my #raspberrypi ; I'll be able to program any remote and use it for #projectone !

teamtuck, to python

Ok, I finally have a SystemD service that runs my #python script cleanly on boot, finally!

The next problem is that since I'm using MPV, I'm using the 'on_key_press' methods to change media. Running this script manually works, however running it under the context of the service breaks this functionality.

What could be breaking this?

#linux #raspberrypi #python #systemd

teamtuck,

Figured it out. Doing a SystemD service means no working input, even though there are options for StandardInput but I couldn't get it working.

What did work is creating a .desktop file inside of .config/autostart to kick off my Bash script. No more setting 30+ sec delays and keyboard input works!

Onto the next one....

#projectone #python #raspberrypi

teamtuck, to python

Getting a #python script to run on boot is a lot of fun on a #raspberrypi .

teamtuck,

So running my main script on boot works through the '@reboot' method in crontab. However, I'm having to put in a long sleep to make sure that the USB external drive is ready and available. I need to put in some code in place so that I can detect it and wait that way.

#python #raspberrypi #projectone

teamtuck, to RaspberryPi

Apparently the USB3 ports on the #raspberrypi 4b don't push enough power to my external 2TB NVME drive. It wasn't mounting and it scared me for about 5-10 minutes. Put it on the USB2 port and it's back. Whew!

#projectone

teamtuck, to python

Quick improvements to #projectone :

  • PPV channels cannot play the same movie anymore. It's a slim chance but it does happen.

  • My "John Wick" channel now randomly picks a movie in the series to start the day's schedule, but still plays in order.

  • I've added in about 1.5GB of retro commercials via YouTube for the one channel that has "commercials" in between episodes/movies.

  • I still want a cartoon and music channel, but I'm running out of room on the drive.

#python #raspberrypi

teamtuck,

Also, since MPV can detect/report playback progress in percentages, I can now do a video overlay that tells you what's up next.

If it's a TV episode, it will appear at 50%, 70% and 95%. For a movie, 25%, 50%, 75%, and 95%.

#python #projectone #raspberrypi

teamtuck, to random

Downloading some commercials for #projectone , mainly for 1 channel that currently has them. Using #FFMPEG to slim commercials down to 720p in order to save some space on the 2TB external drive.

teamtuck, to RaspberryPi

Quick update on , specifically noting that is out and is in.

https://blog.teamtuck.xyz/tech/projectone-update112823/

teamtuck, to python

I threw MPV into #projectone and playback is solid. However, when running the "changing channels" function, I can only run it once; it seems like the script is getting hung somewhere and not allowing me to continue changing channels.

It's me pressing the 'q' key to look at the schedule for a MP4 filepath and just play it. Works once and stops.

I did a trace but got an overwhelming amount of info that doesn't really tell me anything.

#python #linux #raspberrypi

teamtuck,

Finally figured it out. #VLC runs on a loop, so if the loop exits, playback stops. MPV doesn't do that, but you have to make it work like that so you can "change channels" properly.

Fullscreen works like a charm and there's even a small fade in effect!

I also noticed that there is video overlay feature that you can display text on the screen with ANY font you want. Time to try that out!

#projectone #python

teamtuck, to python

After playing around with #projectone today, every movie I've thrown at python-vlc has played just fine, except that it doesn't want to do fullscreen properly, as in scale <1080P. Apparently this is a problem with many solutions but I can't find one that works. Again, manually running VLC works in fullscreen but python-vlc doesn't want to play. Maybe it's time to try out gstreamer or something...
#python #linux

teamtuck,

Tonight, I tried the other HDMI port on the #raspberrypi with no luck.

I just happened to come across someone reminding me that I haven't tried MPV. After testing it via the CLI, I found Python-MPV and WOW. Not only does switching between media work flawlessly, but fullscreen works beautifully AND there is a little fade in when switching to another media file!

I'm going to comment out all the #VLC stuff tomorrow and see how MPV does with my code.

#projectone #python

teamtuck, to python

Ok, I'm giving python-vlc one last shot. I'm re-writing it all. No QT, no SQL for schedules, just a simple create a schedule and play the stupid thing. If this doesn't work, then I'm officially moving on.

#python #projectone

teamtuck,

Ok, I have a very barebone PoC and even with just the PPV channels, everything plays back just fine. I'll work on adding the other channels tomorrow and see how it does.

#python #projectone

teamtuck, to python

So I have a theory. If I open VLC manually or play ANY video file with cvlc, that video plays with no problem, hardware accelerated. If I try to play most videos with python-vlc, I get all kinds of errors, some DRM, some X11, etc. Since I now have to have venvs for Python, I really, really think it and the system are butting heads and therefore, I get screwed with playback.

If is going to be this unstable, I'm not sure where this is going...

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • khanakhh
  • GTA5RPClips
  • osvaldo12
  • magazineikmin
  • mdbf
  • InstantRegret
  • rosin
  • Youngstown
  • slotface
  • everett
  • Durango
  • JUstTest
  • ngwrru68w68
  • modclub
  • tester
  • tacticalgear
  • cubers
  • thenastyranch
  • cisconetworking
  • ethstaker
  • Leos
  • provamag3
  • normalnudes
  • anitta
  • lostlight
  • All magazines