nginx-vod-module
nginx-vod-module copied to clipboard
Mapped mode id field length is limited to 10 chars. Why?
Hi.
The id field length of mapped mode response is limited to 10 chars. Why? mapped response json:
{
"playlistType": "vod",
"sequences": [
{
"bitrate": {
"v": 4050000,
"a": 128000
},
"id": "1080p30fps",
"clips": [
{
"type": "source",
"path": "/videos/1080.mp4"
}
]
}
]
}
m3u8 manifest:
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=4178000,RESOLUTION=1920x1080,FRAME-RATE=23.980,CODECS="avc1.640028,mp4a.40.2"
index-s1080p30fps-v1-a1.m3u8
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=257410,RESOLUTION=1920x1080,CODECS="avc1.640028",URI="iframes-s1080p30fps-v1-a1.m3u8"
media list
#EXTM3U
#EXT-X-TARGETDURATION:6
#EXT-X-ALLOW-CACHE:YES
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:2.002,
segment-1-s1080p30fps-v1-a1.ts
#EXTINF:2.002,
segment-2-s1080p30fps-v1-a1.ts
id field value "transfered" to manifest as is to media list name/segment names.
But if i set id value more than 10 chars - kaltura ignores it. Why such limitation? Is it possible to extend?
{
"playlistType": "vod",
"sequences": [
{
"bitrate": {
"v": 4050000,
"a": 128000
},
"id": "1080p30fpsv2",
"clips": [
{
"type": "source",
"path": "/videos/1080.mp4"
}
]
}
]
}
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=4178000,RESOLUTION=1920x1080,FRAME-RATE=23.980,CODECS="avc1.640028,mp4a.40.2"
index-f1-v1-a1.m3u8
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=257410,RESOLUTION=1920x1080,CODECS="avc1.640028",URI="iframes-f1-v1-a1.m3u8"
#EXTM3U
#EXT-X-TARGETDURATION:6
#EXT-X-ALLOW-CACHE:YES
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:2.002,
segment-1-f1-v1-a1.ts
#EXTINF:2.002,
segment-2-f1-v1-a1.ts
Well, the main reason is probably that we didn't need more than that - when we use this feature, we are sending 32 bit integers as the id, so it can't exceed 10 chars. It is possible to change the code to support a larger value, but it will require changes in multiple places... the condition is here - https://github.com/kaltura/nginx-vod-module/blob/master/vod/manifest_utils.c#L381 but if it's changed to a larger value, it will need to be taken into account when allocating the output buffer, so it won't overflow