Produce lots of Gb?

settings

On my PeerTube totally was upload 1,9Gb video. But when I made archive copy - it totally 17Gb! Why?

It seems you are using a YunoHost-based installation, so please reach out to them first - especially since this is related to their archiving mechanism.

thay redirect me to you…

Does your instance provide redundancy to others? If so, there can be videos in /var/www/peertube/storage/redundancy. There is no need to backup these videos.

It would have been nice having that information first, for instance the list of video files is very interesting.

Looking at the list of files, you have activated webtorrent and hls, effectively doubling storage size. But then you have multiple resolutons per file. Maybe you have enabled more resolutions before disabling them?

@JohnLivingston @rigelk Thank you.

pic 1 pic 2 (sorry for links, can`t paste more 1 image at message)

I have found what seems to be a place where redundant video is generated.

pic 3

these are my settings, what I did right after installation

pic 4

but somehow the video was still transcoded in different formats (and not just 480)…

Another source of excess video production is, as I understand it, the HLS option with P2P support enabled. I’ll turn it off.

  1. So can I then manually clean the folder /home/yunohost.app/peertube/storage/streaming-playlists/hls to save and increase disk space?

pic 5

I want to leave such settings, and now it is possible that there will be no transcoding in different resolutions (lot GB generation) and only the original resolution of the uploaded file will remain in the future…

  1. So can I also manually delete unnecessary transcoded videos (leaving for example only 480) from the /home/yunohost.app/peertube/storage/videos folder

unless you prefer WebTorrent, I advise you to keep HLS and rather turn WebTorrent off, as HLS provides better performance.

No. Manual cleaning is not something you can do - it is not as if deleting a file will delete its existence in the database. For that you have the PeerTube/support/doc/tools.md at develop · Chocobozzz/PeerTube · GitHub script - for which you still need to make a full backup beforehand, just in case something fails.

1 « J'aime »

Hi! When I try sudo systemctl stop peertube && sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage

I`v got errror

Error: EACCES: permission denied, scandir '/root'

You have to run this command from the /var/www/peertube/peertube-latest/ directory.
It is indicated here in the documentation: https://github.com/Chocobozzz/PeerTube/blob/develop/support/doc/tools.md#server-tools . Easy to miss :wink: .

1 « J'aime »

I will explain a little more, for your culture.

sudo -u peertube tells that the following command will be executed as the peertube user. You were in the /root directory. This directory is the home of the root user. This directory is only accessible for the root user.

npm run XXX tells to npm to run the XXX script. Npm scripts are listed in a package.json file. Npm look for this file in the current directory.
In your case, in /root. But the peertube user has no access. This explains your error (permission denied).
The correct package.json file is in the current Peertube’s version directory: /var/www/peertube/peertube-latest (for a standard installation).

1 « J'aime »

Johnlivingston, Thank you very much.
I install peertube via yunohost and can`t find /peertube-latest folder…
try to ask at yunohost support forum

I`ve get error:

peertube@2.4.0 prune-storage /var/www/peertube
node ./dist/scripts/prune-storage.js

Cannot prune storage because you put multiple storage keys in the same directory

need help

Done!

  1. cd /var/www/peertube/
  2. sudo systemctl stop peertube && sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage
  3. These following unused files can be deleted, but please check your backups first (bugs happen). Notice PeerTube must have been stopped when your ran this script. Can we delete these files?: (n) — type y