HLS stream url is not playing
Closed this issue · 1 comments
Deleted user commented
Using node js getting the stream hls and it does not play via vlc quicktime or jwt.
How do I Identify the issue?
public async getHLSStreamingSessionURL() {
console.log("getHLSStreamingSessionURL");
var dataParams = {
APIName: 'GET_HLS_STREAMING_SESSION_URL',
StreamName: 'THE_NAME'
};
var kinesisvideo = new AWS.KinesisVideo({ region: 'us-east-1' });
var StartTimestamp = new Date(2020, 11, 15, 15, 0, 0, 0);
var EndTimestamp = new Date(2020, 11, 15, 18, 0, 0, 0);
var dataResult = await kinesisvideo.getDataEndpoint(dataParams).promise();
console.log("dataResult", dataResult);
//https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/KinesisVideoArchivedMedia.html#getHLSStreamingSessionURL-property
var kinesisvideoarchivedmedia = new AWS.KinesisVideoArchivedMedia({
endpoint: dataResult.DataEndpoint
});
var params = {
ContainerFormat: 'FRAGMENTED_MP4', //FRAGMENTED_MP4 | MPEG_TS
DiscontinuityMode: 'NEVER', //ALWAYS | NEVER | ON_DISCONTINUITY
DisplayFragmentTimestamp: 'NEVER', //ALWAYS | NEVER
Expires: 300,
HLSFragmentSelector: {
FragmentSelectorType: 'PRODUCER_TIMESTAMP', //PRODUCER_TIMESTAMP | SERVER_TIMESTAMP
TimestampRange: {
StartTimestamp: StartTimestamp,
EndTimestamp: EndTimestamp
}
},
MaxMediaPlaylistFragmentResults: 300,
PlaybackMode: 'LIVE_REPLAY', //LIVE | LIVE_REPLAY | ON_DEMAND
StreamName: 'THE_NAME'
};
var result = await kinesisvideoarchivedmedia.getHLSStreamingSessionURL(params).promise();
console.log("result", result);
return result;
}
sirknightj commented
Hi @ghost please refer to the troubleshooting guide: https://docs.aws.amazon.com/en_us/kinesisvideostreams/latest/dg/troubleshooting.html#troubleshooting-hls
You can also refer to the sample application https://github.com/aws-samples/amazon-kinesis-video-streams-media-viewer (live webpage https://aws-samples.github.io/amazon-kinesis-video-streams-media-viewer/) which may help.