Raspberry Pi NAS Completed!

I had a fun time completing this project, it ended up being very involved, and I learned a lot about AI as well by using ChatGPT to help me automate some media server functions with python scripts!

Here is my NAS for media sharing, which runs on a headless Linux pi system. By using ‘openmediaserver’ and the ‘Plex’ applications for Linux, this little Pi is now hosting a broad range of my video collection to my whole family! I want to highlight a bit about how I did it.

Open Media Vault is an application that runs on headless Linux systems, and it serves as a disk storage manager and resource tracker via its web front-end. After flashing my Pi with the necessary OS, I simply updated all my repositories, installed openmediavault, and logged in. (I did run into an issue with my SSH terminal connection, and I used flushdns to fix it.)

Here is an example of the front-end. This is where I set up my USB 1TB SSD by formatting it with ext4, and I managed permissions so that I could access the drive from all my other devices. Enabling SMB & NFS services was necessary so that my main computer systems could access it.

I then installed the Plex application that allows the device to locally run a Plex streaming service. I got a little stuck while trying to port forward, however. After trying to manually configure the port forward on my router, I realized Plex was automatically trying to configure itself using UPnP. Simply enabling UPnP functionality on my router made it work.

After managing a bunch of settings, and loading up my SSD with my video collection, the pi was ready to stream! Here is the dashboard view of the Plex web interface. You can see my brother streaming a children’s show for his kids at his own house!

But I wasn’t done yet. Turns out managing a bunch of different videos for streaming requires a lot of tedious optimization! Video codecs, file transfers, and transcoding settings for all the different videos in my collection meant that some hiccups could occur. Some videos could stream really quickly, and others lagged behind. I’m a novice when it comes to scripting, but I do know how to use ChatGPT! After messing with ChatGPT for an hour or two, I finally found the correct wording for my prompt to find the perfect script. (AI is amazing!)

Here is an example of the python script that ChatGPT generated to help me converge all of my media to the correct codecs and file types for an optimal streaming experience. The AI even annotates the code for me, helping me learn what its doing in the process.

I had to install FFMpeg onto my OS and enable it as an application for PATH, which allows it to run natively within CMD. With those tools installed, the python script could perform all the various actions required to manage a bunch of different media settings. Here is an example of it successfully running.

A lot of this process required me following a couple of in-depth guides, and I couldn’t have accomplished it without them. My strategy for now is to just follow a bunch of guides to perform some of my more complicated technical goals. That is how I simulate hands-on learning at home. Thanks for reading!

Leave a Reply

Your email address will not be published. Required fields are marked *