Skip to content

Commit b99359d

Browse files
authored
docs: update transcode-api docs to include fmp4 and new profile property support (#485)
1 parent 9d7cfb8 commit b99359d

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed

openapi.yaml

+102
Original file line numberDiff line numberDiff line change
@@ -3746,6 +3746,8 @@ paths:
37463746
37473747
- MP4
37483748
3749+
- fMP4 (Fragmented MP4)
3750+
37493751
37503752
**HLS**
37513753
@@ -3774,6 +3776,106 @@ paths:
37743776
37753777
```
37763778
3779+
3780+
**Fragmented MP4**
3781+
3782+
\
3783+
3784+
The path specified in the `fmp4` property of the request will be used to store the fragmented mp4 files packaged with both HLS and DASH. The audio and video tracks are stored as separate mp4 files. Note the following files in the example below:
3785+
- `index-stream0.mp4` —> audio track
3786+
- `index-streamN.mp4` —> renditions (e.g. 1080p, 720p, etc)
3787+
- `media_N.m3u8` —> HLS media playlists corresponding to renditions
3788+
- `index.mpd` —> DASH manifest
3789+
- `master.m3u8` —> HLS master manifest
3790+
3791+
```json
3792+
3793+
{
3794+
"fmp4": {
3795+
"path": "/samplevideo/fmp4"
3796+
}
3797+
}
3798+
3799+
```
3800+
3801+
3802+
3803+
3804+
## Profiles
3805+
3806+
\
3807+
3808+
The output profiles of the transcoded videos will follow an ABR (Adaptive Bitrate Streaming) ladder and can be set in one of the following ways:
3809+
3810+
- Default ABR ladder
3811+
3812+
- Target ABR ladder
3813+
3814+
- Target Bitrate
3815+
3816+
3817+
**Default ABR**
3818+
3819+
\
3820+
3821+
The `profiles` can be left blank to generate output videos with Livepeer's default ABR ladder. This will include a resolution that matches the input video's resolution and some additional resolutions.
3822+
3823+
3824+
```json
3825+
3826+
profiles: [
3827+
{}
3828+
]
3829+
3830+
```
3831+
3832+
3833+
**Target ABR**
3834+
3835+
\
3836+
3837+
To generate output videos with a specific ABR ladder, the `profiles` property can be set as follows.
3838+
3839+
3840+
```json
3841+
3842+
profiles: [
3843+
{
3844+
name: "480p",
3845+
bitrate: 1000000,
3846+
fps: 30,
3847+
width: 854,
3848+
height: 480
3849+
},
3850+
{
3851+
name: "360p",
3852+
bitrate: 500000,
3853+
fps: 30,
3854+
width: 640,
3855+
height: 360
3856+
}
3857+
]
3858+
3859+
```
3860+
3861+
3862+
**Target Bitrate**
3863+
3864+
\
3865+
3866+
To generate a single output video that matches the input’s resolution with a target bitrate, set only the `bitrate` field of the `profiles` property.
3867+
3868+
```json
3869+
3870+
profiles: [
3871+
{
3872+
name: "1080",
3873+
bitrate: 4000000
3874+
}
3875+
]
3876+
3877+
```
3878+
37773879
operationId: transcode
37783880
requestBody:
37793881
required: true

0 commit comments

Comments
 (0)