From edb4ffc7e0b13659d7c73b120f2c87b27e4c26a1 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 8 Oct 2018 09:26:04 -0500 Subject: Set bitrate limits for transcoding (fixes #638) (#1135) * Set bitrate limits for transcoding (fixes #638) * added optimization script and test, changed stuff * fix test, improve docs * re-add optimize-old-videos script * added documentation * Don't optimize videos without valid UUID, or redundancy videos * move getUUIDFromFilename * fix tests? * update torrent and file size, some more fixes/improvements * use higher bitrate for high fps video, adjust bitrates * add test video * don't throw error if resolution is undefined * generate test fixture on the fly * use random noise video for bitrate test, add promise * shorten test video to avoid timeout * use existing function to optimize video * various fixes * increase test timeout * limit test fixture size, add link * test fixes * add await * more test fixes, add -b:v parameter * replace ffmpeg wiki link * fix ffmpeg params * fix unit test * add test fixture to .gitgnore * add video transcoding fps model * add missing file --- support/doc/tools.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'support') diff --git a/support/doc/tools.md b/support/doc/tools.md index 1db29edc0..8efb0c13d 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md @@ -187,6 +187,17 @@ To delete them (a confirmation will be demanded first): $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage ``` +### optimize-old-videos.js + +Before version v1.0.0-beta.16, Peertube did not specify a bitrate for the transcoding of uploaded videos. +This means that videos might be encoded into very large files that are too large for streaming. This script +re-transcodes these videos so that they can be watched properly, even on slow connections. + +``` +$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run optimize-old-videos +``` + + ### update-host.js If you started PeerTube with a domain, and then changed it you will have invalid torrent files and invalid URLs in your database. -- cgit v1.2.3