Basically, you can set up your PeerTube server to mirror videos from your federated network according to algorithms (and also by adding videos manually).
PeerTube uses the WebTorrent protocol, so that a video that gets super popular isn't as likely to crash the server it's on or essentially DDOS it. In this case, my server has a significant portion of HDD space set aside for some servers I trust to have quality content, so that recent videos, trending videos and their overall most watched videos are mirrored by mine (rotating them in and out automatically). The server will be a peer seeding the video while it is watched anywhere, thus reducing the load on the original server, and making the video more resilient against uptime failure of the original server.
As far as I know, no options exist for something like a local PeerTube instance without a proper server, without also having a domain name, so doing it locally is a bit complicated.
I'd guess the closest would be to have tabs open with videos you want to mirror, so you are a peer via webtorrent for those, but that is clunky, and I am unsure how well it would even work without having the tabs active.
But I am relatively new to this as well, so maybe someone else has some info I am lacking right now.
Of note: The part in the config file (usually /var/www/peertube/config/production.yaml) looks like this (my current config as an example)
undefined
redundancy:
videos:
check_interval: '15 minutes' # How often you want to check new videos to cache
strategies: # Just uncomment strategies you want
-
size: '50GB'
# Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
min_lifetime: '48 hours'
strategy: 'most-views' # Cache videos that have the most views
-
size: '150GB'
# Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
min_lifetime: '48 hours'
strategy: 'trending' # Cache trending videos
-
size: '100GB'
# Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
min_lifetime: '48 hours'
strategy: 'recently-added' # Cache recently added videos
min_views: 10 # Having at least x views