Skip to content
Media CloudDocs
Happy HolidaysSave 20% with codeValid through December 31Shop the sale
Video Encoding Variables
On this page

Video Encoding Variables

Environment variables for Mux, Cloudflare Stream, Bunny Stream and api.video encoding settings.

4 min read·4 tags

Every video encoding setting maps to an environment variable by uppercasing its option name and replacing hyphens with underscores.

Common

VariableTypeDescription
MCLOUD_TOOL_ENABLED_VIDEO_ENCODINGbooleanEnables the video encoding tool.
MEDIA_CLOUD_VIDEO_ENCODING_PROVIDERstringProvider: mux, cloudflare-stream, bunny-stream, or api-video.
MCLOUD_TOOL_ENABLED_VIDEO_PLAYERbooleanEnables the video player.

Mux

VariableTypeDescription
MEDIA_CLOUD_MUX_TOKEN_IDstringMux API token ID.
MEDIA_CLOUD_MUX_TOKEN_SECRETstringMux API token secret.
MEDIA_CLOUD_MUX_WEBHOOK_SECRETstringMux webhook signing secret.
MEDIA_CLOUD_MUX_ENV_KEYstringMux environment key for analytics.
MEDIA_CLOUD_MUX_NORMALIZE_AUDIObooleanNormalize audio loudness.
MEDIA_CLOUD_MUX_PER_TITLE_ENCODINGbooleanEnable per-title encoding.
MEDIA_CLOUD_MUX_TEST_MODEbooleanUse Mux test assets.
MEDIA_CLOUD_MUX_PLAYERstringPlayer: none, videojs, or hlsjs.
MEDIA_CLOUD_MUX_PLAYER_AIR_PLAYbooleanEnable AirPlay.
MEDIA_CLOUD_MUX_PLAYER_QUALITY_SELECTbooleanEnable quality selection.
MEDIA_CLOUD_MUX_PLAYER_FILMSTRIPSbooleanGenerate player filmstrips.
MEDIA_CLOUD_MUX_PLAYER_OVERRIDE_NATIVEbooleanOverride native HLS handling.
MEDIA_CLOUD_MUX_PLAYER_ANALYTICS_MODEstringnone, gtag, or other.
MEDIA_CLOUD_MUX_PLAYER_MP4_FALLBACKbooleanUse an MP4 fallback.
MEDIA_CLOUD_MUX_PLAYER_MP4_PREFERRED_QUALITYstringlow.mp4, medium.mp4, or high.mp4.
MEDIA_CLOUD_MUX_SECURE_VIDEObooleanEnable signed video URLs.
MEDIA_CLOUD_MUX_SECURE_VIDEO_EXPIRATIONintSigned URL lifetime in minutes.
MEDIA_CLOUD_MUX_SECURE_THUMBNAIL_EXPIRATIONintSigned thumbnail lifetime in minutes.
MEDIA_CLOUD_MUX_SECURE_GIF_EXPIRATIONintSigned GIF lifetime in minutes.
MEDIA_CLOUD_MUX_SECURE_KEY_ROTATIONintHours between signing key rotations.
MEDIA_CLOUD_MUX_WATERMARK_ENABLEDbooleanEnable the watermark.
MEDIA_CLOUD_MUX_WATERMARK_IMAGEintWatermark attachment ID.
MEDIA_CLOUD_MUX_WATERMARK_WIDTHintWatermark width.
MEDIA_CLOUD_MUX_WATERMARK_VERTICAL_ALIGNstringtop, middle, or bottom.
MEDIA_CLOUD_MUX_WATERMARK_VERTICAL_MARGINintVertical margin in pixels.
MEDIA_CLOUD_MUX_WATERMARK_HORIZONTAL_ALIGNstringleft, center, or right.
MEDIA_CLOUD_MUX_WATERMARK_HORIZONTAL_MARGINintHorizontal margin in pixels.
MEDIA_CLOUD_MUX_WATERMARK_OPACITYintWatermark opacity (0–100).
MEDIA_CLOUD_MUX_PROCESS_UPLOADSbooleanImport uploaded videos into Mux.
MEDIA_CLOUD_MUX_DELETE_UPLOADSbooleanDelete Mux assets when attachments are deleted.

Cloudflare Stream

