For those who might be interested, I found a way to use 2 Mac Mini M4s together to upscale SD videos at realtime speed using Artemis, Proteus or Iris. So I can “stream” the result in VLC after just a few seconds delay. I purposely set the Max Memory at 100% to minimise use of the GPU cores - so the total power consumption of the 2 Minis is less than 30W while upscaling with the benefit of no audible fan noise. Although one of my Minis is an M4 Pro, the other is a base spec M4 which is plenty fast enough for half the load. So 2 base spec M4s would be fine.
Using ffmpeg in the CLI, there are a couple of ways to split a video across 2 or more machines for processing and then recombine afterwards, but I found the “select” and “interleave” filters to be the easiest. (Another way is to use segmentation and concatenation.)
Below are the 3 commands I used:
On Mini 1 - upscale odd numbered frames:
ffmpeg -hide_banner -y -i “/Users/Andy/Desktop/Original.mkv” -filter_complex “select=mod(n-1\,2),tvai_up=model=alq-13:scale=0:w=1440:h=1152:blend=0.5:device=0:vram=1:instances=1,scale=w=1440:h=1152:flags=lanczos:threads=0” -c:v prores_videotoolbox -profile:v xq -color_range tv -pix_fmt p416le -an -fps_mode:v passthrough -colorspace bt709 “/Users/Andy/Desktop/Odd Frames.mkv”
On Mini 2 - similarly upscale even numbered frames:
ffmpeg -hide_banner -y -i “/Volumes/Andy/Desktop/Original.mkv” -filter_complex “select=mod(n\,2),tvai_up=model=alq-13:scale=0:w=1440:h=1152:blend=0.5:device=0:vram=1:instances=1,scale=w=1440:h=1152:flags=lanczos:threads=0” -c:v prores_videotoolbox -profile:v xq -color_range tv -pix_fmt p416le -an -fps_mode:v passthrough -colorspace bt709 “/Users/Andy/Desktop/Even Frames.mkv”
On Mini 2 - interleave upscaled odd and even frames, adding original audio - concurrently with the upscaling, starting after a short delay:
ffmpeg -hide_banner -y -re -i “/Volumes/Andy/Desktop/Odd Frames.mkv” -i “/Users/Andy/Desktop/Even Frames.mkv” -i “/Volumes/Andy/Desktop/Original.mkv” -r 25 -fps_mode cfr -filter_complex “[0:v][1:v] interleave” -c:v hevc_videotoolbox -profile:v main -tag:v hvc1 -pix_fmt yuv420p -allow_sw 1 -g 30 -b:v 0 -q:v 82 -c:a copy “/Volumes/SSD/Final.mkv”
After another few seconds delay, Final.mkv can then be viewed by VLC in realtime locally or via network. VLC is the only app I know of that periodically re-reads the file header allowing for the file to be viewed while it’s still being written. Out of interest, does anyone know of other video player apps which do that? It would be nice to have alternatives to VLC.
Andy