SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-28-2012, 01:08 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Android streaming test

I have decided to revisit the Android streaming, so here is a simple application for it:

http://dl.dropbox.com/u/408295/STVStreamer.apk

It relies on the SageTV iOS streaming plugin. It can be configured from the top-right button.

You need to provide a MediaFile ID. You can find the MediaFileID through SageTV Mobile Web Interface, or looking at the Android log from TaSageTV... There are probably a few other methods of getting one.

A blank MediaFileID will revert to a demo link from Apple, so you can make sure that the video players themselves are working...

The "Android 2.3" and "Android 3" buttons should pop a video player selection for a blank MediaFileID (i.e. Browser, MX Player, etc.), so let me know if you get any other, especially if they actually work...

So far, I can only get the default Apple video to stream on a Motorolla DroidX, no luck with actual files...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad

Last edited by Fonceur; 04-28-2012 at 01:28 PM.
Reply With Quote
  #2  
Old 04-28-2012, 03:30 PM
TechBill's Avatar
TechBill TechBill is offline
Sage Fanatic
 
Join Date: Aug 2007
Posts: 827
Saw it appeared in my dropbox today

I willtry it out tonight and report back

Bill
__________________
HTPC System
GIGABYTE GA-MA69GM-S2H AM2 AMD 690G HDMI // AMD Athlon 64 X2 6000+ Windsor 3.0GHz // G.SKILL 6GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR // Hauppauge Colossus HD-PVR // Hauppauge Colossus HD-PVR // Seagate ST3750640AS 750GB SATA-300 16MB // DVD R/W - SAMSUNG Black
Media Extenders
HD300
HTPC Software
Windows 7 Professional 64bits // SageTV 7.1.x // Java 1.7.x
Reply With Quote
  #3  
Old 04-28-2012, 04:26 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
I've installed a few other video players, but none are playing the streams (some do play the Apple one, just not the STV one)... I'm testing on a Motorola DroidX with Android 2.2.1, so it might be better with Android 2.3 or newer...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #4  
Old 04-28-2012, 04:29 PM
doc's Avatar
doc doc is offline
Sage Fanatic
 
Join Date: Jun 2006
Location: Leicester, England
Posts: 918
I have the media streaming services installed on the server.

I installed the app on my samsung galaxy s2, which is now on Icecream sandwich.

I've configured the IP and settings from the top right hand corner.