VariableTypeDescription
MEDIA_CLOUD_CLOUDFLARE_STREAM_ACCOUNT_IDstringCloudflare account ID.
MEDIA_CLOUD_CLOUDFLARE_STREAM_API_KEYstringAPI token with Account → Stream → Edit.
MEDIA_CLOUD_CLOUDFLARE_STREAM_CDN_URLurlCustomer subdomain, including scheme.
MEDIA_CLOUD_CLOUDFLARE_STREAM_WEBHOOK_HOSTurlPublic base URL for the webhook.
MEDIA_CLOUD_CLOUDFLARE_STREAM_PROCESS_UPLOADSbooleanImport uploaded videos.
MEDIA_CLOUD_CLOUDFLARE_STREAM_DELETE_FROM_STREAMbooleanDelete Stream videos when attachments are deleted.
MEDIA_CLOUD_CLOUDFLARE_USE_EMBED_PLAYERbooleanUse Cloudflare’s embedded player.
MEDIA_CLOUD_CLOUDFLARE_SECURE_VIDEObooleanEnable signed video URLs.
MEDIA_CLOUD_CLOUDFLARE_SECURE_VIDEO_EXPIRATIONintSigned URL lifetime in minutes.
MEDIA_CLOUD_CLOUDFLARE_ALLOWED_ORIGINSstringAllowed embed origins, one per line.
MEDIA_CLOUD_CLOUDFLARE_ROTATE_KEYSbooleanRotate signing keys.
MEDIA_CLOUD_CLOUDFLARE_KEY_EXPIRATIONintSigning key lifetime in days.
MEDIA_CLOUD_CLOUDFLARE_EXCLUDE_PRIVATE_FROM_RESTbooleanHide private video sources from WP-REST.
MEDIA_CLOUD_CLOUDFLARE_STREAM_WATERMARKstringWatermark configuration JSON.

Bunny Stream

VariableTypeDescription
MEDIA_CLOUD_BUNNY_STREAM_LIBRARY_IDstringBunny Stream library ID.
MEDIA_CLOUD_BUNNY_STREAM_API_KEYstringBunny Stream library API key.
MEDIA_CLOUD_BUNNY_STREAM_CDN_URLurlLibrary CDN URL, including scheme.
MEDIA_CLOUD_BUNNY_STREAM_PROCESS_UPLOADSbooleanImport uploaded videos.
MEDIA_CLOUD_BUNNY_STREAM_DELETE_FROM_STREAMbooleanDelete Bunny videos when attachments are deleted.
MEDIA_CLOUD_BUNNY_USE_EMBED_PLAYERbooleanUse Bunny’s embedded player.
MEDIA_CLOUD_BUNNY_SECURE_VIDEObooleanEnable token-authenticated playback.
MEDIA_CLOUD_BUNNY_SECURE_TOKENstringBunny token authentication key.
MEDIA_CLOUD_BUNNY_SECURE_VIDEO_EXPIRATIONintSigned URL lifetime in minutes.
MEDIA_CLOUD_BUNNY_EXCLUDE_PRIVATE_FROM_RESTbooleanHide private video sources from WP-REST.

api.video

VariableTypeDescription
MEDIA_CLOUD_APIVIDEO_API_KEYstringapi.video API key.
MEDIA_CLOUD_APIVIDEO_SANDBOX_MODEbooleanUse the api.video sandbox.
MEDIA_CLOUD_APIVIDEO_WEBHOOK_HOSTurlPublic base URL for the webhook.
MEDIA_CLOUD_APIVIDEO_PROCESS_UPLOADSbooleanImport uploaded videos.
MEDIA_CLOUD_APIVIDEO_DELETE_FROM_STREAMbooleanDelete api.video assets when attachments are deleted.
MEDIA_CLOUD_APIVIDEO_USE_EMBED_PLAYERbooleanUse api.video’s embedded player.
MEDIA_CLOUD_APIVIDEO_WATERMARKstringWatermark configuration JSON.

Notes

  • Webhook URLs are derived from the site URL or the configured webhook host. They must be publicly reachable.
  • Boolean variables accept true/false or 1/0.
  • Values set in the environment override the corresponding database option.

Need a hand with this guide?

Send support the exact step you’re stuck on and we’ll help you finish the setup.

Contact support
Start typing to search the docs

Escto close·⌘Kto open

View all results →