PhxMediaLibrary.VideoProcessor.Null (PhxMediaLibrary v0.6.1)

Copy Markdown View Source

No-op video processor used when FFmpeg is not available.

All operations return error tuples rather than raising. Uploads still succeed and files are stored and served — metadata extraction and poster frame generation are simply skipped.

To enable video processing, install FFmpeg:

# macOS
brew install ffmpeg

# Ubuntu / Debian
apt-get install ffmpeg

Once installed, PhxMediaLibrary.VideoProcessor.FFmpeg is selected automatically on the next application start (no configuration required).

Summary

Functions

Always returns false — FFmpeg is not available.

Returns {:error, :ffmpeg_not_available}.

Returns {:error, :ffmpeg_not_available}.

Functions

available?()

@spec available?() :: boolean()

Always returns false — FFmpeg is not available.

extract_metadata(file_path)

@spec extract_metadata(String.t()) :: {:error, :ffmpeg_not_available}

Returns {:error, :ffmpeg_not_available}.

extract_poster(file_path, offset_seconds \\ 0.0)

@spec extract_poster(String.t(), float()) :: {:error, :ffmpeg_not_available}

Returns {:error, :ffmpeg_not_available}.