After entering a File ID, if I click on the Android 3 button (yes, I'm on 4 now I know) I get the choice..
Select an action - video player or internet.
If I select Video player, I get 'unable to play video'
If I select Internet, I get 'starting downloading' and then 'download unsuccessful' in the background.

If I click on MX Video Player - which is installed - I get 'sorry, this video cannot be played.'

Messing with this was much more interesting than watching 'Terminator: Salvation", I was starting to fall asleep :-)
Reply With Quote
  #5  
Old 04-28-2012, 04:39 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Yes that's pretty much what I'm seeing so far.
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #6  
Old 04-29-2012, 08:38 AM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
As I suspected, so far the issue seems to be related to the authentication. If you shutdown SageTV and its service, go to:

SageTV/SageTV/jetty/contexts/

make a backup of mediastreaming.xml. Then edit the original file and comment out or delete the section:

Code:
  <!-- http://docs.codehaus.org/display/JETTY/How+to+Configure+Security+with+Embedded+Jetty -->
  <!-- include security constraints here because the only other place they can be specified
       is in the web.xml file inside the war file -->
  <!-- can the constraints be included in another file we won't overwrite? -->
  <Get name="securityHandler">
    <Set name="userRealm">
      <New class="org.mortbay.jetty.security.HashUserRealm">
        <Set name="name">SageTV Web Interface</Set>
        <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
      </New>
    </Set>
    <Set name="checkWelcomeFiles">true</Set>
    <Set name="constraintMappings">
    <!-- TODO create unprotected public area -->
      <Array type="org.mortbay.jetty.security.ConstraintMapping">
        <Item>
          <New class="org.mortbay.jetty.security.ConstraintMapping">
            <Set name="constraint">
              <New class="org.mortbay.jetty.security.Constraint">
                <Set name="name">BASIC</Set>
                <Set name="roles">
                  <Array type="java.lang.String">
                    <Item>user</Item>
                    <Item>admin</Item>
                    <Item>moderator</Item>
                  </Array>
                </Set>
                <Set name="authenticate">true</Set>
              </New>
            </Set>
            <Set name="pathSpec">/*</Set>
          </New>
        </Item>
        <!--Item>
          <New class="org.mortbay.jetty.security.ConstraintMapping">
            <Set name="constraint">
              <New class="org.mortbay.jetty.security.Constraint">
                <Set name="name">BASIC</Set>
                <Set name="roles">
                  <Array type="java.lang.String">
                    <Item>admin</Item>
                  </Array>
                </Set>
                <Set name="authenticate">true</Set>
              </New>
            </Set>
            <Set name="pathSpec">/m/Command</Set>
          </New>
        </Item-->
      </Array>
    </Set>
  </Get>
Restart SageTV and you will probably be able to stream with a few apps...

I haven't actually tested that hypothesis yet, as the MX Player author is testing a bit with my system... Maybe just setting authenticate to false or creating that unprotected public area would do it...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #7  
Old 04-29-2012, 06:30 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
I can confirm that by disabling the authentication as mentioned in the previous post, it's possible to stream using Mirage beta, MX Player, BSPlayer, DICE Player, VPlayer and probably a bunch of other Android video players...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #8  
Old 05-01-2012, 07:52 AM
romain_gary romain_gary is offline
Sage User
 
Join Date: Feb 2012
Location: Montreal
Posts: 14
Details on your configuration for streaming

Hello Fonceur,

Could you describe in details your configuration for android streaming? I have tested it with many players (mirage, MX player, VLC) and it simply doesn't work even if I make the authentication changes to mediastreaming.xml.

Thnx ahead.
Reply With Quote
  #9  
Old 05-01-2012, 12:35 PM
doc's Avatar
doc doc is offline
Sage Fanatic
 
Join Date: Jun 2006
Location: Leicester, England
Posts: 918
I couldn't get mine to work either, I installed the update for streaming services on the server.

When I use mx video player I get the navigation buttons, and the percentage reading in the top right hand corner sticks at 79%, and I have a spinning circle in the middle.

Mirage beta gives me a spinning circle and the message 'Please wait while loading...'

Edit:

Well, after about 20 mins, when I thought all the apps had closed down, I got a second of sound come through from some program. Android says that there are no apps running!

Last edited by doc; 05-01-2012 at 12:48 PM.
Reply With Quote
  #10  
Old 05-02-2012, 10:04 PM
Skydive199 Skydive199 is offline
Sage User
 
Join Date: Dec 2004
Posts: 7
How I got streaming to work

The HTTP Live Streaming is great. I have wanted this functionality on Android for a while now.

The problem I encountered is that none of the android media players could interpret the HTTPLiveStreamingPlaylist.bin file that was returned by the HTTPLiveStreamingPlaylistServlet. I tested Fonceur's app and that didn't work either.

I noticed that when I pulled the links out of the HTTPLiveStreamingPlaylist.bin file, the Android media players would play the stream. So I modified the details.jsp file to pull in the HTTPLiveStreamingPlaylist file, parse out the links and present them on the page with a reference to the bit rate.

Now I can just click on the link to the stream and it opens up in the player of my choice. I also turned on the video element with the preview cause it looks cool (its usually only visible to apple devices). The attached screen shot is a view of my details page. Its a little cluttered with all the links, but livestreaming works so who cares!

Happy Streamin!
Attached Images
File Type: png details.png (113.1 KB, 209 views)
Reply With Quote
  #11  
Old 05-03-2012, 03:27 AM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
In principle, the original playlist has multiple bit rates so the video player can pick the best as a function of bandwidth and adjust as needed... On my end, it worked great with "Family guy", but when I tested with some non-cartoon tv show, it wasn't as great...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #12  
Old 05-07-2012, 11:42 AM
jamart3d's Avatar
jamart3d jamart3d is offline
Sage User
 
Join Date: Jun 2006
Location: earth
Posts: 24
Thanks Fonceur,
and thanks Skydive199, great tip
Quote:
Originally Posted by Skydive199 View Post
I noticed that when I pulled the links out of the HTTPLiveStreamingPlaylist.bin file,
Happy Streamin!
same here, after I pick one of the links from the Playlist.bin file, I can give it to MX player no problem.

I did a quick look for default.jsp to edit, no luck.
Skydive199 can you share your default.jsp edit?
__________________
"don't praise the machine"
Reply With Quote
  #13  
Old 05-07-2012, 05:55 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
In the new STVStreamer version, the server configuration has an option for the bit rate, which should be the equivalent...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #14  
Old 05-08-2012, 03:03 PM
jamart3d's Avatar
jamart3d jamart3d is offline
Sage User
 
Join Date: Jun 2006
Location: earth
Posts: 24
yup it does,
thanks again Fonceur,
440 profile works for me , via MX player
but why this app?
can the link go from page to player without being handled by STVStreamer?
__________________
"don't praise the machine"
Reply With Quote
  #15  
Old 05-08-2012, 05:26 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Quote:
Originally Posted by jamart3d View Post
but why this app?
can the link go from page to player without being handled by STVStreamer?
I have nothing to do with the web server... The goal was to figure out how to enable the streaming for more TaSageTV users...

If someone wants to modify the web server, you would basically append:

&ConversionId=e2e7dc52-51ef-415e-a929-45fa52a78048&Quality=150

Where the choices for Quality are 150, 240, 440, 640, 840, 1240, 1840. The ConversionId can be anything, like some UUID.randomUUID() or such.
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #16  
Old 05-08-2012, 09:16 PM
Skydive199 Skydive199 is offline
Sage User
 
Join Date: Dec 2004
Posts: 7
Modified details.jsp

I attached the modified details.jsp. Its a bit of a hack, but it works.

Download the file and remove the .txt extension. Then replace place the file in the following directory:
C:\Program Files\SageTV\SageTV\jetty\webapps\SageWebApp\webapp\m\details.jsp

This file will give you the enabled video object with the nice preview thumbnail and a list of streaming links pulled from the HTTPLiveStreamingPlaylistServlet.

Keep in mind that this change will be over written when the Jetty server is resarted. The webapps are deployed through a war file. When the server restarts, webapp files are extracted from the war and the existing files are over written. To make the changes persist, you need to modify the war file.

Who manages the mobile web server? Maybe they could implement this more gracefully....
Attached Files
File Type: txt details.jsp.txt (42.9 KB, 142 views)
Reply With Quote
  #17  
Old 05-10-2012, 03:35 PM
jamart3d's Avatar
jamart3d jamart3d is offline
Sage User
 
Join Date: Jun 2006
Location: earth
Posts: 24
thanks SkyDive199, the edit list the links
but I have to use copy link to get it to MX player, native video player can't play it.
though the bigbopall.m3u8 can go to native player

And thanks again Foncuer, seeing sagetv direcly transcode is a nice option,
seekable within the player is a big plus..

though for live streams I'll still prefer to start a push stream from my host
__________________
"don't praise the machine"
Reply With Quote
  #18  
Old 05-11-2012, 06:28 AM
clarenceb5 clarenceb5 is offline
Sage Advanced User
 
Join Date: Jun 2007
Location: Whitby, ON
Posts: 89
This is awesome great work! For me to get it to work I did not edit the mediastreaming.xml file but I did make a backup of my details.jsp file and then replaced it with the one provided. Also it only works with the free MX Video Player that I get from the Play Store. When I install the MX Video Player Pro from apk file version 1.5 it does not open the player.

Is there going to be more development on this app I would love to help make it better anyway I can. I have some ideas for this app unfortunately I am not a software developer but I am a software tester by profession.
Reply With Quote
  #19  
Old 05-12-2012, 06:27 AM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Quote:
Originally Posted by clarenceb5 View Post
When I install the MX Video Player Pro from apk file version 1.5 it does not open the player.
You might have to make sure to uninstall the free version, for the Pro version to kick in...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #20  
Old 05-14-2012, 08:38 AM
clarenceb5 clarenceb5 is offline
Sage Advanced User
 
Join Date: Jun 2007
Location: Whitby, ON
Posts: 89
Thanks for your suggestion; I am not able to install the pro version unless the free version is removed so having both installed is not an issue. I am able to use the MX Video Player Pro with files stored locally on my sd card but still STVStreamer won't open MX Video Player Pro. It is unfortunate because I prefer that player over the Mirage Beta which does work on my device with STVStreamer.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SageTV as Android for TVs? perholm General Discussion 10 06-23-2011 08:26 PM
Android Video Streaming? skyeclad SageTV v7 Customizations 8 11-11-2010 02:36 PM
Android and streaming media services (on the rise) stuckless General Discussion 0 04-22-2010 01:28 PM
webserver + vlc + android + streaming = error jrjbertram SageTV Customizations 72 04-11-2010 12:21 PM


All times are GMT -6. The time now is 02:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.