Thanks to @ajroach42 we found that our peertube instance https://peertube.mastodon.host lost some videos.. no idea how it happened but it seems like videos that were not transcoded ( because below the 480p minimum transcode resolution activated ) were lost. Not present anymore on disk, and I only keep 2 days of peertube data backups ( space issue, you can imagine why ).
The database though was still referencing those videos, so I ran a cleanup sanity check. It impacted 442 entries, that are now deleted from the DB.
Apparently it appeared on other instances too, so instance owners, you may want to check. We are currently suspecting an issue during an upgrade...
( Easy one liner to adapt to your pgsql creds and domain and min resolution supported, you also may want to remove the psql DELETE for just a sanity check ):
cd /var/www/peertube/storage/videos; psql -U peertube -p 5432 -h 127.0.0.1 -q -c "select url from video where url like 'YOURFULLURL/%';" peertube_prod | grep https | cut -d / -f 6 | while read -r uuid; do if [ ! -f $uuid-480.mp4 ]; then echo "File not found: $uuid"; psql -U peertube -p 6432 -h 127.0.0.1 -q -c "DELETE FROM video where url = 'YOURFULLURL/videos/watch/$uuid'" peertube_prod; fi; done