Commit graph

67 commits

Author SHA1 Message Date
Cathie Integra
3f096a592b Links: Use canonical trailing-slash form for website URLs 2026-06-24 17:20:30 +02:00
Michael Mayer
9e5b94189e Video: Recognize MagicYUV in the probe and exclude the VFW wrapper #5617
Recognize MagicYUV sample entries in the built-in go-mp4 probe and consider the
probe's codec in addition to the metadata codec when applying the FFmpeg exclude
list, so a video can be matched even when one detector misses it. Rename the
shared sample-entry scan limit to CodecHeadScanLimit.

Also exclude the Matroska Video for Windows wrapper (v_ms/vfw/fourcc) by default,
since its actual codec is not exposed by metadata and the format is uncommon.
2026-05-30 21:29:12 +00:00
Michael Mayer
b223d12ff2 FFmpeg: Document hardware AVC encoder packages #5631 #5630
Add README files for the vaapi, intel, nvidia, and vulkan encoder packages
covering the FFmpeg flags, devices, supported formats, required system packages,
and FFmpeg 8 notes such as the VA-API filter-device requirement.
2026-05-30 20:14:14 +00:00
Michael Mayer
5242964330 FFmpeg: Fix duplicate hwupload in Vulkan transcoding command #5631
encode.FormatNV12 already ends in hwupload, so appending it again produced
"format=nv12,hwupload,hwupload", which fails because the frames are already on
the GPU. Build the filter from FormatNV12 directly to upload exactly once, and
add a gated Vulkan case to the transcode command tests.
2026-05-30 20:14:14 +00:00
Michael Mayer
c5b5362649 FFmpeg: Use PHOTOPRISM_FFMPEG_TEST_ENCODER to opt into HW tests #5630
The transcode tests gated their real hardware run on PHOTOPRISM_FFMPEG_ENCODER,
but the package init() unconditionally unset that variable, so the hardware path
never executed and an FFmpeg 8 regression like #5630 could pass unnoticed.

Switch the opt-in to a dedicated PHOTOPRISM_FFMPEG_TEST_ENCODER variable so real
VAAPI/QSV/NVENC transcodes run when enabled on a matching host, while a runtime
PHOTOPRISM_FFMPEG_ENCODER value still cannot trigger them by accident.
2026-05-30 19:02:16 +00:00
Michael Mayer
465d8e0245 FFmpeg: Fix VAAPI transcoding by setting the filter device #5630
FFmpeg 8 no longer derives a filter hardware device from "-hwaccel
vaapi" alone, so the "format=nv12,hwupload" step aborts with "A hardware
device reference is required to upload frames to." and PhotoPrism falls
back to software encoding.

