At fedihost we take care of getting your video files transcoded and streamed to viewers. But one thing that is in your hands is storage.
The Upload Process
When your video files are uploaded to peertube they are placed in storage drive, from there they are transcoded (converted) into various smaller files to be streamed to viewers. The original uploaded file is then deleted.
Video Files Use Storage
Common default resolutions are 480p (Standard Definition) and 1080p (High Definition), but you can enable many different resolutions that are even higher and lower.
The original uploaded file and these smaller files can add up to a lot of space when you have hundreds of videos so it is something you need to keep an eye on.
What Happens When You Run Out?
Things “get weird” when you run out of storage space. This means bad performance, corrupted processes and errors that are hard to fix. That’s why on Fedihost when you are approaching the limit, you will get a warning email so you have a chance to act. If you hit the limit we will automatically upgrade you to a higher storage plan to avoid the problems associated with hitting a hard storage limit.
It is natural for a peertube instance to grow over time as your users upload more videos. However this easy solution can become quite costly, so we recommend having a look at the other options below for your server.
How To Handle Running Out of Storage?
1. Reduce Transcode Resolutions
Higher resolution files have higher files sizes. If you are transcoding to 480p, 1080p, 1440p, 2160p it may make sense to disable transcodes to those higher resolutions. A 2160p (4K) file is actually around 4 times larger than a 1080p (HD) file.
This table shows our latest test with a few different test video files.
Resolution | 2 Minute Video Size | 15 Minute Video Size |
---|---|---|
2160p | 247.0 MB | 1852.5 |
1440p | 120.2 MB | 901.5 |
1080p | 78.6 MB | 589.5 |
720p | 41.5 MB | 311.25 |
480p | 24.0 MB | 180 |
360p | 17.3 MB | 129.75 |
240p | 11.3 MB | 84.75 |
144p | 7.5 MB | 56.25 |
Audio | 4.6 MB | 34.5 |
You can toggle off higher resolution transcodes settings by going to Administration > Configuration > VOD Transcoding
and then scrolling down to the transcoding section to uncheck larger resolutions.
2. Reduce Number of Transcodes
It isn’t really necessary to have 8 different resolutions of a video. It uses a lot of storage space and also means that the webtorrent feature of Peertube which speeds up downloads by sharing files peer to peer is less effective.
We recommend having 2 different resolutions. A low resolution for people on slower internet connections, and a higher resolution option for people on fast connections.
3. Disable Web Video
Peertube transcodes videos to two different formats. Web Video (previously known as "WebTorrent") and HLS with P2P support. Supporting both these formats means you use twice the storage.
We recommend using only HLS because according to PeerTube the video playback in the PeerTube web client is better.
You can toggle the setting off in the VOD transcoding section Administration
> Configuration
> VOD Transcoding
4. Trim Certain Transcoded Files
If you go to the “Videos” section of your administration panel you can see the various file sizes of each transcoded file.
You may find some culprits there which are using a large amount of data. One common culprit is multi-hour podcast or livestream recordings. Some people choose to selectively delete the larger resolution versions of these files. Another option would be to delete the higher resolutions.
5. Check Redundancy Settings
Peertube has an option to supply redundancy for other instances. This is not enabled by default, but it may have been turned on.
Check the status of this in the federation section by going to: Administration
> Federation
> Video Redundancies
And choose "Remove videos duplicated by my instance" from the Display dropdown.
6. Delete Videos
It’s obvious, but do you still need certain old videos? You can sort videos by views, if it is no longer getting any maybe it could be trimmed especially if it is particularly long.
7. User Limits
Some users may be uploading too much. You can set upload quotas for new users under Administration > Configuration
or target specific users bu opening their profile under Administration > Users
and choosing a "Daily Quota" and overall "Video Quota"
Moving a Mastodon account to a new server is a process that involves followimg several steps in a specific order. It typically takes under an hour, but full user migration can take several months. Limitations There are a few limitations to Mastodon and things you should know about a migration first. Things You Can Migrate * Followers - Automatically * Bookmarks - CSV Download/Upload * Follows - CSV Download/Upload * Lists - CSV Download/Upload * Mutes - CSV Download/Upload * Blocks -