Category: Technology

Posts that are tech related

  • Automating video uploads

    Automating video uploads

    In my never-ending efforts to simplify/automate the process for my Church’s A/V behind its Live streams and slideshows. I have struggled with uploading to the various video hosting platforms for its sermons.

    SermonAudio’s primary purpose is to host Sermons. However, as of 2019, they have added the streaming features we use to stream and re-distribute live streams to other platforms, like YouTube and Facebook. They also support trimming from the live stream and creating a new sermon upload with timestamps.

    One of the only downsides to this service is the processing time on SermonAudio’s side and the upload itself from the laptop.

    One way around this, I found recently, is FTP. FTP or File Transfer Protocol is an older standard of uploading files from one client computer to a host server. SermonAudio supports this method as a way of uploading, primarily due to its value in mass uploading sermons.

    For example, if you are a newly added church to sermon audio and want to upload your whole archive. You can do so by uploading to your private server hosted on SermonAudio’s side. SermonAudio then (if it deems enough information has been provided with the file’s metadata) will create a new sermon “entry,” which will automatically fill in with the data you’ve provided, like Preacher, Date, and bible references for each sermon.

    SermonAudio gets the corresponding sermon info by reviewing the file’s title and ID3 tags1. ID3 tags are also an “aging” technology primarily developed for the age of the iPods with mp3s and tagging information such as artists and albums to music that the iPod would read and display.

    After doing a ton of searching for programs that both could upload to an FTP server and a program that could tag MP4s with the correct ID3 tags needed for SermonAudio.

    I ended up choosing WinSCP and Kid3, both being excellent as they both support scripting and have reasonably extensive documentation. WinSCP acts as the file uploader, and Kid3 as the ID3 tagging. They are the perfect candidates for my use case.

    Next, I wrote a batch script to create an interface combining tagging and uploading into a (hopefully) straightforward interface.

    Having zero experience in the Windows CMD. I used a classic ChatGPT Claude and Stackoverflow pairing to figure out how the syntax works and to execute scripts through WinSCP and Kid3 using the CLI.

    After writing a barebones script, it grabbed the latest file and used a basic selection menu using the num keys in a folder to fill in the rest of the relevant info like the Sermon title and Preacher selection.

    Then, I fed my scrappy script through Claude to fix my syntax problems and variable declaring issues. And ended up with a surprisingly functional interactive uploader. We only need a sermon title and Preacher for it to upload, and a couple of hours later, SermonAudio will have the sermon entirely created.

    Demo of my script

    A few features I’d like to add down the road before sharing are a configuration pre-setup to fill in a church’s specific private FTP server and possibly switching to another method of script, either a simple React app or another interface that can better handle the scripting I want to do. With that, I want to add integration into SermonAudio’s API that will call the list of preachers and add it to the list.

    Also, the script works to grab the newest modified file in a set folder. I’d rather have it compare the current date of the script, prompt the user for confirmation, and change the file to ensure that the wrong recordings are not accidentally uploaded.

    1. What is ID3 tagging? [PodBean] ↩︎

  • Reusing a Desktop as a Home Console

    Reusing a Desktop as a Home Console

    With my move away from my older budget desktop build to my more recent Macbook Pro. I installed a fresh copy of Linux to keep it alive and spun up some local servers for the house; a couple of the servers I spun up are Home Assistant, and combined with some smart outlets, I could set up automation to control the outdoor lights.

    Another server I host on my “new” Linux desktop is Plex, which hosts a local private “Netflix” you upload to create a personal library of movies, shows, and audiobooks. This was especially useful when I had dozens of DVDs that I could rip and upload to the MP4. Which I was able to automate using a cool tool called ARM (Automatic Ripping Machine)

    Gaming on Linux

    However, one utilization that I wanted to attempt was gaming. Notoriously, Linux does not support gaming, but with the Steam Deck being released a couple of years ago (essentially a Linux Nintendo Switch). Steam has forced many developers to port over to or allow virtualization on Linux.

    One way on top of the games that natively support Linux is Proton. Proton is a “translation” layer that works with many games to patch the gap between Windows games and Linux. While not perfect, it is surprisingly well-compatible with most games. There’s a site called ProtonDB that checks specific games with community feedback and its ranking of how well they play on Linux, using Proton’s translation.”

    With Proton, I could play almost every game I own on Steam flawlessly, even though the game’s developers may not have explicitly outlined Linux support.

    Splitscreen gaming

    A big part of setting up this computer is its location. I placed it next to the living room TV console in hopes of somehow replacing the aging Xbox 360. But to fully replace the Xbox’s function, I need split-screen support with more than one player at once.

    Already getting further than I thought I would, with most of my game library working flawlessly, is a lot, especially for Linux, which I’m not the most familiar with when it comes to “fixing” problems. But after some googling, I found a couple of options for the games I had.

    Game 1 – Stardew Valley

    One game that works out of the box is Stardew Valley, combined with a controller from 8BitDo and one from the Xbox 360 using an adapter. I could host a game and have both controllers work separately efficiently with the screen split side by side.

    Game 2 – Halo

    Halo Reach was by far the biggest game for our Xbox 360, making it a great game to try to replace the Xbox with. I got the Master Chief Collection, which includes all Halo Games released besides the latest (free) Halo Infinite.

    One problem, however, with the Halo series on PC is the lack of multiplayer. Or instead, local multiplayer or split screen. I looked at several options and tried some Linux apps that enabled split screen, which was, in the end, not fruitful. I found an open-source mod on GitHub that installs fairly simply by dropping files next to the Halo game’s executable. This plugin enables an added menu to which you can open and add up to 8 players. Surprisingly, it performs smoothly out of the box, with each controller assigned to its respective players.

    Game 3 – Minecraft

    I’m working through getting Minecraft running split-screen, which will be slightly tricky as there isn’t (to my knowledge) a way to get around having to run multiple instances of Minecraft. In contrast to the other games, it didn’t have to run the whole game for each person playing; instead, it was able to integrate additional tools to emulate another player to get around that.

    Another way of making Minecraft more open for multiple other players at once is running a docker container that hosts a standard Minecraft server with the addition of “Geyser,” which, before I get into how that works, I need to explain a bit of the difference between Java Edition Minecraft and Bedrock.

    Bedrock vs Java

    Essentially, Minecraft has two flavors with completely different backends. The way Mojang (Minecraft’s owner) originally had it split is that all consoles and mobile devices run Bedrock edition, while Java Edition was first developed for Windows or Mac. It has changed since Minecraft’s early development but has continued mainly with that model, except for Bedrock on PC.

    With the significant backend difference, there’s always been a barrier between Java and Bedrock players. There’s no easy way to connect to a Java server from Bedrock Minecraft and vice versa.

    Bedrock + Java?

    That’s where Geyser comes in, which, to my knowledge of how it functions, translates every “request” from the bedrock player to the Java Server in real time to allow connection between both players.

    With an easy setup Docker image and Portainer, I was able to get the Java server running, to connect to it all I have to do is connect to the local IP 192.168.1.104:25565, and on the phone or console, I connect to the same IP but with the Bedrock Server port 192.168.1.104:19132.

    I was not able to fully get this to work on bedrock, but there’s some troubleshooting I still need to figure out that may fix my problems. Overall a cool server plugin that I didn’t think would be possible, and shows how far the Minecraft community has come over the years. You can find the docker image here.

  • Creating Documentation for Projects

    Creating Documentation for Projects

    With taking on more projects that involve more than just myself, I’ve been working on writing documentation to share the knowledge around a project and store information with relevant tips to the project I’m working on.

    While searching for a somewhat easy-to-configure, preferably free solution to documentation hosting, I came across Read the Docs. Read the Docs is a helpful 1free hosting service that works with Github’s version control to create expansive documentation for projects.

    To get started, you create a copy of their template on GitHub. Then, I used VSCode to clone the repo I just created from the template. Then, on the Read-the-Docs site, you add the repo to start the site building and set it! Read the Docs’ pages, which are written entirely in reStructuredText and similar to Markdown’s formatting. Coming from no experience, I found it relatively easy to learn, referencing the examples and documentation.

    A cool feature is using the branching in Github to create versions of documentation and being able to use Githubs strong suit of version control to make sure if I make mistakes or edits I don’t like, I can quickly narrow down where its source is with the notes I added to each version change in Github.

    1. The free tier is only available for community projects and is Ad-supported. Read more ↩︎

  • Learning through Self Implementation of Features

    I recently covered FreeShow, a software made for presentations in Churches. One of the features that I liked and talked about was the open-source nature of the App. In this case, open-source means having the app’s code publicly available on GitHub, with any changes made, issues, or additions to its Codebase available to read / post.

    Blog post covering FreeShow

    I noticed while poking around the GitHub page for FreeShow, is a large percentage of the code’s language is written in TypeScript.5

    Typescript is similar to Javascript in that it adds to the existing framework of JS with additional checks like types, which ensures the data of a variable is the correct “type” it’s been told it is, making it easier to catch errors. I’ve been learning Javascript through Coursera’s Front-end Web Development course, and even though not explicitly teaching TypeScript, Typescript contains everything Javascript has, just with additional features, making it a more straightforward matter of learning those additional features rather than a whole new language.

    With the knowledge of FreeShow’s codebase being primarily of a language I could understand, I decided to fork the repository (forking creates a copy of the repository, which is separated from the main code). I started looking through the code to see how it’s constructed and if I could implement my features into the app, that would be useful.

    I also later found this page, which contains all the info they give to devs willing to contribute, like where they need help with apps and how their code is typically structured.

    I started with one implementation I would find helpful: a way for the application to track when a song gets “used” and then, with that information, have it pull from the oldest used songs from the current date. The primary use case for this feature would be picking songs for Sunday’s service. The current way we do it with Google Slides is to attach an ID to each slideshow, and as the year goes by, eventually, it adds up to #100. In which case, we start over with Sunday #001’s songs. Making it impossible to select a song we sang last week.

    Luckily, FreeShow already has a similar variable implemented to track when a song has been last used, called “used.” With that, I made a simple helper script that attaches to the existing “used” variable, “Chronicle.” Chronicle compares the used date with a reference date like Jan 01, 2024, and returns the day value of that comparison.

    In reality, this is a super simple script and hardly took any time, mostly being “inspired” by this post by Javatpoint. The more interesting part of adding a simple feature like this is digging through a full app’s code and figuring out what function is used for what. For example, finding where the “used” cache was getting updated was initially difficult. Still, eventually, I found it in a function called “update” because of a message that gets logged when opening a “show” item, and that message linked to the start of the trial to find the “used” cache update line.