# FragmentedMp4Extractor

Artifact: [androidx.media3:media3-extractor](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/extractor/mp4/FragmentedMp4Extractor.java+class:androidx.media3.extractor.mp4.FragmentedMp4Extractor)

*** ** * ** ***


```
@UnstableApi
class FragmentedMp4Extractor : Extractor
```

<br />

*** ** * ** ***

Extracts data from the FMP4 container format.

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/kotlin/androidx/annotation/IntDef(flag = true, value = ) annotation https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor.Flags` Flags controlling the behavior of the extractor. |

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorsFactory!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FACTORY()` **This property is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#newFactory(androidx.media3.extractor.text.SubtitleParser.Factory)` instead. <br /> |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_DISABLE_ARTWORK_METADATA() = 1024` Flag to disable parsing of artwork metadata. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_DISABLE_HAGC_METADATA() = 2048` Flag to disable parsing of HAGC (ST 2094-50) metadata. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_EMIT_RAW_MEBX_DATA() = 4096` Flag to emit `mebx` tracks as raw `https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes#APPLICATION_MEBX()` tracks without converting `it35` keys to `https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes#APPLICATION_ITUT_T35()` or unboxing sample payloads, regardless of whether `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_DISABLE_HAGC_METADATA()` is set. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_EMIT_RAW_SUBTITLE_DATA() = 32` Flag to use the source subtitle formats without modification. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_ENABLE_EMSG_TRACK() = 4` Flag to indicate that the extractor should output an event message metadata track. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_MERGE_FRAGMENTED_SIDX() = 256` Flag to enable reading and merging of all sidx boxes before continuing extraction. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_READ_MFRA_FOR_SEEK_MAP() = 512` Flag to enable reading the 'mfra' box for seeking in fragmented MP4s. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME() = 1` Flag to work around an issue in some video streams where every frame is marked as a sync frame. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_WORKAROUND_IGNORE_EDIT_LISTS() = 16` Flag to ignore any edit lists in the stream. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_WORKAROUND_IGNORE_TFDT_BOX() = 2` Flag to ignore any tfdt boxes in the stream. |

| ### Public constructors |
|---|
| `[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor())()` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory)` instead <br /> |
| `[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(int))(@https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor.Flags flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int)` instead <br /> |
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory)(subtitleParserFactory: https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory!)` Constructs an instance. |
| `[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(int,androidx.media3.common.util.TimestampAdjuster))( @https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor.Flags flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, timestampAdjuster: https://developer.android.com/reference/kotlin/androidx/media3/common/util/TimestampAdjuster? )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>,androidx.media3.extractor.TrackOutput)` instead <br /> |
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int)( subtitleParserFactory: https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory!, @https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor.Flags flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Constructs an instance. |
| `[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track))( @https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor.Flags flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, timestampAdjuster: https://developer.android.com/reference/kotlin/androidx/media3/common/util/TimestampAdjuster?, sideloadedTrack: https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/Track? )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>,androidx.media3.extractor.TrackOutput)` instead <br /> |
| `[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>))( @https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor.Flags flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, timestampAdjuster: https://developer.android.com/reference/kotlin/androidx/media3/common/util/TimestampAdjuster?, sideloadedTrack: https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/Track?, closedCaptionFormats: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/Format!>! )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>,androidx.media3.extractor.TrackOutput)` instead <br /> |
| `[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>,androidx.media3.extractor.TrackOutput))( @https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor.Flags flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, timestampAdjuster: https://developer.android.com/reference/kotlin/androidx/media3/common/util/TimestampAdjuster?, sideloadedTrack: https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/Track?, closedCaptionFormats: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/Format!>!, additionalEmsgTrackOutput: https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput? )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>,androidx.media3.extractor.TrackOutput)` instead <br /> |
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>,androidx.media3.extractor.TrackOutput)( subtitleParserFactory: https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory!, @https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor.Flags flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, timestampAdjuster: https://developer.android.com/reference/kotlin/androidx/media3/common/util/TimestampAdjuster?, sideloadedTrack: https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/Track?, closedCaptionFormats: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/Format!>!, additionalEmsgTrackOutput: https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput? )` Constructs an instance. |

| ### Public functions |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/kotlin/androidx/media3/extractor/SniffFailure!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#getSniffFailureDetails()()` Returns additional details about the last call to `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#sniff(androidx.media3.extractor.ExtractorInput)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#init(androidx.media3.extractor.ExtractorOutput)(output: https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput!)` Initializes the extractor with an `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput`. |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorsFactory!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#newFactory(androidx.media3.extractor.text.SubtitleParser.Factory)(subtitleParserFactory: https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory!)` Creates a factory for `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor` instances with the provided `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder)(input: https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput!, seekPosition: https://developer.android.com/reference/kotlin/androidx/media3/extractor/PositionHolder!)` Extracts data read from a provided `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#release()()` Releases all kept resources. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#seek(long,long)(position: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Notifies the extractor that a seek has occurred. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#sniff(androidx.media3.extractor.ExtractorInput)(input: https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput!)` Returns whether this extractor can extract samples from the `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput`, which must provide data from the start of the stream. |

| ### Protected functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/Track?` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#modifyTrack(androidx.media3.extractor.mp4.Track)(track: https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/Track?)` |

### Inherited Constants

From [androidx.media3.extractor.Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_CONTINUE() = 0`

Returned by `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder)` if the `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput` passed to the next `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder)` is required to provide data continuing from the position in the stream reached by the returning call.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_END_OF_INPUT() = -1`

