kaltura / nginx-vod-module

NGINX-based MP4 Repackager
GNU Affero General Public License v3.0
1.98k stars 439 forks source link

Adaptive bitrate support[mapped mode] #1140

Open yanfang123-hash opened 4 years ago

yanfang123-hash commented 4 years ago

hi,

please do me a favor, thank you

Mapped mode with json file as follow: { "durations": [ 118880, 51790 ], "sequences": [ { "clips": [ { "type": "source", "path": "/0000018ceabe49abb942d7197930bb0e_h2641200000nero_aac16-1.mp4" }, { "type": "source", "path": "/0000018ceabe49abb942d7197930bb0e_h2641200000nero_aac16-2.mp4" } ] }, { "clips": [ { "type": "source", "path": "/0000018ceabe49abb942d7197930bb0e_h2642000000nero_aac16-1.mp4" }, { "type": "source", "path": "/0000018ceabe49abb942d7197930bb0e_h2642000000nero_aac16-2.mp4" }

        ]
    }
]

}

use the cmd "curl -I http://10.70.60.64:8001/dash/local_file.json/manifest.mpd", that's all right but , it's failed to get http response with cmd "curl -I http://10.70.60.64:8001/hls/local_file.json/index.m3u8",

I've positioned the problem with gdb, as the submodule is hls the request_flag is "REQUEST_FLAG_SINGLE_TRACK_PER_MEDIA_TYPE", and the error info is "ngx_http_vod_validate_streams: one stream at most per media type is allowed video=2 audio=2"

please tell me what does it mean? what 's the diffrent with hls and dash?

Is there any problem with the json file?

thank you very much~

erankor commented 4 years ago

Use master.m3u8, not index.m3u8

yanfang123-hash commented 4 years ago

yes. [root@localhost yanfang]# curl http://10.70.60.64:8001/hls/local_file.json/master.m3u8

EXTM3U

EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1185532,RESOLUTION=1280x720,FRAME-RATE=37.037,CODECS="avc1.64001f,mp4a.4

http://10.70.60.64:8001/hls/local_file.json/index-f1-v1-a1.m3u8

EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1989310,RESOLUTION=1280x720,FRAME-RATE=37.037,CODECS="avc1.64001f,mp4a.4

http://10.70.60.64:8001/hls/local_file.json/index-f2-v1-a1.m3u8

thank you so much.

yanfang123-hash commented 4 years ago

By the way, there is another issue.

I use VLC to play the "http://10.70.60.64:8001/hls/local_file.json/master.m3u8" ### the first clip is over (118880ms), it had been stopped, can not continuous to play the second clip.

`

EXTINF:0.880,

http://10.70.60.64:8001/hls/local_file.json/seg-60-f1-v1-a1.ts

EXT-X-DISCONTINUITY

EXTINF:2.000,

http://10.70.60.64:8001/hls/local_file.json/seg-61-f1-v1-a1.ts `

Is there anything need to configure? or Adaptive bitrate only support one clip ?

I'm looking forward to your reply. I really appricate for your detailed explanation extremely.

ps: VLC version is 3.0.8

erankor commented 4 years ago

Did you try other players? there is no issue with adaptive and multiple clips

yanfang123-hash commented 4 years ago

Did you try other players? there is no issue with adaptive and multiple clips

Can you give me some suggestion about the players?

Is it related to the position of moov, at the beginning of mp4 file or at the last?

erankor commented 4 years ago

players - iPhone/iPad etc. moov - no, the module can handle both.

yanfang123-hash commented 4 years ago

In my application, the source mp4 files had been cutted to several clips according to the size(MB), so with different bitrate, the durations of clips are different.

I want to change the json file as follow: { "sequences": [{ "durations": [170670], "clips": [{ "type": "source", "path": "/aac32.mp4" }] }, { "durations": [118880, 51790], "clips": [{ "type": "source", "path": "/aac16-1.mp4" }, { "type": "source", "path": "/aac16-2.mp4" }] }] }

Is this idea can be executed? Do you have any good suggestions?

erankor commented 4 years ago

I'm not sure what you meant, but the durations + number of clips have to be aligned across all sequences.

ratiboo commented 3 years ago

aaa

hi,

please do me a favor, thank you

Mapped mode with json file as follow: { "durations": [ 118880, 51790 ], "sequences": [ { "clips": [ { "type": "source", "path": "/0000018ceabe49abb942d7197930bb0e_h2641200000nero_aac16-1.mp4" }, { "type": "source", "path": "/0000018ceabe49abb942d7197930bb0e_h2641200000nero_aac16-2.mp4" } ] }, { "clips": [ { "type": "source", "path": "/0000018ceabe49abb942d7197930bb0e_h2642000000nero_aac16-1.mp4" }, { "type": "source", "path": "/0000018ceabe49abb942d7197930bb0e_h2642000000nero_aac16-2.mp4" }

        ]
    }
]

}

use the cmd "curl -I http://10.70.60.64:8001/dash/local_file.json/manifest.mpd", that's all right but , it's failed to get http response with cmd "curl -I http://10.70.60.64:8001/hls/local_file.json/index.m3u8",

I've positioned the problem with gdb, as the submodule is hls the request_flag is "REQUEST_FLAG_SINGLE_TRACK_PER_MEDIA_TYPE", and the error info is "ngx_http_vod_validate_streams: one stream at most per media type is allowed video=2 audio=2"

please tell me what does it mean? what 's the diffrent with hls and dash?

Is there any problem with the json file?

thank you very much~

Hello. Do you fix this? or ABR not support playlist?

thanks!