Http Live Streaming + Transcoding Example

Roku's free SDK allows developers to build channels and applications and publish them to the Roku Channel Store. Register for the Developer Program at http://www.roku.com/developer

Moderators: RokuDouglas, RokuRyan, RokuJamesL, RokuKen, RokuChris, RokuJoel

Http Live Streaming + Transcoding Example

Postby Twitch247 » Wed Mar 17, 2010 3:48 pm

Hey guys,
Long time Lurker, first time poster here. Got my roku DVP now streaming my local media that has been encoded to mp4, but I am still chomping at the bit to have transcoding so I don't have to "pre" convert the rest of my files. I noticed that soon they will support HTTP live streaming, and that got me thinking......
This (http://www.inmethod.com/air-video/index.html) is an application that runs on both windows and mac, and can transcode any Video Format into a Iphone compatible format AND live stream it to the phone on the FLY, as in NO NEED TO ENCODE BEFORE PLAYING. My question is, couldn't this style of program be used to real time encode and stream to the roku DVP?
Twitch247
 
Posts: 3
Joined: Wed Mar 17, 2010 3:41 pm

Re: Http Live Streaming + Transcoding Example

Postby Twitch247 » Fri Mar 19, 2010 10:20 am

Maybe even just figure out what port the server is outputing to and hijack the stream?
Twitch247
 
Posts: 3
Joined: Wed Mar 17, 2010 3:41 pm

Re: Http Live Streaming + Transcoding Example

Postby mdweaver7485 » Wed Apr 21, 2010 8:41 am

I emailed InMethod and asked if they have any plans of putting out a channel for Roku or if not if they'd consider putting out an API/SDK. As best I can figure it runs some sort of a basic HTTP server and messaging system to handle requests and track playback position. I'd love to a Roku and a WM7 client to come out of this to sync a long movie/tv show between my TV and my Laptop and my phone.
mdweaver7485
 
Posts: 1
Joined: Wed Apr 21, 2010 8:35 am

Re: Http Live Streaming + Transcoding Example

Postby Twitch247 » Wed Apr 21, 2010 8:51 am

Wow, awesome initiative. Yeah I thought that this is one of the best implementations of this I have seen. And having a synced library, ala netflix resume play, for my home media would be amazing.
Twitch247
 
Posts: 3
Joined: Wed Mar 17, 2010 3:41 pm

Re: Http Live Streaming + Transcoding Example

Postby mpmchugh » Mon May 03, 2010 12:40 pm

mdweaver7485 wrote:I emailed InMethod and asked if they have any plans of putting out a channel for Roku or if not if they'd consider putting out an API/SDK. As best I can figure it runs some sort of a basic HTTP server and messaging system to handle requests and track playback position. I'd love to a Roku and a WM7 client to come out of this to sync a long movie/tv show between my TV and my Laptop and my phone.


Did you ever hear back from InMethod? I've emailed them and posted in their forum on the same topic, and have not gotten a response. I think they'd have a nice additional customer base with Roku users if they are interested.

-mpm
mpmchugh
 
Posts: 24
Joined: Sat Nov 07, 2009 6:52 pm

Re: Http Live Streaming + Transcoding Example

Postby -LD » Fri May 07, 2010 8:01 am

Air Video is quite nice. I use it on my iPad and iPhone streaming from my Mac Mini. It's exactly the type of thing Roku needs to allow users to stream their local media. It can live transcode or you can remotely tell it to pre-transcode a video. Imagine the possibilities with Roku. I could have a server set up in my house and have my parents hook up a Roku at their house. Then they could stream videos and potentially pics of my kid or whatever.
-LD
 
Posts: 1604
Joined: Fri Dec 19, 2008 11:27 am

Re: Http Live Streaming + Transcoding Example

Postby hammerpocket » Fri May 07, 2010 10:52 pm

I agree; Air Video looks like a great model for streaming to Roku. One possible glitch is that InMethod seems to be outside the U.S. The screen shots for Air Video on the app store show Orange as the phone carrier. (I noticed because some idiot wrote a review saying how terrible it was that the developer was using a jailbroken iPhone!) AFAIK the Roku isn't available in Europe, so that probably means InMethod doesn't have much interest in - or even awareness of - the Roku DVP.

On the other hand, reading some of the forum posts, it appears Air Video uses ffmpeg and HTTP Live Streaming on the server side, so I don't see any reason that an interested developer couldn't get the same thing working and then write a client app for the channel store.
hammerpocket
 
Posts: 191
Joined: Tue Jan 19, 2010 6:43 pm

Re: Http Live Streaming + Transcoding Example

Postby mpmchugh » Mon Jul 26, 2010 3:59 pm

Sadly, there seems no interest in this from either side. I've tried getting the Air Video folk to respond to the suggestion of a channel, but no luck.

You'd think Roku would see this as an opportunity to partner with them and build such a channel. With them both supporting the same streaming specs, it seems the heavy lifting is done, and it would be a great addition to the Roku bag of tricks, making it an even more compelling purchase.

I use Air Video all the time with my iPad, and it's yet to choke on any video file/format I've thrown at it.

I suspect Roku is doing this development themselves, based on the presence of the USB port and the survey they did a while back about streaming local media, but it seems like they could save a lot of time by partnering with a proven streaming server that already works.

-mpm
mpmchugh
 
Posts: 24
Joined: Sat Nov 07, 2009 6:52 pm

Re: Http Live Streaming + Transcoding Example

Postby shshchch » Wed Jul 28, 2010 12:14 am

orrrrrr tversity
shshchch
 
Posts: 46
Joined: Mon Feb 01, 2010 3:58 pm
Location: U.S.A. : Texas : Austin

Re: Http Live Streaming + Transcoding Example

Postby scyber » Wed Jul 28, 2010 10:35 am

shshchch wrote:orrrrrr tversity



Yep the latest version of TVersity does support HLS, unfortunately while I can get the media browsing functionality to work, i can't get the HLS to work correctly. TVersity will generate the m3u8 file, but the roku doesn't seem to like it("Unknown event: 20 msg:" is the message in the debug screen). I'm currently trying to figure out why.
scyber
 
Posts: 1287
Joined: Mon Dec 29, 2008 8:51 am

Re: Http Live Streaming + Transcoding Example

Postby FML2010 » Wed Jul 28, 2010 2:20 pm

I am interested in knowing how you got the tversity to work with your Roku DVP

I am gonna play with it today and try to get this done using the video player example.
FML2010
 
Posts: 76
Joined: Mon Jul 12, 2010 3:39 pm

Re: Http Live Streaming + Transcoding Example

Postby scyber » Wed Jul 28, 2010 7:32 pm

Well I think I may have figured out the first issue with using Tversity's HLS for the roku. When just playing a m3u8 url from tversity on the roku using the simplevideplayer example, the progress bar would go about a third of the way across and then stop (this appears to indicate that the m3u8 files has loaded, but no segments). I noticed that the urls in the tversity m3u8 were relative, not absolute:

Code: Select all
#EXTM3U
#EXT-X-TARGETDURATION:1
#EXTINF:10,
/getres/profile/ebe80805-5640-4753-b0ad-e3f53817ae2f/video/mp2tavc;res=1280x720;fps=30_1;vb=2000000/range/0-437852/7184/segment.ts
#EXTINF:1,
/getres/profile/ebe80805-5640-4753-b0ad-e3f53817ae2f/video/mp2tavc;res=1280x720;fps=30_1;vb=2000000/range/437852-503652/7184/segment.ts
#EXTINF:2,
/getres/profile/ebe80805-5640-4753-b0ad-e3f53817ae2f/video/mp2tavc;res=1280x720;fps=30_1;vb=2000000/range/503652-632244/7184/segment.ts
#EXTINF:2,
/getres/profile/ebe80805-5640-4753-b0ad-e3f53817ae2f/video/mp2tavc;res=1280x720;fps=30_1;vb=2000000/range/632244-761212/7184/segment.ts


The HLS spec says you can use relative urls, and that is what the examples in simplevideo player use, however the simplevideoplayer sample urls are relative to the directory containing the m3u8 files. The Tversity m3u8 urls are relative to the server root. I think Roku may not handle urls relative to the server root correctly for HLS (just a theory).

Anyway, I copied the full m3u8 file, put in the full IP and port information for Tversity and placed the file elsewhere on the server. This improved the situation, the progress bar will jump to around 1/3 full (again, I assume this indicates the m3u8 file has been loaded), then it will slowly progress till over halfway and then stop. I assume the slow progression represents the loading of the individual segments. I can't figure out why it stops though.
scyber
 
Posts: 1287
Joined: Mon Dec 29, 2008 8:51 am

Re: Http Live Streaming + Transcoding Example

Postby FML2010 » Wed Jul 28, 2010 7:41 pm

where are you even finding the .m3u8 file?
FML2010
 
Posts: 76
Joined: Mon Jul 12, 2010 3:39 pm

Re: Http Live Streaming + Transcoding Example

Postby scyber » Wed Jul 28, 2010 7:51 pm

FML2010 wrote:where are you even finding the .m3u8 file?


Using Tversity's HTTP Rest API:
http://tversity.com/doc/group___h_t_t_p ... a_p_i.html

First you need to add a Roku profile to the profiles.xml file. I just copied the ipad profile changing the first couple of lines as follows:

Code: Select all
<profile id="ec5b1100-0000-1100-1101-ec5b314a1101"><!-- Roku HD DVP (N1100/N1101) -->
      <friendlyName>Roku HD DVP</friendlyName>
      <manufacturerName>Roku</manufacturerName>
      <modelName>N1100/N1101</modelName>

      <HTTPHeader inUASubstr="Roku/DVP" exclusiveIP="false"/>
      <icon>/images/device_icon_generic.png</icon>


Use the MedialibBrowse Interface to browse through your content (you can do this in a browser if you set your user agent to an ipad and/or a Roku). When you get to a video file, you will need to replace "/getres" in the url with "/getindex" (if you use the ipad user agent in your browser you shouldn't need to change the url).
scyber
 
Posts: 1287
Joined: Mon Dec 29, 2008 8:51 am

Re: Http Live Streaming + Transcoding Example

Postby FML2010 » Wed Jul 28, 2010 9:26 pm

well i did what you said with and i have to say that is as far as i could do :(

one issue could be is i don't have the pro version
FML2010
 
Posts: 76
Joined: Mon Jul 12, 2010 3:39 pm

Next

Return to Roku Developer Program

Who is online

Users browsing this forum: No registered users and 4 guests