Returned by `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder)` if the end of the `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput` was reached.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_SEEK() = 1`

Returned by `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder)` if the `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput` passed to the next `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder)` is required to provide data starting from a specified position in the stream.

### Inherited functions

From [androidx.media3.extractor.Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor) `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor!` `@https://checkerframework.org/api/org/checkerframework/dataflow/qual/SideEffectFree.html
https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#getUnderlyingImplementation()()`

Returns the 'real' `Extractor` implementation if this is a delegating instance, or `
this` if this instance does the extraction directly without delegating (the default behaviour).

## Constants

### FACTORY

```
const val FACTORY: ExtractorsFactory!
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#newFactory(androidx.media3.extractor.text.SubtitleParser.Factory)` instead.

### FLAG_DISABLE_ARTWORK_METADATA

```
const val FLAG_DISABLE_ARTWORK_METADATA = 1024: Int
```

Flag to disable parsing of artwork metadata.

### FLAG_DISABLE_HAGC_METADATA

```
const val FLAG_DISABLE_HAGC_METADATA = 2048: Int
```

Flag to disable parsing of HAGC (ST 2094-50) metadata.

### FLAG_EMIT_RAW_MEBX_DATA

```
const val FLAG_EMIT_RAW_MEBX_DATA = 4096: Int
```

Flag to emit `mebx` tracks as raw `https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes#APPLICATION_MEBX()` tracks without converting `it35` keys to `https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes#APPLICATION_ITUT_T35()` or unboxing sample payloads, regardless of whether `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_DISABLE_HAGC_METADATA()` is set.

### FLAG_EMIT_RAW_SUBTITLE_DATA

```
const val FLAG_EMIT_RAW_SUBTITLE_DATA = 32: Int
```

Flag to use the source subtitle formats without modification. If unset, subtitles will be transcoded to `https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes#APPLICATION_MEDIA3_CUES()` during extraction.

### FLAG_ENABLE_EMSG_TRACK

```
const val FLAG_ENABLE_EMSG_TRACK = 4: Int
```

Flag to indicate that the extractor should output an event message metadata track. Any event messages in the stream will be delivered as samples to this track.

### FLAG_MERGE_FRAGMENTED_SIDX

```
const val FLAG_MERGE_FRAGMENTED_SIDX = 256: Int
```

Flag to enable reading and merging of all sidx boxes before continuing extraction.

### FLAG_READ_MFRA_FOR_SEEK_MAP

```
const val FLAG_READ_MFRA_FOR_SEEK_MAP = 512: Int
```

Flag to enable reading the 'mfra' box for seeking in fragmented MP4s.

### FLAG_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME

