---
updatedAt: 2026-07-30T09:26:04.000Z
agentTools:
  siteIndex: https://developer.bitmovin.com/llms.txt
  projectIndex: https://developer.bitmovin.com/encoding/llms.txt
---

# Create fMP4 muxing

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "VOD Encoding API",
    "description": "Bitmovins API Reference Description",
    "version": "3.0",
    "termsOfService": "https://bitmovin.com",
    "contact": {
      "name": "Bitmovin Inc",
      "url": "https://bitmovin.com",
      "email": "support@bitmovin.com"
    }
  },
  "servers": [
    {
      "url": "https://api.bitmovin.com/v1",
      "description": "Bitmovin Server",
      "variables": {}
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "ApiKeyAuth": [],
      "TenantOrgId": []
    }
  ],
  "paths": {
    "/encoding/encodings/{encoding_id}/muxings/fmp4": {
      "post": {
        "tags": [
          "FMP4 Muxing"
        ],
        "summary": "Create fMP4 muxing",
        "operationId": "PostEncodingEncodingsMuxingsFmp4ByEncodingId",
        "x-bitmovin": {
          "product": "shared"
        },
        "parameters": [
          {
            "name": "encoding_id",
            "in": "path",
            "description": "Id of the encoding.",
            "style": "simple",
            "required": true,
            "schema": {
              "type": "string",
              "example": "f3177c2e-0000-4ba6-bd20-1dee353d8a72"
            }
          }
        ],
        "requestBody": {
          "description": "The fMP4 muxing to be created",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Fmp4Muxing"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "result": {
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/Fmp4Muxing"
                                },
                                {
                                  "description": "fMP4 muxing"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "description": "Your Bitmovin API key",
        "name": "X-Api-Key",
        "in": "header"
      },
      "TenantOrgId": {
        "type": "apiKey",
        "description": "Your Bitmovin account organization",
        "name": "X-Tenant-Org-Id",
        "in": "header"
      }
    },
    "schemas": {
      "BitmovinResource": {
        "title": "BitmovinResource",
        "allOf": [
          {
            "$ref": "#/components/schemas/BitmovinResponse"
          },
          {
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the resource. Can be freely chosen by the user.",
                "example": "Name of the resource"
              },
              "description": {
                "type": "string",
                "description": "Description of the resource. Can be freely chosen by the user.",
                "example": "Description of the resource"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "readOnly": true,
                "description": "Creation timestamp, returned as UTC expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ",
                "example": "2016-06-25T20:09:23.69Z"
              },
              "modifiedAt": {
                "type": "string",
                "format": "date-time",
                "readOnly": true,
                "description": "Modified timestamp, returned as UTC expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ",
                "example": "2016-06-25T20:09:23.69Z"
              },
              "customData": {
                "type": "string",
                "writeOnly": true,
                "description": "User-specific meta data. This can hold anything.",
                "additionalProperties": {
                  "type": "object"
                }
              }
            }
          }
        ]
      },
      "BitmovinResponse": {
        "title": "BitmovinResponse",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "description": "Id of the resource",
            "example": "cb90b80c-8867-4e3b-8479-174aa2843f62"
          }
        }
      },
      "AclEntry": {
        "title": "AclEntry",
        "required": [
          "permission"
        ],
        "properties": {
          "scope": {
            "description": "Deprecation notice: The value of this property is not being used. It can be chosen arbitrarily or not set at all",
            "deprecated": true,
            "type": "string",
            "example": "public"
          },
          "permission": {
            "description": "",
            "allOf": [
              {
                "$ref": "#/components/schemas/AclPermission"
              }
            ]
          }
        }
      },
      "AclPermission": {
        "title": "AclPermission",
        "type": "string",
        "enum": [
          "PUBLIC_READ",
          "PRIVATE"
        ]
      },
      "EncodingOutput": {
        "title": "EncodingOutput",
        "required": [
          "outputId",
          "outputPath"
        ],
        "properties": {
          "outputId": {
            "type": "string",
            "description": "Id of the corresponding output",
            "example": "55354be6-0237-42bb-ae85-a2d4ef1ed19e"
          },
          "outputPath": {
            "type": "string",
            "description": "Subdirectory where to save the files to",
            "example": "/encodings/movies/movie-1/video_720/"
          },
          "acl": {
            "description": "Determines accessibility of files written to this output. Only applies to output types that support ACLs. Defaults to PUBLIC_READ if the list is empty. The destination (e.g. cloud storage bucket) needs to allow the configured ACL",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AclEntry"
            }
          }
        }
      },
      "Fmp4Muxing": {
        "title": "Fmp4Muxing",
        "required": [
          "segmentLength"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/Muxing"
          },
          {
            "properties": {
              "segmentLength": {
                "type": "number",
                "format": "double",
                "description": "Length of the fragments in seconds",
                "example": 4
              },
              "minimumSegmentLength": {
                "type": "number",
                "format": "double",
                "description": "Prevents creation of very short segments (in seconds). If the last segment is shorter than minimumSegmentLength or there is a custom keyframe too close to a segment boundary, short segments will be omitted by removing segment boundaries, resulting in a segment of a size up to segmentLength + minimumSegmentLength.",
                "example": 1,
                "default": 0
              },
              "segmentNaming": {
                "type": "string",
                "description": "Segment naming policy",
                "example": "seg_%number%.m4s"
              },
              "segmentNamingTemplate": {
                "type": "string",
                "description": "Segment naming policy containing one or both of the following placeholders:\n- '{rand_chars:x}', which will be replaced by a random alphanumeric string of length x (default 32)\n  on each (re)start of the encoding. The resulting string will be copied to the segmentNaming property.\n  Intended to avoid re-use of segment names after restarting a live encoding.\n- '{segment_rand_chars:x}', which will be replaced by a random alphanumeric string of length x (default 32)\n  for each different segment. This is intended to avoid guessing segment URLs by replacing segment numbers.\n\nIf segmentNamingTemplate is set, segmentNaming must not be set.\n",
                "example": "seg_%number%_{rand_chars:4}.m4s"
              },
              "initSegmentName": {
                "type": "string",
                "description": "Init segment name",
                "example": "init.mp4"
              },
              "initSegmentNameTemplate": {
                "type": "string",
                "description": "Segment naming policy containing a placeholder of the format '{rand_chars:x}', which will be replaced by a random alphanumeric string of length x (default 32) on each (re)start of the encoding. The resulting string will be copied to the initSegmentName property. Intended to avoid re-use of segment names after restarting a live encoding. If initSegmentNameTemplate is set, initSegmentName must not be set.",
                "example": "init_{rand_chars:4}.mp4"
              },
              "writeDurationPerSample": {
                "type": "boolean",
                "description": "Writes the duration per sample into the sample entry in the Track Fragment Run Box. This could help to fix playback issues on legacy players. Enabling this flag increases the muxing overhead by 4 bytes per sample/frame.",
                "example": false
              },
              "signalScte35AsEmsg": {
                "type": "boolean",
                "description": "Insert scte35 triggers as emsg boxes into the fMP4 segments.",
                "example": false
              },
              "segmentsMuxed": {
                "type": "integer",
                "format": "int32",
                "readOnly": true,
                "description": "Number of segments which have been encoded",
                "example": 64
              },
              "ptsAlignMode": {
                "description": "Alignment mode for composition / presentation timestamps (CTS/PTS). Only applies to h.264 and h.265",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PTSAlignMode"
                  }
                ]
              }
            }
          }
        ]
      },
      "PTSAlignMode": {
        "title": "PTSAlignMode",
        "type": "string",
        "description": "Alignment mode for PTS",
        "enum": [
          "ALIGN_ZERO_NEGATIVE_CTO"
        ],
        "example": "ALIGN_ZERO_NEGATIVE_CTO",
        "x-enum-elements": [
          {
            "name": "ALIGN_ZERO_NEGATIVE_CTO",
            "description": "Align the initial PTS to zero using negative CTS offsets. This is achieved by using `trun` version 1 boxes in the mp4 fragments."
          }
        ]
      },
      "IgnoredBy": {
        "title": "IgnoredBy",
        "type": "string",
        "enum": [
          "CONDITION"
        ]
      },
      "Ignoring": {
        "title": "Ignoring",
        "properties": {
          "ignoredBy": {
            "readOnly": true,
            "description": "",
            "allOf": [
              {
                "$ref": "#/components/schemas/IgnoredBy"
              }
            ]
          },
          "ignoredByDescription": {
            "type": "string",
            "readOnly": true,
            "description": "Describes why ignoredBy has been set to its current value.",
            "example": "Condition 'MyCondition' violated."
          }
        }
      },
      "Link": {
        "title": "Link",
        "required": [
          "href"
        ],
        "properties": {
          "href": {
            "type": "string",
            "description": "webpage target URL",
            "example": "https://bitmovin.com/encoding-documentation/bitmovin-api/#/reference/encoding/manifests/add-period"
          },
          "title": {
            "type": "string",
            "description": "Short description of the linked page",
            "example": "how to add a period to a manifest"
          }
        }
      },
      "Message": {
        "title": "Message",
        "required": [
          "type",
          "text"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/BitmovinResponse"
          },
          {
            "properties": {
              "type": {
                "description": "Message type giving a hint on the importance of the message (log level)",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MessageType"
                  }
                ]
              },
              "text": {
                "type": "string",
                "description": "Message text",
                "example": "field must not be empty"
              },
              "field": {
                "type": "string",
                "description": "Name of the field to which the message is referring to",
                "example": "manifestId"
              },
              "links": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Link"
                },
                "description": "collection of links to webpages containing further information on the topic"
              },
              "more": {
                "type": "object",
                "description": "Service-specific information"
              },
              "date": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the message occurred",
                "example": "2016-06-25T20:09:23.69Z"
              }
            }
          }
        ]
      },
      "MessageType": {
        "title": "MessageType",
        "type": "string",
        "enum": [
          "ERROR",
          "WARNING",
          "INFO",
          "DEBUG",
          "TRACE"
        ]
      },
      "Muxing": {
        "title": "Muxing",
        "required": [
          "streams"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/BitmovinResource"
          },
          {
            "properties": {
              "streams": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MuxingStream"
                }
              },
              "outputs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EncodingOutput"
                }
              },
              "avgBitrate": {
                "type": "integer",
                "format": "int64",
                "readOnly": true,
                "description": "Average bitrate. Available after encoding finishes.",
                "example": 128000
              },
              "minBitrate": {
                "type": "integer",
                "format": "int64",
                "readOnly": true,
                "description": "Min bitrate. Available after encoding finishes.",
                "example": 110000
              },
              "maxBitrate": {
                "type": "integer",
                "format": "int64",
                "readOnly": true,
                "description": "Max bitrate. Available after encoding finishes.",
                "example": 132000
              },
              "ignoredBy": {
                "type": "array",
                "readOnly": true,
                "description": "This read-only property is set during the analysis step of the encoding. If it contains items, the Muxing has been ignored during the encoding process according to its 'streamConditionsMode'",
                "items": {
                  "$ref": "#/components/schemas/Ignoring"
                }
              },
              "streamConditionsMode": {
                "description": "Specifies how to proceed with the Muxing when some of its Streams are ignored (see 'condition' property of the Stream resource). The settings only make a difference for Muxings with more than one Stream. When retrieving the resource after the analysis step of the encoding has finished, 'ignoredBy' will indicate if and why it has been ignored.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/StreamConditionsMode"
                  }
                ],
                "example": "DROP_STREAM"
              }
            }
          }
        ]
      },
      "MuxingStream": {
        "title": "MuxingStream",
        "required": [
          "streamId"
        ],
        "properties": {
          "streamId": {
            "type": "string",
            "example": "f3177c2e-0000-4ba6-bd20-1dee353d8a72"
          }
        }
      },
      "ResponseEnvelope": {
        "title": "ResponseEnvelope",
        "required": [
          "requestId",
          "status",
          "data"
        ],
        "properties": {
          "requestId": {
            "type": "string",
            "readOnly": true,
            "description": "Unique correlation id",
            "example": "6d84e126-d10c-4e52-bbfb-bd4c92bc8333"
          },
          "status": {
            "description": "Response status information",
            "readOnly": true,
            "example": "SUCCESS",
            "allOf": [
              {
                "$ref": "#/components/schemas/ResponseStatus"
              }
            ]
          },
          "data": {
            "description": "Response information",
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ResultWrapper"
              }
            ]
          },
          "more": {
            "type": "object",
            "description": "Additional endpoint specific information"
          }
        }
      },
      "ResponseError": {
        "title": "ResponseError",
        "required": [
          "requestId",
          "status",
          "data"
        ],
        "properties": {
          "requestId": {
            "type": "string",
            "readOnly": true,
            "description": "Unique correlation id",
            "example": "6d84e126-d10c-4e52-bbfb-bd4c92bc8333"
          },
          "status": {
            "description": "Response status information",
            "readOnly": true,
            "example": "ERROR",
            "allOf": [
              {
                "$ref": "#/components/schemas/ResponseStatus"
              }
            ]
          },
          "data": {
            "description": "Response information",
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ResponseErrorData"
              }
            ]
          }
        }
      },
      "ResponseErrorData": {
        "title": "ResponseErrorData",
        "required": [
          "code",
          "message",
          "developerMessage"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "readOnly": true,
            "description": "Contains an error code as defined in https://bitmovin.com/encoding-documentation/bitmovin-api/#/introduction/api-error-codes\n",
            "example": 1005
          },
          "message": {
            "type": "string",
            "readOnly": true,
            "description": "General error message"
          },
          "developerMessage": {
            "type": "string",
            "readOnly": true,
            "description": "More detailed message meant for developers"
          },
          "links": {
            "type": "array",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "description": "collection of links to webpages containing further information on the topic"
          },
          "details": {
            "type": "array",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "description": "collection of messages containing more detailed information on the cause of the error"
          }
        }
      },
      "ResponseStatus": {
        "title": "ResponseStatus",
        "type": "string",
        "enum": [
          "SUCCESS",
          "ERROR"
        ]
      },
      "ResultWrapper": {
        "title": "ResultWrapper",
        "properties": {
          "result": {
            "type": "object",
            "readOnly": true
          }
        }
      },
      "StreamConditionsMode": {
        "title": "StreamConditionsMode",
        "type": "string",
        "default": "DROP_MUXING",
        "enum": [
          "DROP_MUXING",
          "DROP_STREAM"
        ],
        "x-enum-elements": [
          {
            "name": "DROP_MUXING",
            "description": "The whole muxing will be ignored if at least one of its Streams is ignored"
          },
          {
            "name": "DROP_STREAM",
            "description": "Ignored Streams will be omitted from the muxing. The muxing will only be ignored if all of its Streams are ignored"
          }
        ]
      }
    }
  },
  "tags": [
    {
      "name": "FMP4 Muxing"
    }
  ]
}
```