<p><br>
On 7/03/2012 7:39 AM, &quot;Ian Bishop&quot; &lt;<a href="mailto:ibishop@gmail.com">ibishop@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; I&#39;m not an expert but I have noodled around with streams a little and can<br>
&gt; &gt; pass on what I know. MythTV implements http streaming as originated by Apple<br>
&gt; &gt; which you can read about in their developer library document titled &quot;HTTP<br>
&gt; &gt; Live Streaming Overview&quot;. At this moment the document lives here &amp; I believe<br>
&gt; &gt; nearby is a link to a PDF.<br>
&gt;<br>
&gt; Sweet, well that&#39;s what I wanted to hear!  I would expect the native<br>
&gt; Android video player to play nicely with the Apple-like stream.  I<br>
&gt; just didn&#39;t want to dive in and waste a bunch of time to find out what<br>
&gt; I wanted to do wasn&#39;t possible.  I guess I&#39;ll need to build up a .25<br>
&gt; backend in a VM now.  :)<br>
&gt;</p>
<p>From my reading http live streaming is not supported below android 3.0. (I think, maybe 2.3) </p>
<p>&gt; &gt; The big picture goes like this: a server (MythTV in this case) encodes a<br>
&gt; &gt; video as a series of short clips, say 10 seconds long, and supplies clients<br>
&gt; &gt; with an &quot;m3u8&quot; file url containing the names of the segments. You retrieve<br>
&gt; &gt; each segment in turn and play them back to back so it&#39;s seamless to the<br>
&gt; &gt; user. If the list is open ended then it&#39;s considered to be an in-progress<br>
&gt; &gt; event and you have to periodically requery the m3u8 url for the current list<br>
&gt; &gt; of segments. As you might guess you can calculate the total length of the<br>
&gt; &gt; video by multiplying the segment duration by the number of segments and you<br>
&gt; &gt; can seek by dividing your desired position by the segment duration to get<br>
&gt; &gt; the segment number and using the remainder as an offset into that clip.<br>
&gt; &gt;<br>
&gt; &gt; In the previous paragraph I said &quot;you&quot; a few times but you personally don&#39;t<br>
&gt; &gt; have to get involved at such a low level. Software such VLC will take an url<br>
&gt; &gt; and do the grunt work. Or, in writing your own application you would embed a<br>
&gt; &gt; video widget supplied by your O/S and have it do the grotty stuff. I&#39;m<br>
&gt; &gt; pretty sure you don&#39;t want to write your own widget, go with your OS&#39;s one.<br>
&gt; &gt; Typically a widget will take an URL and play it without further prodding but<br>
&gt; &gt; they also expose an api for you to query the current position, seek to a<br>
&gt; &gt; given offset, pause, resume, etc. Also, widgets supply an OSD so users can<br>
&gt; &gt; see where they&#39;re at and click arrows or a slider to move back and forth.<br>
&gt; &gt; Your job as a programmer then becomes slicing and dicing the list of media<br>
&gt; &gt; offered up by mythtv, initiating streaming transcodes, and handing off m3u8<br>
&gt; &gt; urls to your embedded player.<br>
&gt; &gt;<br>
&gt; &gt; That&#39;s a fairly breezy introduction but hopefully gets you oriented. It&#39;s<br>
&gt; &gt; really not very complicated but there are several moving parts and at first<br>
&gt; &gt; it&#39;s hard to tell where one ends and the other begins.<br>
&gt; &gt;<br>
&gt; &gt; Assuming you&#39;re running a recent master you can get a decent education by<br>
&gt; &gt; kicking off a stream and examining the entrails. Start by defining a<br>
&gt; &gt; directory for the &quot;Streaming&quot; storage group (mythtv-setup -&gt; Storage<br>
&gt; &gt; Directories) and then starting a stream. In that folder you&#39;ll find the<br>
&gt; &gt; expected m3u8 file but also an html file which shows how you might play a<br>
&gt; &gt; stream in a browser. An Android application would be conceptually similar.<br>
&gt; &gt; Aside from the video clips everything in that streaming directory will be<br>
&gt; &gt; text files so snoop and learn.<br>
&gt; &gt;<br>
&gt; &gt; - George<br>
&gt;<br>
&gt; Sounds straightforward.  Thanks again for the help!<br>
&gt;<br>
&gt; Ian<br>
&gt; _______________________________________________<br>
&gt; mythtv-users mailing list<br>
&gt; <a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
&gt; <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
</p>