
Unraid, the perfect NAS, Streaming Server & Netflix-like service for your home & office
In this article, we will explore a little bit about Unraid, what it is, how it works, and how you can use it to create your own Netflix like service, NAS or file system for your home or office.
If you arrived here you probably enjoy having a home server, a NAS, or a homelab. You might have heard about Unraid, and you are curious about what it is, how it works, and how you can use it to create your own Netflix like service, NAS or file system for your home or office.
ContentsSection titled Contents
- 1 - Why Unraid?
- 2 - Hardware Requirements
- 3 - The Basic Setup
- 4 - Docker & Containers
- 5 - External Access
- 6 - Media Server - Plex, Jellyfin & Emby
- 6.1.1 - Plex
- 6.2 - Radarr, Sonarr, Bazarr & Arrs
- 6.3 - What can you do with Radarr, Sonarr, Bazarr & Arrs?
- 6.4 - Downloading - Usenet & Torrents
- 6.5 - Usenet vs Torrents in 2024
- 6.6 - Localized Content & Subtitles
- 6.7 - Transcoding, Saving Disk Space & Streaming
- 6.10 - Going deeper on the Media Server
- 7 - Saving Energy
- 8 - Backups & Raid & Parity
- 9 - What you can do more with your NAS & Unraid?
- 10 - Conclusion
- 11 - My Hardware & Setup
- 11 - References & Links
1 - Why Unraid?Section titled 1 - Why Unraid?
While unraid is a pure OS and does not opinate about Hardware, you might have heard of Synology, QNAP, or FreeNAS, and while they are great, they are not as flexible as Unraid, and they are often more expensive & hardware locked, slow hardware etc. So if you are looking for a more flexible, faster, and cheaper solution, Unraid is the way to go in my opinion! Here a some advantages of Unraid:
- Flexibility: Unraid is a very flexible OS, you can run it on almost any hardware, and you can expand it as you need it.
- Performance: Unraid is very fast, and you can use it to create a very fast NAS, or a very fast streaming server.
- Cost: Unraid is very cheap, you can get a license for as low as $60, and you can use it on almost any hardware.
- Community: Unraid has a very active community, and you can find a lot of help and support online.
- Systemless: Unraid is systemless, which means it does not touch your drives, so you can use them in any other system if you need to & run it via a USB dongle
- Plugins: Unraid has a lot of plugins, so you can expand it as you need it.
- Docker: Unraid has built-in Docker support, so you can run almost any containerized application on it.
2 - Hardware RequirementsSection titled 2 - Hardware Requirements
Unraid is based on Linux, so you can run it on almost any hardware, but here are some hardware requirements that you should consider:
- CPU: A 64-bit capable processor, that runs 1 GHz or higher.
- RAM: Unraid is not very RAM intensive, so you can run it on almost any RAM, but I recommend at least 4GB of RAM.
- Storage: Unraid is very flexible when it comes to storage, you can use almost any storage device, but I recommend at least 1TB HDD of storage if you are planning on Streaming.
- SSD: Unraid can use SSDs as cache drives, so I recommend at least 1 SSD for caching & scratch disk
- Network: If you are planning on streaming, I recommend at least a 1Gbps network connection.
- Graphics: Unraid does not require a graphics card, but if you are planning on using it as a media server & transcoding, I recommend at least a 4K capable graphics card.
3 - The Basic SetupSection titled 3 - The Basic Setup
After installing & setting up the OS, you can go forward and set up your shares, users, and permissions. Here are a few things I have configured, I’ll not go in-depth, but you can find a lot of tutorials online:
- Shares: I have created a few shares, one for Movies, one for TV Shows, one for Music, and one for Photos.
- Users: I have created a few users, one for me, one for my wife, and one for my kids.
- Permissions: I have set up permissions for each share, so only the users that I want can access them.
- Plugins - Install the essential plugins like
Compose.Manager
,NerdTools
,GPU Stats
,Nvidia Driver
,Unassigned Devices
,User Scripts
._createMdxContent - Common Settings - Enable NFS if you are using MAC, Configure UPS, Energy Consumption, Notifications, Docker, VMs, etc.
- Unraid Connect - Really handy to manage your server remotely, get notifications, etc.
4 - Docker & ContainersSection titled 4 - Docker & Containers
One of the greatest things of a docker-centric OS is the ability to run almost any containerized application on it and be able to wipe it out without affecting the host OS. One thing that I really love is to be able to destroy & create the whole setup without actually losing anything.
Here is some of the docker setup I have:
- Ensure all apps configurations are stored in a folder that is backed up daily. Example:
/mnt/disk3/docker_data
. - Ensure that you setup a sweet size for the docker.img file, I have mine at 100GB.
- Ensure the docker.img file is stored in a fast SSD.
- Avoid using Portainer, while its a great tool, Unraid provides a nice UI, i have tried to use both, but ended up using only the Unraid UI after some time.
- Group your services by responsibility, example I have all my Media server setup in a docker-compose file, all my dev tools in another, etc.
- Organize your ports correctly, avoid using the same port for multiple services, use a reverse proxy if needed.
- Try to keep your networks organized, so containers can talk to each other, and you can easily manage them and use internal DNS.
5 - External AccessSection titled 5 - External Access
Now that we have our server setup, we might want to access it from outside our network and leave it at home without any actual monitor connected, just like a server. You can always access your server via the Unraid Connect but it’s just to manage your server, it’s not an actual way to access your services.
Please also ensure that your internet provider allows you to host services, some providers block ports, and you might need to use a VPN or a VPS to access your services.
Grab your public IP, and ensure you have a static IP, or a dynamic DNS setup, so you can access your services via a domain name.
5.1 - Domain & CloudflareSection titled 5.1 - Domain & Cloudflare
Here I recommend buying a fancy domain so you can easily remember, and use it to access your services from your phone, tablet, etc. I use Cloudflare to manage my DNS & Domains. The reason why Cloudflare is amazing:
- Free: You can use it for free, and you can add as many domains as you want.
- Security: Cloudflare provides a lot of security features, like DDoS protection, WAF, etc.
- Speed: Cloudflare has a lot of data centers around the world, so your services will be faster.
- API: Cloudflare has a very powerful API, so you can automate almost everything.
- Update IP Update - With their API you can create new subdomains, and update your IP address automatically.
That being, just buy a domain, point it to your Cloudflare, and point the domain to your public IP.
( Here i assume you already know how to setup a domain, and point it to your public IP, if you don’t, please let me know, and i can write a tutorial about it )
5.2 - Reverse ProxySection titled 5.2 - Reverse Proxy
Now that you have your domain pointing to your public IP, you might want to access your services via a subdomain, and not via a port.
This is where a reverse proxy like *NGINX comes in handy!
For this we gonna use a docker container called Nginx Proxy Manager that will help us to manage our subdomains, ports, generate SSL certificates, etc.
Here is a sample YAML file to get you started:
version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '3245:80'
- '3246:81'
- '3247:443'
volumes:
- /mnt/disk3/docker_data/nginx_manager/data:/data
- /mnt/disk3/docker_data/nginx_manager/letsencrypt:/etc/letsencrypt
networks:
- media_server_default
networks:
media_server_default:
external: true
whisper_default:
external: true
After the container is up, you should be able to access the UI via 192.168.1.2:3246
, and you can start adding your services, and subdomains.
But that’s not all! This would only work locally! You need to setup a port forwarding on your router, and point the ports 80
and 443
to your server.
Visit your router for IPV4 Port Forwarding, and add the following rules ( You need to know your NAS IP and add it based on your nas IP ):
80
->3245
443
->3247
After that, you should be able to access your services via your domain, and not via a port!
But wait what happened here? This a bit confusing, so lets put it in a simple way:
- Your domain points to Cloudflare.
- Cloudflare points to your Public IP of your home ( Serves as mask/protection)
- Browser will try to access your domain, and will hit your Router at port 80 or 443.
- Router will forward the request to your Unraid Server at port 3245 or 3247.
- Nginx Proxy Manager will receive the request, and will forward it to the correct service based on the subdomain.
Now you can access your services via a subdomain, and adding new services on nginx proxy manager is very easy. There you will need to insert your subdomain and point to your local docker container domain.
Here is a small example showing that we map bazar.domain.com
to our local docker container called bazar
:
Note that docker container names are case-sensitive, so ensure you are using the correct name.
Now you can repeat the process for all your services, and you can access them via a subdomain, and not via a port. One big plus of using Cloudflare & Reverse proxy is that you can gate your services behind a firewall or password.
6 - Media Server - Plex, Jellyfin & EmbySection titled 6 - Media Server - Plex, Jellyfin & Emby
Now that we have our server setup we can install a media server, so we can stream movies, tv shows, music, etc. Here you can bring your own media and place it on your NAS, or you can download it from the internet, but please ensure you have the rights to download and stream the content that you are downloading.
👇 **Docker Compose for Media Server ** 👇
version: "2.1"
services:
transmission:
image: lscr.io/linuxserver/transmission:latest
container_name: transmission
environment:
- PUID=99
- PGID=100
- UMASK=000
- TZ=Europe/London
volumes:
- /mnt/disk3/docker_data/transmission/data:/config
- /mnt/disk1/library/shows:/shows
- /mnt/disk2/library/movies:/movies
- /mnt/disk1/library/documentaries:/documentaries
- /mnt/disk3/downloads:/downloads
ports:
- 9091:9091
- 51413:51413
- 51413:51413/udp
restart: unless-stopped
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
environment:
- PUID=99
- PGID=100
- UMASK=000
- TZ=Europe/London
volumes:
- /mnt/disk3/docker_data/sonarr/data:/config
- /mnt/disk1/library/shows:/shows
- /mnt/disk2/library/movies:/movies
- /mnt/disk1/library/documentaries:/documentaries
- /mnt/disk3/downloads:/downloads
- /mnt/disk3/downloads:/config/downloads
ports:
- 8989:8989
restart: unless-stopped
radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: radarr
environment:
- PUID=99
- PGID=100
- UMASK=000
- TZ=Europe/London
volumes:
- /mnt/disk3/docker_data/radarrr/data:/config
- /mnt/disk1/library/shows:/shows
- /mnt/disk2/library/movies:/movies
- /mnt/disk1/library/documentaries:/documentaries
- /mnt/disk3/downloads:/downloads
- /mnt/disk3/downloads:/config/downloads
ports:
- 7878:7878
restart: unless-stopped
bazarr:
image: lscr.io/linuxserver/bazarr:latest
container_name: bazarr
environment:
- PUID=99
- PGID=100
- UMASK=000
- TZ=Europe/London
volumes:
- /mnt/disk3/docker_data/bazarr/data:/config
- /mnt/disk1/library/shows:/shows
- /mnt/disk2/library/movies:/movies
- /mnt/disk1/library/documentaries:/documentaries
ports:
- 6767:6767
restart: unless-stopped
prowlarr:
image: lscr.io/linuxserver/prowlarr:latest
container_name: prowlarr
environment:
- PUID=99
- PGID=100
- UMASK=000
- TZ=Europe/London
volumes:
- /mnt/disk3/docker_data/prowlarr/data:/config
- /mnt/disk1/library/shows:/shows
- /mnt/disk2/library/movies:/movies
- /mnt/disk1/library/documentaries:/documentaries
- /mnt/disk3/downloads:/downloads
ports:
- 9696:9696
restart: unless-stopped
sabnzbd:
image: lscr.io/linuxserver/sabnzbd:latest
container_name: sabnzbd
environment:
- PUID=99
- PGID=100
- UMASK=000
- TZ=Europe/London
volumes:
- /mnt/disk3/docker_data/sabnzbd/data:/config
- /mnt/disk3/downloads:/config/downloads
- /mnt/disk3/downloads:/downloads
ports:
- 8329:8080
restart: unless-stopped
nzbget:
image: lscr.io/linuxserver/nzbget:latest
container_name: nzbget
environment:
- PUID=99
- PGID=100
- UMASK=000
- TZ=Europe/London
volumes:
- /mnt/disk3/docker_data/nzbget/data:/config
- /mnt/disk1/library/shows:/shows
- /mnt/disk2/library/movies:/movies
- /mnt/disk1/library/documentaries:/documentaries
- /mnt/disk3/downloads:/downloads
ports:
- 6789:6789
restart: unless-stopped
overseerr:
image: sctx/overseerr:latest
container_name: overseerr
environment:
- LOG_LEVEL=debug
- TZ=Europe/London
- PORT=5055
- PUID=99
- PGID=100
- UMASK=000
ports:
- 5055:5055
volumes:
- /mnt/disk3/docker_data/overseerr/data:/app/config
- /mnt/disk1/library/shows:/shows
- /mnt/disk2/library/movies:/movies
- /mnt/disk1/library/documentaries:/documentaries
- /mnt/disk3/downloads:/downloads
restart: unless-stopped
tautulli:
image: lscr.io/linuxserver/tautulli:latest
container_name: tautulli
environment:
- PUID=99
- PGID=100
- MASK=000
- TZ=Europe/London
volumes:
- /mnt/disk3/docker_data/tautulli/data:/config
ports:
- 8181:8181
restart: unless-stopped
organizr:
container_name: organizr
hostname: organizr
image: organizr/organizr:latest
ports:
- 8333:80
volumes:
- /mnt/disk3/docker_data/organizrr/data:/config
environment:
- PUID=99
- PGID=100
- TZ=Europe/London
restart: unless-stopped
maintainerr:
image: jorenn92/maintainerr:latest
container_name: maintainerr
volumes:
- /mnt/disk3/docker_data/maintainerr/data:/opt/data
environment:
- PUID=99
- PGID=100
- TZ=Europe/London
ports:
- 8154:80
restart: unless-stopped
wizarr:
image: ghcr.io/wizarrrr/wizarr:latest
container_name: wizarr
ports:
- 5690:5690
volumes:
- /mnt/disk3/docker_data/wizarr/database:/data/database
6.1.1 - PlexSection titled 6.1.1 - Plex
For me this is one of the best media servers out there, it has a lot of features, and it works very well with almost any device. Here ill cover what I like and don’t like about plex (exclusively ):
Pros:
- Easy to setup, and easy to use.
- Nice UI & Updates
- If you want to bring your friends to your server, almost every TV already ships with a Plex app so this a really nice point for plex.
- Integrates with other services like Netflix, Amazon Prime, etc for a unified library
Cons:
- Plugins system is mostly dead from what i know, so all features & updates will come from Plex team itself
- You dont really own your server, this means that because your behind Plex gate, they are free to cancel your account anytime.
- Some features are behind a Paywall, using Plex Pass, like Live TV, etc.
- Mobile App is paid for users who want to see movies or series, so if you want to share your server with your friends, they will have to pay for the app.
6.1.2 - JellyfinSection titled 6.1.2 - Jellyfin
Jellyfin is a free software, and it has a lot of features, and it works very well with almost any device. I havent explored Jellyfin that much, but here is what i like and dont like about it:
Pros:
- Free & Open Source ( for real )
- Nice UI & Updates
- You own your server, and you can do whatever you want with it.
- Integrates with other services like Netflix, Amazon Prime, etc for a unified library
Cons:
- Still very nerdy in my opinion
- You will have to download the app on your TV, Phone, etc, and not all devices have a Jellyfin app.
6.1.3 - EmbySection titled 6.1.3 - Emby
Emby is also a nice media server, and also one of the most used media servers, while at some point it was open-source it has now a paid version, and a free version. So like Plex, you will have to pay for some features.
While i believe Emby is more “free” than Plex, not being open-source kindly makes it lose some points, i wish they had still open-source and some early release for paid users.
Pros:
- Some nice plugins & features
- More “advanced” than Plex in some configurations
- Moblile App is free
- You can host it on your own server & own your data
Cons:
- Not open-source
- The user-facing UI is not that great, too simple & not that modern ( material design kinda of thing )
- Still paid for some features
6.1.4 - So whats the best Media Server in 2024?Section titled 6.1.4 - So whats the best Media Server in 2024?
If you want to share your server at your own home and a few friends i would def recommend plex, at the end of the day, its the most user-friendly, and it has a lot of features Most of the people will actually watch movies on a TV and they wont bother much about watching on Mobile. You can also get a good deal for one-time Plex Pass that is a no brainer.
6.2 - Radarr, Sonarr, Bazarr & ArrsSection titled 6.2 - Radarr, Sonarr, Bazarr & Arrs
At this point we have a server ready, a media server ready and we can stream our own movies, tv shows, music, etc.
In this part we will explore how to automate the process of downloading movies, tv shows, music, and etc with a few handy docker images provided by the community.
You may ask yourself, why there is so much softwares and why people dont focus on one software/image?
The answer is simple, its because each software has its own purpose, and they are very good at what they do, and they are very flexible, so you can use them in almost any setup. Like downloading series actually works slightly different than downloading movies, and music, so you will need a different software for each task.
This also gives the ability of each one to move at their own pace, and not be tied to a single software that might not be updated, or might not have the features you need.
Please keep in mind that this tutorial will not cover on how to download movies, tv shows, music, etc. Please ensure you have the rights to download and stream the content that you are downloading. Subject to any applicable laws, you are responsible for your own actions.
6.3 - What can you do with Radarr, Sonarr, Bazarr & Arrs?Section titled 6.3 - What can you do with Radarr, Sonarr, Bazarr & Arrs?
Well, the ARR softwares can manage your media libraries and download new content automatically for you, then they will “feed” Plex with your new content as its downloaded.
Here are some high level features:
- Search: Search for content on your favorite indexers ( usenet, torrents, etc more on this bellow).
- Download: Download the content to your server using ( usenet, torrents, etc more on this bellow).
- Rename: Powerfull renaming system, so your content is organized in a nice way with the correct metadata
- Quality: Download the content in the quality you want, like 4K, 1080p, 720p, etc.
- Track: Track the content that you have downloaded, and the content that you want to download & schedule
Here is a simple way of how it works:
- Radarr for movies
- Sonarr for TV Shows
- Prowlarr for Indexers
- Bazarr for Subtitles
- Tdarr for transcoding
6.4 - Downloading - Usenet & TorrentsSection titled 6.4 - Downloading - Usenet & Torrents
While this a bit controversial, i will cover a bit about Usenet & Torrents, and how you can use them to download your content. You can have a better read on Reddit & Subreddits about this, but here is a high-level overview:
- Usenet: Usenet is a distributed network, and it has been around since the 80s, and it is very fast, and very secure, and it is very hard to track.
- Torrents: Torrents are a peer-to-peer network, and it is very fast and very secure, but it is very easy to track, and it is very easy to get caught.
- Indexers: Indexers are websites that index Usenet & Torrents, and they provide a search engine for Usenet & Torrents.
As we mentioned above the “ARR” Software can automate the downloading process for you, and they can download the content from Usenet & Torrents. For usenet you will need a provider and a indexer, and for torrents you will need a tracker, and a VPN (recommended).
6.5 - Usenet vs Torrents in 2024Section titled 6.5 - Usenet vs Torrents in 2024
While i loved torrents in the past, and I still use them for some stuff, i have moved to Usenet for my main content, the reason is simple: Most of the nicest torrents are being actively taken down, and if you want a good provider, you will have to beg for invites, seed the actual content that you download to get a good ratio and so on, I’ll be honest that in 2024 i dont have any more time for this, i dont want to be tied to a tracker, or a provider.
So i rather pay for a good Usenet provider, and a good indexer, and have peace of mind that my content will be downloaded, and it will be fast, and it will be secure.
In this article will not recommend any Usenet provider or any indexer, but you can find a lot of information on Reddit, and Subreddits about this and see which one fits your needs.
6.6 - Localized Content & SubtitlesSection titled 6.6 - Localized Content & Subtitles
While we get can get most of the media online in English, sometimes we want to watch a movie in our own language, or with subtitles (especially for kids ) The same is not easily possible for Audio, you can configure Bazarr or Radarr to prefer a certain audio, but the chances are low to get good content.
*Bazarr can do a very good job downloading subtitles from opensubtitles.org and adding them to your media library, so you can watch your content with subtitles, not only that but in 2024 you can also have Bazarr to “generate” its own subtitles by having a Whisper AI to generate subtitles for your content, how amazing?
One other thing you can do also its to get actual English subtitles and translate them using Bazarr Translate feature, it will not be perfect but does the job most of the time!
Here is a small script i have written to run on Unraid to automate the process of translating subtitles:
👇 Click here to watch the code block 👇
import json
import os
from urllib import request, error
# ------------------
# Credentials
# ------------------
TRANSLATION_FILE_PATH = './translation_attempts.json'
API_KEY = 'YOURKEY'
API_BASE_URL = 'https://YOURBAZARURL.com/api'
COMMON_HEADERS = {
'Accept': 'application/json',
'X-API-KEY': API_KEY,
'User-Agent': 'curl/8.4.0'
}
# ------------------
# Make a request
# ------------------
def make_request(url, method='GET'):
req = request.Request(url, method=method, headers=COMMON_HEADERS)
try:
with request.urlopen(req) as response:
if response.status == 200 or response.status == 204:
return json.loads(response.read().decode()) if method == 'GET' else True
else:
print(f"Failed request at {url}, Status code: {response.status}")
return None
except error.HTTPError as e:
#print(f"HTTP error: {e.code} - {e.reason}")
return None
except error.URLError as e:
#print(f"URL error: {e.reason}")
return None
# ------------------
# Load The attempts
# ------------------
def load_translation_attempts():
if os.path.exists(TRANSLATION_FILE_PATH):
with open(TRANSLATION_FILE_PATH, 'r') as file:
return json.load(file)
return {}
# ------------------
# Save The Attempts
# ------------------
def save_translation_attempts(attempts):
with open(TRANSLATION_FILE_PATH, 'w') as file:
json.dump(attempts, file, indent=4)
# ------------------
# Get all series IDs
# ------------------
def get_series_ids():
data = make_request(f"{API_BASE_URL}/series?start=0&length=-1")
return [series['sonarrSeriesId'] for series in data['data']] if data else []
# ------------------
# Get subtitle paths for multiple series
# ------------------
def get_subtitle_paths_for_multiple_series(series_ids):
# Constructing the query string for multiple series IDs
series_ids_query = '&'.join([f'seriesid%5B%5D={id}' for id in series_ids])
episode_url = f"{API_BASE_URL}/episodes?{series_ids_query}"
data = make_request(episode_url)
subtitle_info = []
if data:
for episode in data['data']:
english_subtitles = [sub for sub in episode['subtitles'] if sub['code2'] == 'en']
portuguese_subtitles = [sub for sub in episode['subtitles'] if sub['code2'] == 'pt']
if english_subtitles and not portuguese_subtitles:
subtitle_info.extend([{
'path': sub['path'],
'id': episode['sonarrEpisodeId'],
'type': 'episode'
} for sub in english_subtitles if sub['path'] is not None])
return subtitle_info
# ------------------
# Get subtitle paths for movies
# ------------------
def get_movie_subtitle_paths():
data = make_request(f"{API_BASE_URL}/movies?start=0&length=-1")
subtitle_info = []
if data:
for movie in data['data']:
english_subtitles = [sub for sub in movie['subtitles'] if sub['code2'] == 'en']
portuguese_subtitles = [sub for sub in movie['subtitles'] if sub['code2'] == 'pt']
if english_subtitles and not portuguese_subtitles:
subtitle_info.extend([{
'path': sub['path'],
'id': movie['radarrId'],
'type': 'movie'
} for sub in english_subtitles if sub['path'] is not None])
return subtitle_info
# ------------------
# Translate subtitle
# ------------------
# Update the translate_subtitle function
def translate_subtitle(subtitle_info, language='pt'):
subtitle_path = subtitle_info['path']
translation_attempts = load_translation_attempts()
if translation_attempts.get(subtitle_path, 0) >= 3:
print(f"Skipping translation for {subtitle_path} due to multiple failures.")
return
if make_request(f"{API_BASE_URL}/subtitles?action=translate&language={language}&path={request.quote(subtitle_path)}&type={subtitle_info['type']}&id={subtitle_info['id']}", 'PATCH'):
print(f"Translate: Subtitle translated: {subtitle_path}")
else:
print(f"Translate: Failed to translate subtitle: {subtitle_path}")
translation_attempts[subtitle_path] = translation_attempts.get(subtitle_path, 0) + 1
save_translation_attempts(translation_attempts)
# ------------------
# Translate Series
# ------------------
def translate_series():
# Usage
all_series_ids = get_series_ids()
# Check if there are any series IDs, exit if not
if not all_series_ids:
print("Series: No series found to process.")
#exit(0)
all_subtitles_info = get_subtitle_paths_for_multiple_series(all_series_ids)
# Check if there are any subtitle paths, exit if not
if not all_subtitles_info:
print("Series: No subtitle paths found to translate.")
#exit(0)
# Translate 10 Subtitles
subtitles_to_translate = all_subtitles_info[:20]
# Translate the selected subtitles
for subtitle in subtitles_to_translate:
translate_subtitle(subtitle)
# ------------------
# Translate Movies
# ------------------
def translate_movies():
# Usage
all_subtitles_info = get_movie_subtitle_paths()
# Check if there are any subtitle paths, exit if not
if not all_subtitles_info:
print("Movies: No subtitle paths found to translate.")
#exit(0)
# Translate 10 Subtitles
subtitles_to_translate = all_subtitles_info[:20]
# Translate the selected subtitles
for subtitle in subtitles_to_translate:
translate_subtitle(subtitle)
# ------------------
# Main
# ------------------
if __name__ == '__main__':
translate_series()
translate_movies()
6.7 - Transcoding, Saving Disk Space & StreamingSection titled 6.7 - Transcoding, Saving Disk Space & Streaming
If you wanna go deeper into the streaming & optimization, you may want to read some topics about transcoding & the best formats for streaming. Currently there is perfect video/audio format, as it really depends on how you gonna use and what kind of hardware you will be using to watch the content.
Plataforms like Netflix probably convert a movie into different codecs so they can serve the content to their users in their prefered format, but lets be real we are not netflix, we cant really affoard having the same movie multiplied by 2 with different formats right?
So pick one that fits best for your own use case, transcoding is not only important for saving space but also for quicker streaming.
6.8 - Formats & containers, which one one to choose?Section titled 6.8 - Formats & containers, which one one to choose?
- HVEC + H.265: This is the most recent format and intended to be used in modern hardware ( TVs ) from 2015 and up.
- MP4 + H.264: Still one of the most widly used formats, supports by modern & older TVS
While H.265 is the most “performant” format for streaming in 2024 ( kind of, correct me if im wrong ), its only supported in newer hardware as mentioned so if you want to share with your fams, make sure they have recent hardware otherwise Plex will attempt to Transcode to H.264, costing you hardware usage and making your NAS to burn :p
6.9 - Transcoding & Processing PipelineSection titled 6.9 - Transcoding & Processing Pipeline
Here we will cover what softwares to use to transcode and convert your videos, and process them.
One thing to keep in mind is that you should download your content in the format that you want to use, you can configure Radarr and Sonarr to target & prefer specific formats, so you dont need to re-process those.
For proper transcoding is recommended to have a cheaper Nvidea card for better & quicker results, transcoding with CPU can be heavy & actually waste more energy
Processing files is also important for a few reasons:
- Compress Files so they take less space on your disk
- Remove unnecessary Audio Tracks ( like Other languages that you do not want)
- Remove unnecessary Subtitles
- Convert Audio Tracks into a specific format ( ex from 5.1 to 2.1 )
- Extract Subtitles from the container to translate them or etc.
- Organize Audio Tracks & Subtitles in specific order
Once again, all of this is possible mostly due to our amazing FFMEGP, so all of this software are heavly based on it :p Please go ahead and star FFMPEG on github!
I have tried Tdarr and Fileflows, so ill just show here the pros and cons of each one:
Tdarr:
- More advanced
- Popular in the community
- Open Source & Freemium
- Ugly UI and confusing sometimes
Fileflows:
- Much better UI
- Nice plugins & Tools out of the box
- Smaller community so you get help quicker.
- Nicer way to build flows
- Quick setup for Extra Nodes
- Nicer Docker Support
Here are my Fileflows dashboard stats:
Summing it up, this saved me around 3TB for my current library! Amazing isnt it?
If you have a lot of content to transcode you can even create more nodes, and have them working in parallel, so you can transcode a lot of content at the same time.
6.10 - Going deeper on the Media ServerSection titled 6.10 - Going deeper on the Media Server
If you want to go deeper on the media server, you can also set up a few more things to keep your library & experience even better. Here are some of the things you can do:
- Tautilli: Monitor your Plex server, and get stats about your users, and your content, transcodings, etc
- Overseerr: Let your friends & family request content, and you can approve or deny the requests and they will be instantly downloaded.
- PMM: Plex Meta Manager, to get more metadata about your content, create new categories, organize library by type, download popular lists etc.
- Wizarrrd: Invite users quickly and easily with a nice UI, and manage their permissions.
- Organizr: Create a nice dashboard for your services, and have a nice UI to access them.
- Recyclarr: Automatically delete content that you have not watched in a while, or that you have watched, and you don’t want to keep it.
7 - Saving EnergySection titled 7 - Saving Energy
While this a topic that mostly no one talks about, saving Energy is important especially if you have a high-end server, and you are not using it all the time. I have tried to search for a while, and i have found a few ways to save energy on your server:
- Spindown Disks - So when the disks are not being used, they will be spun down, and they will consume less energy.
- Sleep Mode - You can put your server in sleep mode, and it will consume less energy, and it will be ready to wake up when you need it.
- Power Management - You can configure your server to consume less energy, and you can configure it to consume less energy when it is not being used.
- Nvidia Power Management - If you have a Nvidia card, you can configure it to consume less energy, and you can configure it to consume less energy when it is not being used.
👇 Click here to watch the code block 👇
#!/bin/bash
# check for driver
command -v nvidia-smi &> /dev/null || { echo >&2 "nvidia driver is not installed you will need to install this from community applications ... exiting."; exit 1; }
echo "Nvidia drivers are installed"
echo
echo "I can see these Nvidia gpus in your server"
echo
nvidia-smi --list-gpus
echo
echo "-------------------------------------------------------------"
# set persistence mode for gpus ( When persistence mode is enabled the NVIDIA driver remains loaded even when no active processes,
# stops modules being unloaded therefore stops settings changing when modules are reloaded
nvidia-smi --persistence-mode=1
#query power state
gpu_pstate=$(nvidia-smi --query-gpu="pstate" --format=csv,noheader);
#query running processes by pid using gpu
gpupid=$(nvidia-smi --query-compute-apps="pid" --format=csv,noheader);
#check if pstate is zero and no processes are running by checking if any pid is in string
if [ "$gpu_pstate" == "P0" ] && [ -z "$gpupid" ]; then
echo "No pid in string so no processes are running"
fuser -kv /dev/nvidia*
echo "Power state is"
echo "$gpu_pstate" # show what power state is
else
echo "Power state is"
echo "$gpu_pstate" # show what power state is
fi
echo
echo "-------------------------------------------------------------"
echo
echo "Power draw is now"
# Check current power draw of GPU
nvidia-smi --query-gpu=power.draw --format=csv
exit
8 - Backups & Raid & ParitySection titled 8 - Backups & Raid & Parity
Unraid introduces a concept called Parity, that is a way to protect your data, and ensure that you dont lose it. The differences between Parity and Raid are that Parity is more flexible, and you can expand it as you need it.
If you wanna have a deeper read about Parity, Raid, and Backups, you can read Unraid FAQS Here.
For regular backups im using Duplicacy that makes it very easy to backup your content to the cloud, and you can restore it at any time. Im currently store my backups at Backblaze because they offer a nice quality service for a very low price.
9 - What you can do more with your NAS & Unraid?Section titled 9 - What you can do more with your NAS & Unraid?
The applications here are endless, you can do almost anything with your NAS, and Unraid, including having your own Dropbox, run LLMs inference, DNS servers for Adblocking, etc, one of the greatest things with Unraid is that you can run almost any docker container on it, and you can expand it as you need it.
Their community apps are endless and are raising every day, so you can find almost any app that you need, and you can run it on your NAS with a few clicks.
10 - ConclusionSection titled 10 - Conclusion
In this article we have explored a little bit about Unraid, what it is, how it works, and how you can use it to create your own Netflix like service, NAS or file system for your home or office. I cant deny that i had some fun time configuring and tweaking little things here and there, while still learning more about Docker, Linux & Micro-services.
Please do note that some informationm might be wrong, as im no expert, sharing a little bit of what i have learned so far, and i hope this article can help you to get started with your own NAS, and Unraid.
11 - My Hardware & SetupSection titled 11 - My Hardware & Setup
Here is a little bit about my hardware & setup
- CPU: Intel® Core™ i7-8700 CPU @ 3.20GHz
- RAM: 16GB DDR4
- GPU: RTX A2000
- Motherboard: Gigabyte Technology Co., Ltd. Z390 DESIGNARE-CF
- Network & Internet: 1Gbps - 1GB Download & 500MB Upload
- UPS: APC Back-UPS Pro 900
- Disks - Storage: 2x 10TB WDC_WD101KRYZ-01JPDB1
- Disks - Cache: 2x 1TB Samsung SSD 970 EVO Plus 1TB
Do we need this much? No, but i had this hardware laying around, and i wanted to use it for something, so i decided to use it for my NAS, and Unraid. You can def run this very same setup with very little hardware :p