Skip to content

Commit

Permalink
feat: redesign guides/htpc.md (Snaacky#166)
Browse files Browse the repository at this point in the history
* feat: htpc redesign `guides/htpc.md`

- Host images on master instead of PR fork
- Remove personal language. I believe that it makes the guide feel more like a blog and unfit with the rest of the wiki
- Add more clarification to important details
- Amend grammatical/formatting errors

* fix: remove Intel dGPU and add deband hotkey note

* fix: rearrange buttons

alphabetical order moment
  • Loading branch information
ricky8k authored Sep 27, 2023
1 parent 44cdb01 commit 5d19f1b
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 52 deletions.
157 changes: 105 additions & 52 deletions docs/guides/htpc.md
Original file line number Diff line number Diff line change
@@ -1,95 +1,144 @@
---
label: HTPC (on a budget)
label: HTPC
order: -2
description: Anime on the Big Screen
description: Learn how to setup a home-theater system for watching anime
image: /static/tohsaka.gif
---

# Why HTPC?
# HTPC

There are plenty of reasons to want to use a HTPC over a smart TV or other premade TV box. Among them, there is [poor subtitle rendering](https://cdn.discordapp.com/attachments/930734323353677854/1137931348510785586/Kodi_20230806_190720_Record.mp4), [poor software support](https://github.com/mpv-android/mpv-android/issues/12), or limited filtering and upscaling options.
A home-theater PC (HTPC) is a system specifically designed to host/stream media, such as anime TV shows and movies.

As of the writing of this guide, any less than $50 leaves you with the Amazon Fire Stick 4K Max as probably the best option, as most PCs cheaper than this will not handle things much better, and in some cases may be even worse.
There are plenty of reasons you may want to consider using a HTPC over a smart TV or other premade TV box, such as [bad subtitle rendering](/static/playback/ass-subtitles-issue.mp4), [poor software support](https://github.com/mpv-android/mpv-android/issues/12), or limited filtering and upscaling options.

## Specs Rundown
!!!
If you are on a strict budget ($50 or less), we suggest getting an [Amazon Fire TV Stick 4K Max](https://www.amazon.com/dp/B08MQZXN1X), as most PCs at this price will provide a suboptimal experience.
!!!

## Specifications

There are two main things to consider when building an anime HTPC: the [GPU](#gpu) and the [CPU](#cpu). The information below will help you decide on what to choose for your setup and budget.

### GPU

Generally, a dedicated graphics card (dGPU) will almost always be better than the integrated option (iGPU). *However, you may want to consider whether your home-theater setup will necessitate one if you're on a tighter budget:*

There are two main considerations for an Anime HTPC. The biggest, will be the CPU. You will need to decide if you want to use the integrated GPU (iGPU) or if you want to install an external dedicated GPU (dGPU).
+++ Dedicated

+++ dGPU
A dGPU is a dedicated piece of hardware which will be used to handle video decoding. Cards in this category are usually from *AMD* or *NVIDIA*.

You may want to consider a dGPU if:

- You plan to use shaders
- You want to use filters like deband
- You have a 4K TV and want to upscale
- You want to use filters like [debanding](/tutorials/mpv/#debanding)
- You have a high-resolution display (e.g. 2160p/4K or higher) and want to upscale

+++ Integrated

An iGPU is an integrated piece of hardware on your [CPU](#cpu) which will be used to handle video decoding. CPUs in this category are usually from *Intel* or *AMD*.

+++ iGPU
You may want to consider an iGPU if:

- You are on a tighter budget
- You want this to be as small as possible
- You have a 1080p TV or will send your 4K TV a 1080p signal
- You want a smaller computer/footprint
- You have a lower-resolution display (e.g. 1080p) or plan to send your high-resolution display a lower-resolution signal (e.g. 2160p/4K -> 1080p)

+++
Once you have decided if you will be using a dGPU, you can pick your CPU.

### CPU choice
### CPU

To keep things cheap, this guide will be using used hardware as examples, however you are free to look at brand new hardware instead.
Once you've decided on a type of [GPU](#gpu) for your HTPC, you can decide on what CPU you will need.

A good base for any HTPC is a used small form factor office machine, such as a Dell Optiplex, Lenovo ThinkCentre, or HP ProDesk. Look on sites like [ebay.com](https://ebay.com) for these machines at good prices.
If you chose to rely on iGPU performance for your HTPC, you can look at MFF or micro desktops. These machines are very tiny and are very quiet, however, they do not have room for a dGPU.
!!!warning
If you decided on iGPU, avoid 6th generation Intel or older. These CPUs are known to have [issues hardware decoding HEVC](https://github.com/mpv-player/mpv/issues/12154), and software decoding will have a performance impact on subtitles.
!!!
For most budget-friendly setups, we recommend picking up and repurposing a used/refurbished small form factor office machine, such as a *Dell OptiPlex*, *Lenovo ThinkCentre*, or *HP ProDesk*. These can be commonly found on sites like [eBay](https://ebay.com) at good prices.

Below are some examples of good candidates for HTPC setups to help you determine a good system:

==- Systems using a dGPU

Good Canidates:
![An example listing for a Dell OptiPlex 5040](/static/htpc/example-optiplex.png)

==- Dedicated GPU
This is an example of a good option to choose for your HTPC. As shown, this machine includes a capable CPU, plenty of RAM preinstalled, and an SSD. It is only missing a dedicated graphics card.

![OptiPlex 5040](https://github.com/guyman624/thewiki/assets/82007920/bc6a1940-3cda-4bf6-94cd-5c14f72e79a1)
This machine has plenty of ram preinstalled, a beefier CPU, and SSD storage included. All it needs is a GPU.
You should also keep your eyes peeled for machines that have a dGPU preinstalled:

Keep your eyes peeled for machines that already have a GPU installed
![gpu preinstalled](https://github.com/guyman624/thewiki/assets/82007920/d5ad6390-b4e4-4f31-ad16-0ef33f7411c0)
![A dedicated graphics card preinstalled in a Dell OptiPlex](/static/htpc/example-optiplex-dgpu.png)

If it includes a dGPU, you might not need to find one for your HTPC. Check to see beforehand if it can handle the various codecs/video you plan to run on it.

Once you have picked a machine, you can move onto picking a GPU.

The two most popular options are going to be the GT 1030 and the RX 550. If you plan to play 4K or HDR videos, you should pick the GT 1030. Otherwise, the RX 550 should be fine.
The most important consideration is the video decoder, and supported resolutions. NVidia has a chart [here](https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new) (look at NVDEC not NVENC). For AMD, check TechPowerUp for the Unified Video Decoder version, then check [here](https://en.wikipedia.org/wiki/Unified_Video_Decoder#Format_support) for supported codecs.
![gpu](https://github.com/guyman624/thewiki/assets/82007920/6aca03ab-155d-499a-b38c-aadd7c9d0004)
We recommend choosing relatively recent, low-powered graphics cards as this will allow you to handle most modern shows without issue. Some examples of popular budget cards are:

- AMD Radeon RX 550
- NVIDIA GT 1030 (GDDR5) [!badge variant="info" text="Preferred for 4K/HDR"]

The most important factor to consider when choosing a GPU is the video decoder hardware and its supported resolutions.

- For AMD, look up the card on [TechPowerUp](https://www.techpowerup.com/gpu-specs) and search for the *Unified Video Decoder* version. [Check this number here](https://en.wikipedia.org/wiki/Unified_Video_Decoder#Format_support) to see if it supports your codecs
- For NVIDIA, see their [Video Encode and Decode GPU Support Matrix](https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new) -> **NVDEC**

![An example listing for a NVIDIA GeForce GT 1030 from MSI](/static/htpc/example-nvidia-gpu.png)

!!!warning
Small form factor machines will require a low-profile GPU and bracket.
!!!

==- Systems using an iGPU

If you are choosing to use an iGPU for your HTPC, you can also look for MFF or micro desktops. These machines will have a smaller footprint and are very quiet. *Due to their size, however, they will not have room for a dGPU if you plan to upgrade later on.*

!!!warning
SFF machines will need a low profile GPU and bracket.
Avoid systems running 6th Generation Intel processors or older. These CPUs are known to have [issues hardware decoding HEVC content](https://github.com/mpv-player/mpv/issues/12154), and software decoding will have a performance impact on subtitles.
!!!

==- Integrated GPU
![MFF desktop](https://github.com/guyman624/thewiki/assets/82007920/5cbe1a4e-7b82-4136-992c-4427597487da)
This machine includes the power cord, has a decent amount of ram, and an included SSD. This is an ideal canidate if size is a concern.
![An example listing for a HP ProDesk 600](/static/htpc/example-prodesk.png)

===
This is an example of a good option to choose for your HTPC. As shown, this machine includes a capable CPU, decent amount of RAM preinstalled, and an SSD. This is an ideal candidate if size is a concern.

==-

## Software

### Windows

I won't go over installing Windows in this guide, but install Windows as you normally would on any other computer. You are also free to install any debloat scripts, such as AtlasOS or ReviOS to increase performance. Make sure you install the appropriate graphics driver for your system, whether it be NVidia, AMD, or Intel.
For most HTPC users, Windows is the recommended operating system. *Optionally, you may choose to install debloat scripts to increase performance:*

- [AtlasOS](https://atlasos.net)
- [ReviOS](https://revi.cc)

!!!warning
Make sure you install the appropriate graphics driver for your system:

[!button variant="secondary" icon="download" text="AMD" margin="0 8 0 0"](https://www.amd.com/en/support)
[!button variant="secondary" icon="download" text="Intel" margin="0 8 0 0"](https://www.intel.com/content/www/us/en/download-center)
[!button variant="secondary" icon="download" text="NVIDIA"](https://www.nvidia.com/download/index.aspx)

!!!

### mpv

### MPV
[mpv](/tutorials/mpv) is the most recommended media player for HTPC setups.

#### Config

We already have a [guide](/../tutorials/mpv/) on setting up mpv, however you may realize that the config there is slow on your machine. Here, I will provide the configuration I use for my 6100T + GT 1030 HTPC.
Depending on your hardware, the [example mpv configs](/tutorials/mpv/#basic-config) may not suit your hardware. Below is an example configuration catered specficially towards HTPC setups:

==- HTPC config
==- :icon-file-code: HTPC `mpv.conf` config

```yaml
#### General
```properties
# General
ontop=yes
blend-subtitles=video
hwdec=auto-safe
gpu-api=vulkan
target-colorspace-hint=yes

# Scaling
scale=ewa_lanczos
dscale=hermite
cscale=catmull-rom

# Deband
deband=no
deband-iterations=4
deband-threshold=64
Expand Down Expand Up @@ -119,23 +168,27 @@ vo=gpu-next
target-contrast=inf
target-trc=pq
target-prim=bt.2020
target-peak=700 ##IF YOU HAVE AN HDR TV, ADJUST THIS TO THE 10% PEAK
target-peak=700 ## If you have an HDR display, adjust this to the 10% peak

## Above makes use of vo=gpu-next for HDR Content, and vo=gpu for SDR. This is a requirement for blend-subtitles=video.
## Above makes use of vo=gpu-next for HDR Content, and vo=gpu for SDR. This is a requirement for blend-subtitles=video
```

!!!
`deband` should be toggled as needed and is set to `off` in the config. [See how to bind debanding to a hotkey.](/tutorials/mpv/#input-conf)
!!!

==-

In my input.conf I have a single line, for deband.
#### Scripts

```yaml
BACK cycle deband
```
Most modern TVs are not capable of using [adaptive sync](/guides/playback/#adaptive-sync), causing [judder](/guides/playback/#explaining-judder) and negatively impacting your viewing experience.

BACK refers to the back button on my mouse.
To resolve this, we suggest using [change-refresh](https://github.com/CogentRedTester/mpv-changerefresh), a script that automatically sets the TV's refresh rate to match the current video and prevent judder.

#### Scripts
!!!
Make sure you set `auto = true` for automatic switching.
!!!

The most important script for TV viewing will be [changerefresh](https://github.com/CogentRedTester/mpv-changerefresh).
This script automatically sets the TV to refresh rate of the video, to prevent judder. Make sure you set `auto = true` for automatic switching.
It also requires [nircmd](https://www.nirsoft.net/utils/nircmd-x64.zip), you can just copy nircmd.exe to C:\Windows.
!!!
[nircmd](https://www.nirsoft.net/utils/nircmd-x64.zip) is required for [change-refresh](https://github.com/CogentRedTester/mpv-changerefresh). Download and copy `nircmd.exe` to your `Windows` folder (i.e. `C:\Windows`).
!!!
Binary file added docs/static/htpc/example-nvidia-gpu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/htpc/example-optiplex-dgpu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/htpc/example-optiplex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/htpc/example-prodesk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/playback/ass-subtitles-issue.mp4
Binary file not shown.
1 change: 1 addition & 0 deletions docs/tutorials/mpv.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ Below is a list of some popular scripts:

- [autocrop](https://github.com/mpv-player/mpv/blob/master/TOOLS/lua/autocrop.lua) - Automatically crop the video by using lavfi's cropdetect filter to detect black bars
- [autoload](https://github.com/mpv-player/mpv/blob/master/TOOLS/lua/autoload.lua) - Automatically adds all files present in the folder to a playlist
- [change-refresh](https://github.com/CogentRedTester/mpv-changerefresh) - Script to automatically change the refresh rate of the display to reflect the current video
- [mpv-playlistmanager](https://github.com/jonniek/mpv-playlistmanager) - Script to create and manage playlists
- [mpv-webm](https://github.com/ekisu/mpv-webm) - WebM maker for mpv
- [pause-when-minimize](https://github.com/mpv-player/mpv/blob/master/TOOLS/lua/pause-when-minimize.lua) - Pauses playback when minimizing the window, and resumes playback when brought back
Expand Down

0 comments on commit 5d19f1b

Please sign in to comment.