{"record":{"id":"25ed7242a5db1c7f","repo":"remotion-dev/remotion","slug":"expected-cueclusterposition","errorCode":null,"errorMessage":"Expected CueClusterPosition","messagePattern":"Expected CueClusterPosition","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/media-parser/src/containers/webm/seek/format-cues.ts","lineNumber":45,"sourceCode":"\t\t\t(c) => c.type === 'CueTrackPositions',\n\t\t);\n\t\tif (!cueTrackPositions) {\n\t\t\tthrow new Error('Expected CueTrackPositions');\n\t\t}\n\n\t\tconst cueTimeValue = cueTime.value.value;\n\t\tconst cueTrack = cueTrackPositions.value.find(\n\t\t\t(_c) => _c.type === 'CueTrack',\n\t\t);\n\t\tif (!cueTrack) {\n\t\t\tthrow new Error('Expected CueTrack');\n\t\t}\n\n\t\tconst cueClusterPosition = cueTrackPositions.value.find(\n\t\t\t(_c) => _c.type === 'CueClusterPosition',\n\t\t);\n\t\tif (!cueClusterPosition) {\n\t\t\tthrow new Error('Expected CueClusterPosition');\n\t\t}\n\n\t\tconst cueRelativePosition = cueTrackPositions.value.find(\n\t\t\t(_c) => _c.type === 'CueRelativePosition',\n\t\t);\n\n\t\tconst matroskaCue: MatroskaCue = {\n\t\t\ttrackId: cueTrack.value.value,\n\t\t\ttimeInTimescale: cueTimeValue,\n\t\t\tclusterPositionInSegment: cueClusterPosition.value.value,\n\t\t\trelativePosition: cueRelativePosition?.value.value ?? 0,\n\t\t};\n\n\t\tmatroskaCues.push(matroskaCue);\n\t}\n\n\treturn matroskaCues;\n};","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/media-parser/src/containers/webm/seek/format-cues.ts#L27-L63","documentation":"Inside a CueTrackPositions, formatCues requires a CueClusterPosition child (the absolute byte position of the cluster within the Segment); without it the cue cannot resolve to a byte offset for seeking, so parsing throws.","triggerScenarios":"A CueTrackPositions element that lacks CueClusterPosition - incomplete seek table entry. Note CueRelativePosition is optional (it uses ?.value ?? 0), but CueClusterPosition is mandatory.","commonSituations":"Corrupt Cues section, partially written seek index, or non-conformant muxer.","solutions":["Re-mux with ffmpeg to rebuild the seek table.","Re-encode from the original source.","Try Mediabunny."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await parseMedia({src: 'in.mkv', fields: {durationInSeconds: true}});\n} catch (err) {\n  if (err instanceof Error && /Expected CueClusterPosition/.test(err.message)) {\n    throw new Error('Incomplete CueClusterPosition; re-mux the file.', {cause: err});\n  }\n  throw err;\n}","preventionTips":["Re-mux to rebuild CueClusterPosition values.","Finalize live muxer output before parsing.","Keep a fallback source/parser."],"tags":["webm","matroska","media-parser","cues","seek","malformed-file"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}