Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
httpslash
Visitor

M3U8 Stream keeps repeating

Hey guys, I've been trying forever to try to get this m3u8 stream to work on my roku without success. My problem is that although the stream plays without any buffering problems, the stream plays normally for around a minute then repeats what has already been played. I tried using simplevideoplayer as well as creating a channel on instanttvchannel and unfortunately I have the same problem. Here is the stream I've been trying to play: https://sslhls.m6tv.cdn.sfr.net/hls-liv ... s_856.m3u8

I'm a huge noob so please help!!
Thanks!
0 Kudos
7 REPLIES 7
httpslash
Visitor

Re: M3U8 Stream keeps repeating

Bump...
0 Kudos
destruk
Streaming Star

Re: M3U8 Stream keeps repeating

Sounds like it's failing on the AES/SSL checks - it will do that about between every 1-2 minutes.
You can fix it with this code - you're probably missing the certificate chain file.
(plays fine for me)


Sub Main()
port=CreateObject("roMessagePort")
screen=CreateObject("roVideoScreen")
screen.SetMessagePort(port)

z=CreateObject("roAssociativeArray")
z.Title="Live Feed"
z.StreamFormat="hls"
z.Live=true
screen.SetCertificatesFile("common:/certs/ca-bundle.crt")
screen.InitClientCertificates()

z.streams=[
{ url : "https://sslhls.m6tv.cdn.sfr.net/hls-live/livepkgr/_definst_/w9_hls_aes/w9_hls_aes_856.m3u8",
bitrate : 0,
quality : false
}
]
screen.SetContent(z)

screen.Show()
While TRUE
msg=Wait(0,port)
If Type(msg)="roVideoScreenEvent"
If msg.isRequestFailed()
Print"MSG = ";msg.getMessage()
Print"INDEX = ";msg.GetIndex()
Print"TYPE = ";msg.GetType()
Print"DATA = ";msg.GetData()
Print"INFO = ";msg.GetInfo()
Else If msg.isStatusMessage()
Print"Video status: ";msg.GetIndex();" ";msg.GetData()
Else If msg.isButtonPressed()
Print"Button pressed: ";msg.GetIndex();" ";msg.GetData()
Else If msg.isStreamSegmentInfo()
Else If msg.isDownloadSegmentInfo()
Else If msg.isStreamStarted()
Else If msg.isPaused()
Else If msg.isResumed()
Else If msg.isScreenClosed()
Exit While
Else
Print"Unexpected event type: ";msg.GetType()
End If
Else
Print"Unexpected message class: ";Type(msg)
End If
End While
End Sub


(edited to add more msg types to eliminate unexpected event messages)
0 Kudos
httpslash
Visitor

Re: M3U8 Stream keeps repeating

Thanks a lot for the reply. What's a certificate file? Sorry I don't know much about roku yet.
0 Kudos
destruk
Streaming Star

Re: M3U8 Stream keeps repeating

0 Kudos
httpslash
Visitor

Re: M3U8 Stream keeps repeating

Thanks for the link, I'll take a look. Where do i find the chain file? I can't seem to find it anywhere and if I am using simple video player, where do i place it before zipping the files? Thanks again

EDIT: if i understand correctly the certificate is actually on the roku? I tried the code and it works with the above stream, however, my other ones such as http://stream0.latvdefrance.com/live/tf1.m3u8 are doing the same thing(repeating). What should i do?
0 Kudos
destruk
Streaming Star

Re: M3U8 Stream keeps repeating

Most of the https streams are https so that people can't 'steal' or re-stream their feed. Try asking the site operator for their certificate or a roku-compatible stream - they would have to have an unencrypted feed somewhere.
0 Kudos
httpslash
Visitor

Re: M3U8 Stream keeps repeating

Thanks for the reply, I'll ask them.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.