* feat(agent): support AI embedding, autofill, and read_asset for 3D assets
* feat(agent): support 3D degree comments, markup annotations, and config3d in read_asset
* fix(agent): resolve 3D session annotations to turntable degree frame time
* feat(transcode): add 3D asset support and turntable viewer
* perf(turntable): stream file via Bun.file and increase upload timeout
* feat(turntable): increase upload timeout to 15m to support 5GB uploads
* fix(webui): align 3D model viewer layout and full-width control bar with video viewer
* feat(webui): unify 3D viewer bottom bar and redesign cyclic ruler slider
- Place RulerSlider in single row with playback and zoom controls, centered with max 320px width
- Flank RulerSlider with minus and plus buttons to step angle by 15°
- Redesign RulerSlider with fixed center indicator and moving cyclic track with continuous 360° wrapping
- Render major ticks longer at 60° intervals without numeric text labels on track
- Display floating degree tooltip above center indicator only during dragging
* fix(webui): prevent RulerSlider from collapsing to 0px width in control bar
- Use flex layout with flex-1 on left and right clusters to preserve center cluster width
- Enforce min-w-[140px] and w-full on RulerSlider
- Fix tooltip positioning and remove outer overflow-hidden
* feat(webui): snap RulerSlider track directly to discrete 15° ticks during drag
* fix(webui): prevent ruler snap-back caused by floating point second truncation
- Use Math.round instead of Math.floor in secondToDegree to avoid 0.999996 dropping to previous frame
- Ensure final dragDegree is committed on pointer up
* fix(webui): fix arrow key frame rounding and duplicate event bubbling
- Use Math.round instead of Math.floor for keyboard arrow frame navigation in ModelViewer
- Add e.stopPropagation() to RulerSlider keyboard events to prevent duplicate bubbling to window listener
* feat(webui): redesign RulerSlider with encapsulated step buttons and capsule pill track
* feat(webui): make RulerSlider responsive on mobile and remove bottom bar reset button
* fix(webui): load 3d video directly without poster and invert drag rotation to counterclockwise
* fix(webui): fix 3d asset viewer frame seeking and drag jitter
* feat(transcode): show 3D asset poster preview immediately after render start
* fix(viewer): synchronize 3D turntable playback via frame callback to prevent skipped degrees
* fix(viewer): handle touchpad zoom gestures and prevent page zoom in 3D viewer
* fix(viewer): eliminate 3D model rotation jitter at 345 degrees
* fix(share): watermark 3D asset turntable video on share links
* fix(share): preserve video transcode resolution on watermarked share links
* fix(viewer): download original 3D model file instead of rendered turntable MP4
* fix(transcode): apply EXIF orientation to image transcodes and reported size
Cameras and phones store portrait shots as landscape pixels plus an EXIF
orientation tag. sharp ignores the tag and the webp output drops it, so
thumbnails, previews, watermarked share-link images and annotated snapshots
came out sideways, and getImageInfo reported width and height swapped
(a 5152x7728 portrait recorded as 7728x5152).
RAW previews keep their existing handling: transcodeImage still rotates them
from the RAW container orientation and only auto-orients inputs without one,
so RAW and non-RAW images are never rotated twice.
- transcodeImage: autoOrient non-RAW input and size previews from the
oriented dimensions.
- getImageInfo: report metadata.autoOrient dimensions for non-RAW images.
- compositeOverlayToWebpFile and overlayAnnotationsOnBuffer: autoOrient
the original, and draw annotations in the displayed coordinate space.
- Tests: service tests that reproduce the bug and guard against double
rotation of RAW, and a workflow e2e case with a real 600x400 JPEG tagged
orientation 6 that must come out 400x600.
* refactor(transcode): share orientation helper and test all 8 EXIF orientations
Move the autoOrient decision and the displayed-size lookup into orientedSharpOptions and displayedDimensions so getImageInfo, transcodeImage, compositeOverlayToWebpFile and overlayAnnotationsOnBuffer share one rule: auto-orient unless a RAW container orientation was already applied. Behavior is unchanged.
Add transcode.orientation.test.ts, which runs real sharp over a quadrant-colored JPEG tagged with each of the 8 EXIF orientations and checks the reported and transcoded size plus the top-left and bottom-right corner colors.
* fix(transcode): never auto-orient dcraw output
The dcraw_emu fallback reports orientation undefined because LibRaw already rotates upright, so transcodeImage applied autoOrient to the TIFF and could rotate twice if it kept an Orientation tag. extractAndValidateRawPreview now flags the fallback result as orientationApplied and transcodeImage treats it as already oriented (autoOrient false). Tests cover both the dcraw path and an embedded preview with no container orientation.
---------
Co-authored-by: Bristopher <Bristopher@users.noreply.github.com>
* feat(transcode): add hardware decoding support for nvenc, qsv, and rkmpp
* refactor(transcode): eliminate redundant hardware decode gating and dead condition
* feat(transcode): decode and scale on the GPU for VA-API transcodes
When the selected encoder is h264_vaapi, decode with -hwaccel vaapi and
scale with scale_vaapi so frames stay in GPU memory, instead of decoding
and scaling on the CPU and hwupload-ing before the encoder. On a Haswell
iGPU this makes 4K proxy/HLS renditions 3-5x faster.
Fallback order: GPU decode + VA-API encode -> software decode + VA-API
encode (previous behavior) -> libx264. Watermark overlays, HDR sources
and rotated sources skip GPU decode: ffmpeg cannot auto-insert its
rotation filter on hardware frames, so rotated input would otherwise come
out sideways instead of failing. SHUMAI_VAAPI_HW_DECODE=false disables it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(transcode): document VA-API GPU decoding and SHUMAI_VAAPI_HW_DECODE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(transcode): generic hardware decode config, stall watchdog, reuse probed rotation
Follow-ups from comparing with Immich and Jellyfin:
- Replace the VA-API-specific helpers with a per-encoder HW_DECODE_CONFIGS
table (input args, output args, GPU scale filter) and build the MP4 and
HLS input/filter graph in one shared method so the paths cannot drift.
Only h264_vaapi has an entry; other backends can be added once tested on
real hardware. The opt-out is now SHUMAI_HW_DECODE=false.
- Kill a GPU-decode attempt with SIGKILL when its output stops growing for
SHUMAI_HW_DECODE_STALL_TIMEOUT (default 120s) and fall back, since some
VA-API driver failures hang ffmpeg instead of exiting (immich#31933).
- Add -noautoscale on the GPU-decode path so a mid-stream decoder reinit
(e.g. 1080 -> 1088) cannot auto-insert a software scaler into the GPU
graph (jellyfin#17133).
- Pass the rotation already probed into MediaMetadata through the workflow
and activities as sourceRotation; ffprobe only runs when it is missing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(transcode): avoid selecting attached picture streams for video transcoding
Filter out attached picture streams (disposition.attached_pic) during video probing and stream selection, matching Immich's default and bitrate selection strategy. Forward explicit primary video and audio stream indices to FFmpeg pipelines to prevent picking embedded cover art or thumbnail streams.
* fix(transcode): skip poster and sprite generation for audio-only assets and add multi-stream e2e tests
* test(workflow): scope pixel format to h264 stream and use yuvj420p for mjpeg cover art
- Add centralized RAW file extension set and detection helper for 23 common camera RAW formats
- Update getProxyType and EXTENSION_MIME_TYPES to route RAW formats into the image pipeline
- Add exiftool-vendored runtime dependency and mark as external in build-npm script
- Implement embedded JPEG extraction to temporary file with priority JpgFromRaw2 -> JpgFromRaw -> PreviewImage
- Read and apply EXIF orientation from RAW container to prevent rotation/mirroring issues
- Integrate into TranscodeService.getImageInfo and transcodeImage with proper temporary file cleanup
- Add hasUsablePreview guard in transcodeImageWorkflow to gracefully handle RAW files without embedded previews
- Add unit, service, workflow, and E2E tests for RAW processing
* feat(transcode): optimize video sprite generation with seek pool and compositing
* fix(transcode): handle abort signal during and after sharp compositing
* 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
* fix(transcode): preserve trashed status during background jobs and handle permanent purge
* fix(workflow): clear heartbeat and add info logs on task cancellation
* fix(transcode): terminate media processes and guard task activities on cancellation
- Pass AbortSignal to ffmpeg and pdftoppm child processes in transcodeService to terminate processes on task cancellation
- Add local task AbortController context and cancellation guards in executeActivity to prevent subsequent workflow activities
- Forward taskId and cancellation signals in transcode, screenshot, and PDF activities
- Use updateMany instead of update in task activities to eliminate Prisma P2025 errors on purged task records
* fix(workflow): allow cleanup activities in finally blocks during task cancellation
Remove blanket cancellation check in executeActivity so that workflows can execute cleanup and failure handling activities in catch and finally blocks upon cancellation, while relying on AbortSignal in active activities to abort execution.
* docs(changelog): improve user friendliness of changelog entries and formatting example
* docs(agents): update changelog guidelines to emphasize end-user friendly descriptions
* fix(transcode): handle queued cancellation and delete races in media workflow
* feat(premiere-uxp): use native Bun bundler and build script instead of Vite
* feat(premiere-uxp): switch FileListView to use Search API consistent with WebUI
* feat(premiere-uxp): add on-demand jpeg preview conversion for uxp compatibility
* feat(premiere-uxp): integrate spectrum web components (swc)
* fix(premiere-uxp): align swc packages with 0.37.0 and fix auth layout
* feat(premiere-uxp): use horizontal 2-column card view for projects and files
* style(premiere-uxp): enlarge file preview by 20% and add row padding
* fix(premiere-uxp): prevent card squishing and overflow with large item counts
* fix(premiere-uxp): change host in manifest to single object
* docs(premiere-uxp): add AGENTS.md with SWC preferences and UXP layout rules
* feat(premiere-uxp): integrate spectrum web components across plugin views
* fix(premiere-uxp): remove breadcrumb icons and use slash separator
* feat(premiere-uxp): add collapsible folder and file sections with infinite scroll
* feat(premiere-uxp): update file card layout with right column info and clean preview
* fix(premiere-uxp): use raw text for file card details and fix black icons
* style(premiere-uxp): use contain object-fit and black background for file card preview
* fix(premiere-uxp): refine header logo, sticky title bars, circular badges, and controls
* fix(premiere-uxp): replace stroke icons with spectrum workflow icons
* fix(premiere-uxp): switch icon buttons to swc sp-button with icon-only and slot=icon
* fix(premiere-uxp): vertically center endpoint text in header
* feat(premiere-uxp): add asset and proxy import support into Premiere Pro
- Implement context menu on file cards with left-click, right-click, and more action button triggers
- Support raw file import for non-video assets and video assets
- Support video proxy submenu listing ready transcode resolutions
- Add UXP native file picker save dialog and binary download orchestration
- Call Premiere Pro project.importFiles API to import downloaded assets into active project
- Add non-blocking toast notification banner for progress and status reporting
- Add unit tests for premiere host service and import orchestration
* fix(premiere-uxp): anchor import menu directly to file card using sp-action-menu
- Replace custom fixed-position ContextMenu with native SWC sp-action-menu
- Anchor menu directly to the triggered file card rather than the top-left window corner
- Support programmatic opening on file card click/contextmenu via imperative handle
- Support video submenu with Original and ready proxy options inside sp-action-menu
- Lazy load video proxies on menu open or hover
- Clean up obsolete fixed-position styles and unused backdrop overlays
* fix(premiere-uxp): align SWC packages to 0.37.0 and guard custom element registry
- Downgrade action-menu and menu SWC packages to 0.37.0 to match the rest of the workspace
- Eliminate duplicate icons-ui and sp-icon-chevron100 customElements.define calls
- Add polyfill guard to customElements.define to prevent duplicate registration errors during UXP reload
* fix(premiere-uxp): polyfill window.matchMedia for Adobe UXP
- Add window.matchMedia polyfill in polyfills.ts
- Satisfies SWC MatchMediaController used by ActionMenu and PickerBase in UXP
- Prevents TypeError when opening files page
* feat(premiere-uxp): replace context menu with card download action and video import dialog
* fix(premiere-uxp): resolve download url before save, pass null targetBin, and center download icon
* fix(premiere-uxp): resolve raw download url via download-url endpoint with fallback
* feat(premiere-uxp): use native folder picker and auto-increment conflict suffixes
* feat(premiere-uxp): add sequence linking, comment-marker sync, and navigation tabs
- Add sequence-to-asset linking with persistent project metadata storage
- Support one-way comment-to-marker timeline synchronization
- Add two-tab navigation (Sequences and Browse) using Spectrum buttons
- Add LinkSequenceDialog, SequencesView, and autoSyncService background engine
- Enforce Spectrum Workflow Icons and UXP layout rules
* feat(premiere-uxp): refine UI layouts, card interactions, and search box activation
* fix(premiere-uxp): set compact fixed width for file list search box
* fix(premiere-uxp): ensure search box click activation across full width in UXP
* fix(premiere-uxp): revert search box hacks and restore simple default sp-search layout
* feat(premiere-uxp): sync non-timestamped comments as markers at time 0
* feat(premiere-uxp): change link icon to unlink when asset is linked in file card
* fix(premiere-uxp): sync linked sequences between host project and browse view
* feat(premiere-uxp): remove synced markers on sequence unlink matching Frame.io
* fix(premiere-uxp): ensure reliable marker GUID capture, normalization, and fallback on unlink
* fix(premiere-uxp): use official Shumai logo for plugin manifest icons
* fix(premiere-uxp): use official PNG icons for manifest and plugin entrypoints
* refactor(premiere-uxp): use single 114x114 icon for plugin and panel
* feat(premiere-uxp): show file version in file list page file card
* build(premiere-uxp): check in built ccx package and update packaging configuration
* fix(premiere-uxp): address code review findings for media conversion, marker sync, and link scoping
- Reset hasJpegCover on project cover update and hasJpegPreview on asset media transcode
- Only advance synced comment metadata after confirmed marker transaction
- Normalize GUID keys and lookups in AutoSyncService map
- Restrict cached sequence link lookups to project-specific keys and prevent cross-project leakage on empty sequences
- Update built CCX distribution package
* feat(transcode): optimize video operations using ffmpeg http range requests
* fix(transcode): preserve non-retryable errors and ensure mapConcurrent settles on rejection
* chore(deps): upgrade bun to 1.4.2 and update packages
- Upgrade Bun to 1.4.2 in Dockerfile, CI workflows, and release workflows.
- Update dependencies across workspace with Bun 1.4.2.
- Preserve @earendil-works/pi-agent-core at 0.82.1.
- Retain stable compatible versions for database adapters and pdfjs-dist.
- Add explicit Buffer type annotation in transcode service.
* chore(deps): upgrade prisma to 7.10.0, pg to 8.23.0, and pdfjs-dist to 6.3.289
* chore(deps): revert dotenv-expand to 13.0.0
* feat(transcode): add hardware-accelerated video transcoding support
* feat(transcode): use encoder quality modes and source-capped maxrate for video transcode
* fix(transcode): scale max bitrate for downsampled preview framerates
* fix(transcode): propagate videoBitRate in getMediaInfoActivity and update auto description
* feat(sharelink): add sharelink watermark support
* fix(sharelink): harden watermark feature against races, crashes, and tenant leaks
Addresses review findings on the sharelink watermark feature:
- fix(watermark): read back sharelink via transaction client so the
updateShareLinkWatermark response reflects the just-committed state
(global-client reads on a pooled connection miss uncommitted changes)
- fix(watermark): use prisma upsert on the config hash instead of
find-then-create to avoid P2002 races on concurrent enables
- fix(watermark): resolve nested symlinks when walking the share tree and
batch the walk level-by-level instead of one query per node
- fix(watermark): keep watermark tasks in flight from being purged by
orphan-config GC (avoids FK violations in completing activities)
- fix(transcode): re-transcode stale 'processing' watermark rows instead
of silently skipping (crash recovery); downscale embedded block images;
use pino structured logging; drop unused any casts
- fix(api): scope watermark-template list/create to the caller's teams,
reject teamless template creation, and make teamless templates
read-only; validate watermark config required when enabling (400);
map sharelink-not-found to 404
- fix(api): resolve symlink target ids once in public share children
endpoint instead of twice per item
- refactor(db): dedicated WatermarkFileStatus enum (migration included)
- test: activity unit tests (init crash recovery, image + video transcode
paths), concurrent upsert, nested-symlink resolution, API scoping and
validation, e2e video watermark path
* refactor(transcode): move sharp usage out of watermark activity into transcodeService
The transcode package does not declare sharp as a dependency (only
@shumai/core does), so importing it directly in the watermark activity
broke CI typecheck for the transcode package.
- add transcodeService.renderSvgToPng, downscaleImageToPng and
compositeOverlayToWebpFile encapsulating the sharp logic
- watermark activity now calls these methods instead of importing sharp
- activity tests mock the new methods (no sharp/real fixture needed)
- add unit tests for the new transcodeService helpers
* feat(watermark): restrict watermark transcode to existing image and video transcodes
* refactor(transcode): reuse transcodeVideo in watermark activity
* refactor(watermark): use Bun.hash instead of node crypto for watermark config hash
* refactor(watermark): move computeWatermarkConfigHash from dtos to core watermark-hash module
* refactor(api): delegate watermark DB queries from public-share route to watermarkService
* refactor(share): replace dynamic watermarkService import with static import
* feat(watermark): add waitForWatermarkFileActivity for in-flight watermark transcoding tasks
* refactor(asset): replace dynamic watermarkService import with static import
* test(watermark): harden purgeOrphanWatermarkConfigs coverage
Replace the single happy-path GC test with a dedicated suite covering:
- orphan config with proxies: purged, watermarkFiles removed, all four
proxy keys deleted from S3 while the original key is preserved
- config still referenced by a share link is not purged
- config with pending/processing transcode_watermark tasks is not purged
(in-flight guard), but completed tasks do not block purging
- pending tasks of other types (transcode_video) do not protect a config
- an S3 delete failure is non-fatal: remaining keys still deleted and the
config is still purged
- mixed run: only the orphan config is purged while a referenced one
survives (exact count assertion)
* feat(webui): add sharelink watermark editor and sidebar controls
* style(webui): enlarge watermark editor dialog and allocate 2/3 width to preview column
* fix(webui): override sm:max-w-lg in DialogContent to allow full 1400px width
* fix(webui): stop block click propagation and remove preview mode toggles
* fix(webui): store watermark block size as fraction of canvas width
The editor stored block.size in pixels (slider 10-120px, preview
fontSize: `${block.size}px`) while the SVG generator
(generateWatermarkSvg) interprets size as a fraction (0..1) of canvas
width. A 36px block therefore rendered as a ~36x-canvas glyph covering
the entire image.
- Keep backend fraction semantics (canvasWidth * size) so watermarks
scale proportionally with output resolution across proxies
- Editor: defaults (text 5%, image 15%), slider ranges (1-12% / 2-50%)
and number input now work in percent, storing a fraction
- Preview: scales blocks by the measured canvas width so WYSIWYG
- DTO schema: size constrained to (0..1) to enforce the contract
- Update DTO/editor tests to fraction sizes
* feat(webui): add single-row aspect ratio selector and 5 predefined background colors to watermark editor preview
* feat(webui): update aspect ratio to multi-toggle group and enable dot-grid pattern for all background colors
* fix(webui): update background swatches to distinct colors and share PRESET_BACKGROUND_OPTIONS array
* fix(webui): hide redundant absolute close button on watermark editor dialog header
* fix(transcode): skip raw video transcode when generating watermark proxies
The raw marker entry (isRaw: true) in videoTranscodes points at the
original source file and is only used to offer the 'Original' playback
option. It is not a transcoded proxy, so watermarking it produced a
redundant full-resolution transcode (the most expensive pass) plus an
unneeded S3 upload.
Skip entries with isRaw: true in transcodeWatermarkMediaActivity, and
cover the behavior with a unit regression test plus an e2e assertion
that exactly one watermark proxy is produced for a video asset.
* feat(webui): replace watermark image asset ID with 1MB file uploader
* fix(webui): correct watermark editor preview block sizing
The preview canvas width was measured in a useEffect([open]) that ran
before the Radix Dialog had mounted its content, so canvasRef.current was
still null, canvasWidthPx stayed 0, and every block silently fell back to
the hardcoded 640px width (block.size * (canvasWidthPx || 640)). A 100%
size therefore rendered at ~640px on an ~876px canvas (~72%), making the
preview smaller than the real watermarked output for both image and text
blocks.
- Measure the canvas via a ref callback (fires exactly when the node
mounts, regardless of dialog mount timing) and keep a ResizeObserver
attached for aspect-ratio/window changes.
- Use clientWidth (padding-box width) instead of getBoundingClientRect(),
which includes the dialog's zoom-in-95 animation transform.
- Drop max-w-full/max-h-full on the preview <img> so logos scale up to
the block size like the backend SVG rendering does, instead of being
capped at their natural pixel size.
* fix(webui): keep watermark editor preview aspect ratio and restore config scroll
- Compute the preview canvas size with a JS contain-fit (ResizeObserver on the
frame) instead of relying on CSS aspect-ratio + w-full/max-h-full, which
broke the selected ratio on wide-and-short (or tall-and-narrow) windows.
- Add min-h-0 to the config ScrollArea so it shrinks to the column's remaining
height instead of growing to its content height, restoring the scroll range.
* fix(webui): remove toast notification on template load
* fix(share): serve per-file watermark proxies in public share APIs
Stop gating watermark replacement on the share-link-wide watermarkStatus.
Public share endpoints now resolve each asset's own completed watermark
proxy and:
- replace videoTranscodes/imageTranscodes with the watermarked entries
when the watermark file is completed;
- empty those arrays when no completed proxy exists yet (still
transcoding or failed) so original, unwatermarked media is never
exposed while a newly added file is being processed;
- leave non-video/image media (pdf, audio, ...) untouched, since they
never receive watermark transcodes.
This removes the previous behavior where adding a file to a ready
watermark share flipped the whole share link to processing and served
original media for every file until the new transcode finished.
Adds API tests for detail/children endpoints (ready, in-flight, pdf, and
watermark-disabled cases) and a workflow E2E test for adding an asset to
an already-ready watermark sharelink.