Initialize a named VAAPI device and reference it for both decoding
(-hwaccel_device) and filtering (-filter_hw_device). When no device path
is configured, FFmpeg auto-detects the default render node.
2026-05-30 17:40:21 +00:00
Michael Mayer
80ac70cc6a FFmpeg: Use atomic.Pointer for thread-safe Exclude list access #5617 2026-05-26 15:57:59 +00:00
Michael Mayer
d2e8c7afad Config: Add option to exclude video formats from FFmpeg #5617 2026-05-26 15:36:42 +00:00
Michael Mayer
570a563748 Docs: Bump copyright year to 2026 in Go package headers 2026-05-25 14:39:38 +00:00
Michael Mayer
822cbf325a FFmpeg: Add h264_vulkan video transcoding support #5592 2026-05-21 09:44:41 +00:00
Michael Mayer
12dbe82d36 Video: Tag HEVC remux output hvc1 and unify MP4 chunk scans #5593
Signed-off-by: Michael Mayer <michael@photoprism.app>
2026-05-20 17:57:40 +02:00
Michael Mayer
6867626c9a Docs: Shorten "Context & Constraints" to "Constraints"
Signed-off-by: Michael Mayer <michael@photoprism.app>
2026-02-14 08:23:27 +01:00
Michael Mayer
43bca10b4e CI: Apply Go linter recommendations to "internal/ffmpeg" package #5330
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-11-22 12:58:11 +01:00
Michael Mayer
94b6631b3d Test: Use PascalCase names for all Go subtests in /internal
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-10-02 14:50:02 +02:00
Michael Mayer
9315e87d45 NVIDIA: Refactor ffmpeg.DefaultAvcEncoder() function
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-30 22:51:10 +02:00
Michael Mayer
e888b0ddb1 FFmpeg: Remove unstable "directory is unwritable" tests
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-27 11:46:27 +02:00
Michael Mayer
bae8ceb3a7 Auth: Support asymmetric JSON Web Tokens (JWT) and Key Sets (JWKS) #5230
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-25 17:52:44 +02:00
Michael Mayer
cb81f9be12 FFmpeg: Add descriptions to encoder packages in internal/ffmpeg/
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-25 14:20:35 +02:00
Michael Mayer
61ced7119c Auth: Refactor cluster configuration and provisioning API endpoints #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-24 08:28:38 +02:00
Michael Mayer
91804b9652 Backend: Improve Copy()/Move() and increase pkg/internal test coverage
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-22 03:07:51 +02:00
Michael Mayer
c36bb566af Videos: Refine still image extraction with ffmpeg #5189
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-03 11:44:09 +02:00
Michael Mayer
ff2c3b9559 Videos: Skip non-keyframes when extracting images with FFmpeg #5189
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-01 18:02:23 +02:00
Michael Mayer
10f15431ff Videos: Set timestamps to zero when remuxing containers to MP4 #4982
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-06-30 09:35:26 +02:00
Michael Mayer
2e2ebab433 Videos: Improve downloading, remuxing, and transcoding #4982 #4892 #5040
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-06-09 15:31:23 +02:00
graciousgrey
1a794da1fe Tests: Add unit tests #4969 2025-05-07 12:03:50 +02:00
Michael Mayer
8faf3fc918 Import: Add ytdl package for downloading videos from URLs #4982
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-05-02 10:04:34 +02:00
Michael Mayer
eb4fc032ff Config: Add preset, quality, and device options for FFmpeg #4969
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-04-27 14:36:36 +02:00
Michael Mayer
f73b703123 Videos: Increase transcoding bitrate limit default to 60 Mbps #1307
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-04-24 11:59:29 +02:00
Michael Mayer
a76bbba2a6 FFmpeg: Fix Intel Quick Sync Video (QSV) hardware transcoding #4382
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-03-28 16:31:20 +01:00
Michael Mayer
67811d87fa Videos: Create fragmented MP4s when transcoding with FFmpeg #4892
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-03-24 20:47:57 +01:00
Michael Mayer
df09c78ee1 Videos: Add "codec" search filter and auto-enable nvidia encoder #4848
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-03-10 14:30:25 +01:00
Michael Mayer
9d1c97425c FFmpeg: Refactor internal/ffmpeg/transcode_cmd.go #4604
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-01-09 10:38:56 +01:00
Michael Mayer
e2195d535e FFmpeg: Refactor extraction of JPEG and PNG images from videos #4604
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-01-09 10:24:53 +01:00
Michael Mayer
bbb30e6a33 FFmpeg: Add tests, refactor package, and split into sub-packages #4604
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-01-08 18:27:33 +01:00
Michael Mayer
fdddf37704 FFmpeg: Add "-strict -2" command flag to allow transcoding of VVC videos
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-01-05 17:04:45 +01:00
Michael Mayer
e2a7e50ca4 FFmpeg: Add filter "format=nv12" for Intel QSV video transcoding #4380
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-07 07:48:59 +02:00
Michael Mayer
ad92443585 Videos: Update assertions in internal/ffmpeg/convert_test.go #4181
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-05-30 10:12:03 +02:00
Michael Mayer
2e644809f4 Video: Fix bitrate flag value in convert_test.go #4030 #4052
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-02-07 18:17:41 +01:00
Michael Mayer
cb232be687 Video: Remove vpp_qsv=framerate from Intel QSV filter #4030 #4052
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-02-07 17:37:59 +01:00
Michael Mayer
f0e25cb1e9 Video: Add filter to Intel QSV FFmpeg transcoding flags #4030 #4052
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-02-07 17:25:57 +01:00
Michael Mayer
9264a7f754 Video: Enable full hardware transcoding for Intel CPUs #4030 #4052
TODO: The (optional) video downscaling filter has been commented out
and must be re-added before releasing these changes.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-02-07 15:59:05 +01:00
Michael Mayer
0ca37b2c92 Docs: Update year in backend and frontend package file headers
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-05 16:38:36 +01:00
Michael Mayer
529103462c Index: Add native support for MP4 and Samsung/Google Motion Photos #439
Related Issues:
- Samsung: Initial support for Motion Photos (#439)
- Google: Initial support for Motion Photos (#1739)
- Metadata: Flag Samsung/Google Motion Photos as Live Photos (#2788)

Related Pull Requests:
- Live Photos: Add Support for Samsung Motion Photos (#3588)
- Samsung: Improved support for Motion Photos (#3660)
- Google: Initial support for Motion Photos (#3709)
- Google: Add support for Motion Photos (#3722)

Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-09-22 23:59:56 +02:00
Michael Mayer
4154649c76 FFmpeg: Remove deprecated "-vsync vfr" command flag #3659
See issue comments for details. This also introduces a package constant
for the default ffmpeg command name and updates the tests.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-09-06 11:27:24 +02:00
graciousgrey
b5b13b0fbb Tests: Add unit tests 2023-07-20 20:06:27 +02:00
graciousgrey
4727f769d2 Tests: Add unit tests 2023-07-20 20:02:02 +02:00
Michael Mayer
3cf1c699df Video: Refactor FFmpeg Transcoding Size Limit #3466 #3498 #3549
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-07-18 15:15:04 +02:00
Michael Mayer
cc5ff21b4a Video: Add transcoding libs and improve error handling #3466
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-07-15 15:17:41 +02:00
Lukas
19ac83dd20
Config: Downscale videos based on largest dimension (#3510)
* Adds resolution limit

* Fixes 2 video filters and makes the env variable work

* Adds FFMPEG_RESOLUTION to all the docker-compose files

* Makes the resolution based on the longer side

* Fixes failing test
2023-06-29 10:07:47 +02:00
Lukas
83d10ea00e
Config: Add video transcoding resolution option (#3498)
* Adds resolution limit

* Fixes 2 video filters and makes the env variable work

* Adds FFMPEG_RESOLUTION to all the docker-compose files
2023-06-28 15:22:52 +02:00