Skip to content

Videos: Stream OGV, VP8, VP9, AV1, WebM, and HEVC if supported #440 #513 #2379 #2461

@lastzero

Description

@lastzero

As a user with a browser that supports OGV, VP8, VP9, AV1, WebM, and/or HEVC, I want to instantly watch videos in these formats without transcoding to AVC.

PR #2379 adds optional HEVC support to avoid transcoding to AVC when using Safari. Rather than just auto-detecting this particular codec, it seemed reasonable to add support for other common video formats and containers, without waiting for follow-up feature requests.

This change also introduces bitrate limiting so that high bitrate videos can still be transcoded before streaming:

  • The API endpoint limits the video bitrate based on what has been configured with PHOTOPRISM_FFMPEG_BITRATE.
  • If the bitrate is higher, videos in supported formats will also be transcoded, unless FFmpeg has been disabled.
  • Note that videos that have already been transcoded will not be re-transcoded when the limit changes. To do this, you would have to manually delete them from the sidecar folder and then run photoprism convert in a terminal (or play them so that transcoding happens on demand).

Based on these enhancements, contributors should be able to add more formats and/or tweak browser support detection as needed. Special thanks to Andre Carrera @acarrera94 for the original pull request #2379 and pushing this forward!

Metadata

Metadata

Assignees

Labels

enhancementEnhancement or improvement of an existing featurefrontendRequires experience with HTML/JS/CSSreleasedAvailable in the stable releaseuxImpacts User ExperiencevideoVideo Formats, Transcoding, FFmpeg, Streaming & Co

Type

No type

Projects

Status

Release 🌈

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions