btpoole
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2013
08:11 PM
Initiate Stream
Having some trouble with getting my channel to start the stream. The channel is a live feed channel that has to go thru ffmpeg to convert the stream to hls. I have this part. My problem comes in on the xml file. The stream url is setup to http://192.168.xx.xx:8000/playfile.m3u8 where the ip represents my server. I can manually launch a batch file to start the conversion of the stream, go to the roku select the channel and all works. My problem is how do I get my ffmpeg batch file to start on the channel selection. I was told go create a cgi script to start the batch file. Well if I change the url stream to point to the cgi and the cgi starts the batch file how does the roku know what stream to play, the url stream doesn't point to a m3u8 in this case but the cgi. There has to be a way when the channel is selected, the conversion process can start and the roku will know to stream the m3u8 that is created. Any help would be really appreciated.
3 REPLIES 3

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2013
09:03 AM
Re: Initiate Stream
If I understand your setup correctly, you need to make one query to the cgi script to start the process (using roUrlTransfer) before starting to play. This wouldn't be the same URL as the media file, which is given to roVideoPlayer/roVideoScreen.
--Mark
--Mark
btpoole
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2013
11:14 AM
Re: Initiate Stream
Thanks. So I need to setup a function using roUrlTransfer to initiate the conversion process? Reading the SDK not a lot of help, at least what I can tell. If I do create a function that creates roUrlTransfer as object, I set the url to the file doing the conversion where is the function placed, in the main app or general utilites. . . Where does the call to the function occur? Sorry for being dense, I have written code before but not with Brightscript or for Roku.
Thanks again
Thanks again

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2013
01:47 PM
Re: Initiate Stream
You would want to call the cgi script right before you start playing the video. It doesn't matter what .brs file you put the new function in.
--Mark
--Mark