From 1b6ff4572648d874045775f2b6f1f6a8eb062474 Mon Sep 17 00:00:00 2001 From: Claudio Date: Mon, 11 May 2026 22:40:05 +0200 Subject: [PATCH] feat(playback): transcode HEVC .mov to H.264 MP4 on first hit iPhone .mov files are HEVC Main 10 with codec_tag hvc1. Safari decodes that fine; Chrome and Firefox refuse 10-bit HEVC entirely, which the browser surfaces as "playback is not supported" against the existing /original endpoint. Confirmed against the user's 26-05-01 13-13-26 0525.mov: codec_name=hevc, profile=Main 10, audio=aac/48kHz. New endpoint /photos/{id}/playback handles this transparently: - check the on-disk cache at /data/video-cache/{id}.mp4 first; serve if newer than the source - passthrough h264 in mp4/m4v/webm containers (ffprobe to confirm) - otherwise transcode src -> H.264 8-bit MP4 with libx264 fast/CRF 23, audio re-encoded to AAC because the iPhone 16 ships APAC audio that no browser can decode; +faststart for progressive load - atomic publish via tmp + os.replace so a failed run never leaves a half-written cache entry - HTTP Range support so