livepeer / catalyst-api

MIT License
4 stars 2 forks source link

Conflicting profile names #167

Closed thomshutt closed 1 year ago

thomshutt commented 1 year ago

We're producing a manifest that looks like the following (note that it points to the same 720p0 rendition manifest twice):

#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=3890522133,RESOLUTION=1280x720,NAME="0-720p0"
720p0/index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=1931837866,RESOLUTION=854x480,NAME="1-480p0"
480p0/index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=1099925333,RESOLUTION=640x360,NAME="2-360p0"
360p0/index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=528580800,RESOLUTION=426x240,NAME="3-240p0"
240p0/index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=0,RESOLUTION=720x720,NAME="4-720p0"
720p0/index.m3u8

for Asset ID 1fe7gknf2vhfky3j

@victorges did some analysis of the problem:

regarding the profiles with the same folder/manifest: i believe it is caused by this change [1] which uses profile names as the folder names plus this [2] which names the source profile as ${height}p0, conflicting with the default 720p0

many ways to fix this, we can either rename the default profile names or the source profile name to make conflicts impossible. We can also change this line [3] from <= to < to avoid generating a rendition with the same height as the source, even if with a lower bitrate. Would also avoid the conflicts

[1] https://github.com/livepeer/catalyst-api/pull/159
[2] https://github.com/livepeer/catalyst-api/pull/157/files#diff-fb499d09ef134f20877abedf55ee66c60683bec63795c2cc7db80e5cb0b9c0a0R276
[3] https://github.com/livepeer/dms-api/blob/7fc95eb7a68a93c0ce9915f8090d2710d2191ecf/transcode/transcode.go#L262 
mjh1 commented 1 year ago

Fixed: https://github.com/livepeer/catalyst-api/pull/406