# Upstream live re-encode test on DigitalOcean, October 24, 2026 # Used in https://upstream.so/blog/vps-for-streaming/ # Four droplets, Ubuntu 24.04, FFmpeg 6.1.1 from Ubuntu: Basic 1 vCPU ($6), Basic 2 vCPU ($18), # CPU-Optimized 2 vCPU ($42) and CPU-Optimized 4 vCPU ($84). Each ran setup.sh, then # run.sh single 600 and run.sh multi 600 (10 minutes each). # # The ten test clips (10 seconds each, made from Upstream's own demo loops): # 01-phone-1080p60-h264.mp4 h264,1920,1080,60/1,11914012 # 02-iphone-4k30-hevc.mp4 hevc,3840,2160,30/1,20651971 # 03-old-720p30-h264.mp4 h264,1280,720,30/1,3017263 # 04-camera-1080p25-h264.mp4 h264,1920,1080,25/1,7888351 # 05-lofi-1080p24-copy.mp4 h264,1916,1080,24/1,6187989 # 06-vertical-1080x1920-30.mp4 h264,1080,1920,30/1,7864470 # 07-export-1440p30-h264.mp4 h264,2560,1440,30/1,10695578 # 08-1080p30-hevc.mp4 hevc,1920,1080,30/1,6235275 # 09-old-480p30-h264.mp4 h264,854,480,30/1,1450282 # 10-editor-1080p30-vbr.mp4 h264,1920,1080,30/1,7307118 # Music: the Big Buck Bunny soundtrack (Blender Foundation, CC BY 3.0). ########## setup.sh ########## #!/bin/bash # One-time setup on a fresh Ubuntu 24.04 droplet: FFmpeg, vmstat, the music file, and a copy-mode baseline. set -eu export DEBIAN_FRONTEND=noninteractive apt-get update -qq apt-get install -y -qq ffmpeg procps fonts-dejavu-core unzip > /dev/null mkdir -p /root/t && cd /root/t # Big Buck Bunny (Blender Foundation, CC BY 3.0); only its soundtrack is used, as the separate music playlist. curl -sSfL -o bbb.zip https://download.blender.org/demo/movies/BBB/bbb_sunflower_1080p_30fps_normal.mp4.zip unzip -p bbb.zip '*.mp4' > bbb.mp4 rm -f bbb.zip ffmpeg -nostdin -hide_banner -loglevel error -y -i bbb.mp4 -map 0:a:0 -c:a copy music.mka rm -f bbb.mp4 lscpu | grep -E 'Model name|^CPU\(s\)' > cpu.txt nproc >> cpu.txt ffmpeg -version | head -1 >> cpu.txt # Copy-mode baseline: one prepared file sent as is for 2 minutes. vmstat -n 5 > vmstat-copy.txt & VM=$! timeout 120 ffmpeg -y -nostdin -hide_banner -loglevel warning -re -stream_loop -1 -i clips/05-lofi-1080p24-copy.mp4 -c copy \ -progress progress-copy.txt -stats_period 5 -f flv /dev/null 2> enc-copy.log || true kill "$VM" 2>/dev/null || true echo setup-done ########## run.sh ########## #!/bin/bash # Live re-encode test, the work a stream with mixed videos, separate music and overlays needs. # usage: run.sh