For proper HLS creation for VOD playback, please send the createHlsStream command before sending the pullStream command. This ensures that the HLS created starts from the beginning of the pulled stream. Set keepAlive=0 for pullStream so that HLS creation stops at the end of the pulled stream. Also, set playListType=appending for pullStream so that HLS creation covers the whole stream.
Note: If pullStream is done before createHlsStream, the earlier part of the stream will be missed. If pullStream uses keepAlive=1, HLS creation will loop back to the beginning of the pulled stream instead of stopping at the end. If playListType=rolling, earlier HLS chunks will be overwritten by newer chunks upon rollover, resulting in incomplete HLS playback.