feat(transcode): add HDR video proxy support and playback (#424)

* feat(transcode): add HDR output proxy support

* fix(transcode): auto-detect MoltenVK Vulkan ICD on macOS for libplacebo filters

* fix(transcode): split filter in generateSprite to ensure poster uses tone-mapped stream

* docs(changelog): update docs/changelog.mdx and ignore in prettier

* fix(transcode): respect video rotation metadata to preserve display aspect ratio

* fix(webui): render native video with hardware EDR acceleration instead of 2D canvas

* fix(webui): show HDR label on mobile video control bar

* fix(share): preserve hdr flag on watermarked video transcodes

* fix(webui): differentiate HDR download options in video player

* fix(transcode): handle Dolby Vision Profile 5 via standard HDR pipeline without libplacebo

* fix(transcode): prepend setparams filter to prevent zscale colorspace path error for DV P5

* refactor(transcode): simplify HDR proxies to always produce HDR without SDR setting
This commit is contained in:
Yiling-J
2026-09-24 14:32:47 +08:00
committed by GitHub
parent f579947770
commit c3375ee935
38 changed files with 1986 additions and 164 deletions
+1
View File
@@ -55,6 +55,7 @@ async function applyWatermarkToAssetMedia(
width: vt.width ?? 0,
height: vt.height ?? 0,
size: 0,
hdr: vt.hdr,
})),
)
: []
+45
View File
@@ -418,6 +418,51 @@ describe('Share API', () => {
expect(body.media.imageTranscodes).toEqual([])
})
test('serves watermarked transcodes with hdr flags preserved when watermark enabled and completed', async () => {
vi.spyOn(shareService, 'verifyPublicAccess').mockResolvedValue(shareLinkWithWatermark)
vi.spyOn(watermarkService, 'getCompletedWatermarkMediaMap').mockResolvedValue(
new Map([
[
'file1',
watermarkMediaInfo({
videoTranscodes: [
{ key: 'files/watermarked-1080p.mp4', width: 1920, height: 1080, hdr: false },
{ key: 'files/watermarked-1080p-hdr.mp4', width: 1920, height: 1080, hdr: true },
],
}),
],
]),
)
const res = await app.request('/shares/share1/files/file1', {
method: 'GET',
headers: { 'x-share-password': 'pass' },
})
expect(res.status).toBe(200)
const body = await res.json()
expect(body.media.videoTranscodes).toEqual([
{
id: 'files/watermarked-1080p.mp4',
url: 'http://s3/presigned',
key: 'files/watermarked-1080p.mp4',
width: 1920,
height: 1080,
size: 0,
hdr: false,
},
{
id: 'files/watermarked-1080p-hdr.mp4',
url: 'http://s3/presigned',
key: 'files/watermarked-1080p-hdr.mp4',
width: 1920,
height: 1080,
size: 0,
hdr: true,
},
])
})
test('serves empty transcode arrays while watermark transcoding is in flight', async () => {
vi.spyOn(shareService, 'verifyPublicAccess').mockResolvedValue(shareLinkWithWatermark)
vi.spyOn(watermarkService, 'getCompletedWatermarkMediaMap').mockResolvedValue(new Map())