Skip to content

Videos: Add config options for FFmpeg Preset, Quality, and Device #4969

Description

@lastzero

As a user with special performance requirements, quality requirements, or multiple GPUs, I would like to explicitly configure these parameters if the encoder I have selected supports it.

With these changes, the list of configuration options for FFmpeg will look as follows (note that the bitrate limit only affects when/if videos of other formats are transcoded, it NO LONGER determines the encoding quality or performance):

Environment CLI Flag Default Description
PHOTOPRISM_FFMPEG_BIN --ffmpeg-bin ffmpeg FFmpeg COMMAND for video transcoding and thumbnail extraction
PHOTOPRISM_FFMPEG_ENCODER --ffmpeg-encoder libx264 FFmpeg AVC video encoder NAME
PHOTOPRISM_FFMPEG_SIZE --ffmpeg-size 4096 encoding resolution limit in PIXELS (720-7680)
PHOTOPRISM_FFMPEG_QUALITY --ffmpeg-quality 50 encoding QUALITY (1-100, where 100 is almost lossless)
PHOTOPRISM_FFMPEG_BITRATE --ffmpeg-bitrate 60 bitrate LIMIT in Mbps for forced transcoding of non-AVC videos (1-960; -1 to disable)
PHOTOPRISM_FFMPEG_PRESET --ffmpeg-preset fast FFmpeg compression PRESET when using an encoder that supports it, e.g. fast, medium, or slow
PHOTOPRISM_FFMPEG_DEVICE --ffmpeg-device FFmpeg device PATH when using a hardware encoder that supports it as parameter
PHOTOPRISM_FFMPEG_MAP_VIDEO --ffmpeg-map-video 0:v:0 transcoding video stream MAP
PHOTOPRISM_FFMPEG_MAP_AUDIO --ffmpeg-map-audio 0:a:0? transcoding audio stream MAP

Related Issues:

Metadata

Metadata

Assignees

Labels

configGlobal Configuration, CLI Flags, and Environment VariablesperformancePerformance OptimizationvideoVideo Formats, Transcoding, FFmpeg, Streaming & Co

Type

Projects

Status
Release 🌈

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions