Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.11k stars 1.52k forks source link

original-video-files stored in /var/www/peertube/versions/peertube-v6.2.0/storage/original-video-files/ #6726

Open jeena opened 1 week ago

jeena commented 1 week ago

Describe the current behavior

When I was moving my files to a object storage some of the later videos couldn't be moved and got the label "External storage move failed". I investigated and the logs showed that it couldn't find the original-video-files like:

Error: ENOENT: no such file or directory, open '/var/www/peertube/versions/peertube-v6.3.2/storage/original-video-files/8fe8871a-56c1-4e7d-b224-55cfe1f1eb96-1080.mp4'

I was wondering why the file is in versions and not in storage and even stranger under a specific version. So I looked around and found that there was also the /var/www/peertube/versions/peertube-v6.2.0/storage/original-video-files/ directory where all those files which were missing were.

For now as a work around I manually moved them from the peertube-v6.2.0/storage/original-video-files/ to peertube-v6.3.2/storage/original-video-files/ and the move to object storage works. But I think this is a bug in the code where it decides where to store the original files, or at least where to find them.

Steps to reproduce

  1. Install PeerTube version 6.2.0
  2. Set it to store original videos
  3. upload a video
  4. update to version 6.3.2
  5. move the video to object storage
  6. check the logs

Describe the expected behavior

Original files should be stored in /var/www/peertube/storage/original-video-files

Additional information

Chocobozzz commented 1 week ago

Storage location is defined in your config: https://github.com/Chocobozzz/PeerTube/blob/develop/config/production.yaml.example#L159

You must add the key in your current config