<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; The menu part is easy since I know how to launch a command from a menu item.
<br>&gt; &nbsp;BUT....does anyone know how to start a stream from the command line?<br><br>Mplayer can play streams so you could just create menu items that<br>invoke mplayer.<br><br>Alternatively you could do the following:<br>
1) Create a playlist file (extension .m3u I think) which contains the<br>URL of the stream.<br>2) Create a mythvideo entry that has a custom command line to call<br>invoke mplayer with the playlist file. In that command line you can
<br>also tell it how much to buffer before it starts plaaying etc. I have<br>an example at home if you&#39;d like me to post it later.</blockquote><div><br>Phil, I&#39;d be interested in seeing your implementation of this.
<br><br>Here is how I handle this. I&#39;ve written a bash script that parses several of the major movie trailer websites and puts the entries into a custom menu I have inserted into MythTV. <br><br>A typical menu entry looks like this:
<br><br>*****************<br><br>&lt;button&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;type&gt;MOVIETIMES&lt;/type&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;text&gt;The Dark Knight&lt;/text&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action&gt;EXEC MplayerWrap &#39;<a href="http://movies.apple.com/movies/wb/the_dark_knight/the_dark_knight-tlr1_h720p.mov">
http://movies.apple.com/movies/wb/the_dark_knight/the_dark_knight-tlr1_h720p.mov</a>&#39; &lt;/action&gt;<br>&lt;/button&gt;<br><br>*****************<br><br></div></div>Now MplayerWrap is just that, a wrapper that uses wget to download the trailer into a specified directory, fires up mplayer and plays it, then deletes it. I keep it in /usr/local/bin/.
<br><br>*****************<br><br>#!/bin/bash<br><br><br>cd&nbsp; /video/trailers/<br><br><br>rm -f *.mov<br><br><br>URL=`echo $1 |sed &#39;s,\&amp;amp\;,\&amp;,g&#39;`<br><br><br># Blind download, it works but you have no idea how long you&#39;ll be waiting.
<br><br># wget $URL&nbsp; ;&nbsp; <br><br><br># &quot;Fred Flintstone&quot; quality progress bar, ugly but works.<br><br>xterm -e wget $URL ;&nbsp; <br><br><br># Pretty GUI version - ooooooh. NOTE - this line does not currently work on Fedora Core 6. For functionality zenity must be compiled from source at version 
2.2 or higher, plus the
sed statement must be adjusted. I&#39;m working on this. All debian/ubuntu
based distros work out of the box.<br><br># wget $URL 2&gt;&amp;1 | sed -e &#39;s/.*\ \([0-9]\+%\)\ \+\([0-9.]\+\ [KMB\/s]\+\)$/\1\n# Downloading \2/&#39; | zenity --progress --title=&quot;Downloading Trailer...&quot; --auto-close --width=700 ;
<br><br><br>mv *.mov* trailer.mov<br><br><br>mplayer -fs -zoom -quiet /video/MythCinema-MovieTrailers/trailers/trailer.mov;<br><br><br># Use this line to stream the media rather than download.<br><br># mplayer -fs -zoom -quiet -user-agent NSPlayer $URL
<br><br><br>rm -f /video/MythCinema-MovieTrailers/trailers/trailer.mov<br><br><br># END<br><br>*****************<br><br>You can easily alter this behavior to play the video directly off the net as a stream by commenting out the wget lines/mplayer line and uncommenting the streaming line. All the sed line does up there is fix the ampersands from the xml valid format of &quot;&amp;amp;&quot; to a standard &quot;&amp;&quot; so that wget and mplayer don&#39;t freak out. You can also play with the &quot;-cache&quot; option to adjust your buffer.
<br><br>I have another player script written for Xine if anyone wants it.<br><br><br>Joe<br>