```
const val FLAG_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME = 1: Int
```

Flag to work around an issue in some video streams where every frame is marked as a sync frame. The workaround overrides the sync frame flags in the stream, forcing them to false except for the first sample in each segment.

This flag does nothing if the stream is not a video stream.

### FLAG_WORKAROUND_IGNORE_EDIT_LISTS

```
const val FLAG_WORKAROUND_IGNORE_EDIT_LISTS = 16: Int
```

Flag to ignore any edit lists in the stream.

### FLAG_WORKAROUND_IGNORE_TFDT_BOX

```
const val FLAG_WORKAROUND_IGNORE_TFDT_BOX = 2: Int
```

Flag to ignore any tfdt boxes in the stream.

## Public constructors

### FragmentedMp4Extractor

```
[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor())()
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory)` instead

### FragmentedMp4Extractor

```
[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(int))(@FragmentedMp4Extractor.Flags flags: Int)
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int)` instead

### FragmentedMp4Extractor

```
FragmentedMp4Extractor(subtitleParserFactory: SubtitleParser.Factory!)
```

Constructs an instance.

| Parameters |
|---|---|
| `subtitleParserFactory: https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory!` | The `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory` for parsing subtitles during extraction. |

### FragmentedMp4Extractor

```
[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(int,androidx.media3.common.util.TimestampAdjuster))(
    @FragmentedMp4Extractor.Flags flags: Int,
    timestampAdjuster: TimestampAdjuster?
)
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>,androidx.media3.extractor.TrackOutput)` instead

### FragmentedMp4Extractor

```
FragmentedMp4Extractor(
    subtitleParserFactory: SubtitleParser.Factory!,
    @FragmentedMp4Extractor.Flags flags: Int
)
```

Constructs an instance.

| Parameters |
|---|---|
| `subtitleParserFactory: https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory!` | The `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory` for parsing subtitles during extraction. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor.Flags flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Flags that control the extractor's behavior. |

### FragmentedMp4Extractor

```
[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track))(
    @FragmentedMp4Extractor.Flags flags: Int,
    timestampAdjuster: TimestampAdjuster?,
    sideloadedTrack: Track?
)
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>,androidx.media3.extractor.TrackOutput)` instead

### FragmentedMp4Extractor

```
[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>))(
    @FragmentedMp4Extractor.Flags flags: Int,
    timestampAdjuster: TimestampAdjuster?,
    sideloadedTrack: Track?,
    closedCaptionFormats: (Mutable)List<Format!>!
)
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>,androidx.media3.extractor.TrackOutput)` instead

### FragmentedMp4Extractor

```
[FragmentedMp4Extractor](https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>,androidx.media3.extractor.TrackOutput))(
    @FragmentedMp4Extractor.Flags flags: Int,
    timestampAdjuster: TimestampAdjuster?,
    sideloadedTrack: Track?,
    closedCaptionFormats: (Mutable)List<Format!>!,
    additionalEmsgTrackOutput: TrackOutput?
)
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FragmentedMp4Extractor(androidx.media3.extractor.text.SubtitleParser.Factory,int,androidx.media3.common.util.TimestampAdjuster,androidx.media3.extractor.mp4.Track,java.util.List<androidx.media3.common.Format>,androidx.media3.extractor.TrackOutput)` instead

### FragmentedMp4Extractor

```
FragmentedMp4Extractor(
    subtitleParserFactory: SubtitleParser.Factory!,
    @FragmentedMp4Extractor.Flags flags: Int,
    timestampAdjuster: TimestampAdjuster?,
    sideloadedTrack: Track?,
    closedCaptionFormats: (Mutable)List<Format!>!,
    additionalEmsgTrackOutput: TrackOutput?
)
```

Constructs an instance.

| Parameters |
|---|---|
| `subtitleParserFactory: https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory!` | The `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory` for parsing subtitles during extraction. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor.Flags flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Flags that control the extractor's behavior. |
| `timestampAdjuster: https://developer.android.com/reference/kotlin/androidx/media3/common/util/TimestampAdjuster?` | Adjusts sample timestamps. May be null if no adjustment is needed. |
| `sideloadedTrack: https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/Track?` | Sideloaded track information, in the case that the extractor will not receive a moov box in the input data. Null if a moov box is expected. |
| `closedCaptionFormats: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/Format!>!` | For tracks that contain SEI messages, the formats of the closed caption channels to expose. |
| `additionalEmsgTrackOutput: https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput?` | An extra track output that will receive all emsg messages targeting the player, even if `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor#FLAG_ENABLE_EMSG_TRACK()` is not set. Null if special handling of emsg messages for players is not required. |

## Public functions

### getSniffFailureDetails

```
fun getSniffFailureDetails(): ImmutableList<SniffFailure!>!
```

Returns additional details about the last call to `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#sniff(androidx.media3.extractor.ExtractorInput)`. The returned list may be empty if no additional details are available, or the last `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#sniff(androidx.media3.extractor.ExtractorInput)` call returned `
true`.

This only contains details that were discovered before `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#sniff(androidx.media3.extractor.ExtractorInput)` returned `
false`, it is not an exhaustive list of issues which, if resolved, would cause the file to be successfully sniffed.

### init

```
fun init(output: ExtractorOutput!): Unit
```

Initializes the extractor with an `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput`. Called at most once.

| Parameters |
|---|---|
| `output: https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput!` | An `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput` to receive extracted data. |

### newFactory

```
java-static fun newFactory(subtitleParserFactory: SubtitleParser.Factory!): ExtractorsFactory!
```

Creates a factory for `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp4/FragmentedMp4Extractor` instances with the provided `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/SubtitleParser.Factory`.

### read

```
fun read(input: ExtractorInput!, seekPosition: PositionHolder!): Int
```

Extracts data read from a provided `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput`. Must not be called before `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#init(androidx.media3.extractor.ExtractorOutput)`.

A single call to this method will block until some progress has been made, but will not block for longer than this. Hence each call will consume only a small amount of input data.

In the common case, `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_CONTINUE()` is returned to indicate that the `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput` passed to the next read is required to provide data continuing from the position in the stream reached by the returning call. If the extractor requires data to be provided from a different position, then that position is set in `seekPosition` and `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_SEEK()` is returned. If the extractor reached the end of the data provided by the `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput`, then `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_END_OF_INPUT()` is returned.

When this method throws an `https://developer.android.com/reference/java/io/IOException.html`, extraction may continue by providing an `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput` with an unchanged `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput#getPosition()` to a subsequent call to this method.

| Parameters |
|---|---|
| `input: https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput!` | The `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput` from which data should be read. |
| `seekPosition: https://developer.android.com/reference/kotlin/androidx/media3/extractor/PositionHolder!` | If `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#RESULT_SEEK()` is returned, this holder is updated to hold the position of the required data. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | One of the `RESULT_` values defined in this interface. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` | If an error occurred reading from or parsing the input. |

### release

```
fun release(): Unit
```

Releases all kept resources.

### seek

```
fun seek(position: Long, timeUs: Long): Unit
```

Notifies the extractor that a seek has occurred.

Following a call to this method, the `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput` passed to the next invocation of `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Extractor#read(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.PositionHolder)` is required to provide data starting from `
position` in the stream. Valid random access positions are the start of the stream and positions that can be obtained from any `https://developer.android.com/reference/kotlin/androidx/media3/extractor/SeekMap` passed to the `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput`.

| Parameters |
|---|---|
| `position: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The byte offset in the stream from which data will be provided. |
| `timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The seek time in microseconds. |

### sniff

```
fun sniff(input: ExtractorInput!): Boolean
```

Returns whether this extractor can extract samples from the `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput`, which must provide data from the start of the stream.

If `true` is returned, the `input`'s reading position may have been modified. Otherwise, only its peek position may have been modified.

| Parameters |
|---|---|
| `input: https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput!` | The `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput` from which data should be peeked/read. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether this extractor can read the provided input. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` | If an error occurred reading from the input. |

## Protected functions

### modifyTrack

```
protected fun modifyTrack(track: Track?): Track?
```