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
  #281  
Old 03-04-2013, 05:05 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by drewg View Post
I think the change persists in BMT. At least, it seems to be there when I open a new tab, and navigate back to the video streaming prefs.

Where in the actual filesystem is this configuration stored? I assume there must be an xml file, or an sqlite database or something.. Is there some way that I can verify from the command line that BMT stored the config how it was expected?

Yes, I only have a single SageTV server. And I know I'm hitting it, because I've instrumented the cvlc scrip to log its arguments..

Thanks,

Drew

I'm thinking to just re-write the wrapper script to parse the VLC args and add the "channels=2"...
All changes are stored in the Sage.properties (which may only get persisted to disk when SageTV shuts down).

So, if you make the changes, and shutdown sagetv, you can check the Sage.properties and see if has, phoenix/streaming/vlc/wifi_low in there.

FYI, in bmt, if you click on the question mark on the property, it open a dialog shows the "Sage Property" key, which is the key that is used in the Sage.properties file.

I have support for using a custom script, but I haven't baked it into the App yet. ie, the custom script, basically calls a custom script that you define, passing in the parameters for the output file, profile name, etc.

Just curious... did you change the values using a client/extender, or did you change the values using BMT. (if you used a client, then that may be a reason why it's not picking up)
Reply With Quote
  #282  
Old 03-04-2013, 05:11 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by mkanet View Post
Stuckless, It looks like my problem is revolved around file permissions on my C:\ drive. If its permissions issue, its my own fault. I had "hardened" the security of my C:\ drive a while back; which may be the cause.

If I execute sageTVservice.exe using my personal user ID, "Michael", vlc.exe starts using >50% CPU; and, creates small .ts files in the C:\Program Files (x86)\SageTV\SageTV\userdata\Phoenix\streaming\8e3ff885-a64a-3c34-ab13-f82a8d45eb69 directory. I think it's supposed to do that; which it wasn't before when sageTVservice.exe was using the Windows local system for authentication.

If you, or anyone, know what permission dependencies sageTVservice.exe, java, etc needs... please let me know. I would like to put it back to using the local system for authentication. I will eventually reimage my machine with an older image which should correct any permissions issues; but, maybe I can make this work for now.

Anyway, now, I'm running into another issue... shortly after the video tries to stream (after I select the respective video streaming profile), I get the error message:
"Sorry, this video cannot be played". Is this a player issue? I have MX player installed; but not sure where it's failing now.

I've attached the log files. Maybe they mean more this time around...

Nothing of interest in the log files

But, after you select a profile (normal), and it spins for second or two... do you get the option of selecting a video player, or does it die before that?

Basically it still seems like it is not creating the files (there is a 10 second timeout) before returning. It may be that on your machine vlc can't create the files fast enough, especially if these are HD files. You can increase the timeout in the BMT web ui... it is set to 10... maybe changed it to 20.

Quote:
Originally Posted by Dargason View Post
Sounds like progress... those video files (each about 4-5s long) are normal. or at least I'm getting them too.

You might try a different video player, but first you should look at the settings in MX Player. You can enable and disable SW and HW+ encoders and you might find something that works. (I think it's device dependent... the achilles heel of Android.)
Exactly. HLS streaming works by creating lots of really small 5 second clips of the video that gets streamed back in order.
Reply With Quote
  #283  
Old 03-04-2013, 05:14 PM
mkanet's Avatar
mkanet mkanet is offline
SageTVaholic
 
Join Date: Feb 2004
Posts: 3,359
Is there a way to tell what's actually producing that error? Changing the different settings on mxplayer doesnt make any difference. Heck, I dont even know if mxplayer is getting the stream or not.

Quote:
Originally Posted by Dargason View Post
Sounds like progress... those video files (each about 4-5s long) are normal. or at least I'm getting them too.

You might try a different video player, but first you should look at the settings in MX Player. You can enable and disable SW and HW+ encoders and you might find something that works. (I think it's device dependent... the achilles heel of Android.)
__________________
Upgraded to Comcast X1 + Netflix/Amazon Video streaming

***RIP SageTV***
Reply With Quote
  #284  
Old 03-04-2013, 06:02 PM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by stuckless View Post
All changes are stored in the Sage.properties (which may only get persisted to disk when SageTV shuts down).

So, if you make the changes, and shutdown sagetv, you can check the Sage.properties and see if has, phoenix/streaming/vlc/wifi_low in there.

FYI, in bmt, if you click on the question mark on the property, it open a dialog shows the "Sage Property" key, which is the key that is used in the Sage.properties file.

I have support for using a custom script, but I haven't baked it into the App yet. ie, the custom script, basically calls a custom script that you define, passing in the parameters for the output file, profile name, etc.

Just curious... did you change the values using a client/extender, or did you change the values using BMT. (if you used a client, then that may be a reason why it's not picking up)
OK, that explains it. It is not getting stored in my Sage.properties. I changed the values using BMT via the web interface. Maybe the problem has something to do with running the server on Linux?

Anyway, I hacked up a wrapper for the cvlc script that runs the arguments through sed, and adds ',channels=2' to the end of the acodec section. I'll test that later..

Thanks,
Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #285  
Old 03-04-2013, 06:21 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by mkanet View Post
Is there a way to tell what's actually producing that error? Changing the different settings on mxplayer doesnt make any difference. Heck, I dont even know if mxplayer is getting the stream or not.
Do you get prompted to start MX Player? (Or any other player)
Reply With Quote
  #286  
Old 03-04-2013, 06:23 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by drewg View Post
OK, that explains it. It is not getting stored in my Sage.properties. I changed the values using BMT via the web interface. Maybe the problem has something to do with running the server on Linux?

Anyway, I hacked up a wrapper for the cvlc script that runs the arguments through sed, and adds ',channels=2' to the end of the acodec section. I'll test that later..

Thanks,
Drew
That is odd... I run linux server as well, and I've never see this issue. Is your Sage.properties writable by the user the sagetv server is running? (ie, is your Sage.properties owned by root?)
Reply With Quote
  #287  
Old 03-04-2013, 06:52 PM
Dargason Dargason is offline
Sage Expert
 
Join Date: Oct 2003
Posts: 516
Quote:
Originally Posted by mkanet View Post
Is there a way to tell what's actually producing that error? Changing the different settings on mxplayer doesnt make any difference. Heck, I dont even know if mxplayer is getting the stream or not.
When you get the error, do you find yourself in MX Player or Phoenix App?

That error "This video cannot be played." sounds exactly like the error I sometimes get from MX Player when it can't handle a file. If you're getting the error and you find yourself in MX Player, it could be that it just can't decode the file. You could try another player.

Also, as stuckless mentioned, if you're seeing a dialog pop up asking for which video player you want to use, that's a sign that the video player is the one choking on the file. You won't see this dialog if you have a default video player setting, btw, so you might want to clear it as a check.
Reply With Quote
  #288  
Old 03-04-2013, 07:38 PM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by stuckless View Post
That is odd... I run linux server as well, and I've never see this issue. Is your Sage.properties writable by the user the sagetv server is running? (ie, is your Sage.properties owned by root?)
Yes, it is owned by the sagetv user (not root), which is what I run sagetv as.
Eg:

Code:
% ls -l ~sagetv/server/Sage.properties
-rw-rw-r-- 1 sagetv sagetv 278943 Mar  4 20:09 /home/sagetv/server/Sage.properties
% ps -ef | grep java
sagetv    3845  3837  1 08:40 pts/19   00:13:00 java -Djava.awt.headless=true -DUSERKEY=xxxxx......
% grep -i wifi ~sagetv/server/Sage.properties
%
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #289  
Old 03-04-2013, 08:00 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by drewg View Post
Yes, it is owned by the sagetv user (not root), which is what I run sagetv as.
Eg:

Code:
% ls -l ~sagetv/server/Sage.properties
-rw-rw-r-- 1 sagetv sagetv 278943 Mar  4 20:09 /home/sagetv/server/Sage.properties
% ps -ef | grep java
sagetv    3845  3837  1 08:40 pts/19   00:13:00 java -Djava.awt.headless=true -DUSERKEY=xxxxx......
% grep -i wifi ~sagetv/server/Sage.properties
%
So just to confirm... in bmt, when you go to the VLC configuration section, you can see that that channels=2 is there... but it's not in the Sage.properties, and it's not being passed across to your script?
Reply With Quote
  #290  
Old 03-05-2013, 09:04 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by stuckless View Post
So just to confirm... in bmt, when you go to the VLC configuration section, you can see that that channels=2 is there... but it's not in the Sage.properties, and it's not being passed across to your script?
Yes, that is correct. I had been using chrome, and I think that was the problem.

This morning before work, I restarted the server and using firefox, found that the values did not persist across the restart. I then added the "channels=2", saved them again (from firefox), and this time they were added to sage.properties & survived the restart. So, maybe there is some funkiness with chrome and/or ghostery & javascript, etc.

But then even though I had 'channels=2' I still had no audio. So I checked the transcoded chunks in ~sagetv/server/userdata/Phoenix/streaming/fba139ca-7481-3c19-8184-244b9e49a352/*.ts, and they had no audio.

So then I changed the acodec to aac, and finally things work!!!!

Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #291  
Old 03-05-2013, 09:23 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
ffwd / rewind?

Does fast-forward or rewind work with any android clients? I've tried mx player and the build in video player on my nexus 7, and I can't seem to ffwd or rewind even though the transcode is far enough ahead to theoretically allow it..

Or is this a bug in how phoenix is setting up the "live" http streaming stuff?

Thanks,

Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #292  
Old 03-05-2013, 09:38 AM
Dargason Dargason is offline
Sage Expert
 
Join Date: Oct 2003
Posts: 516
Fast forward, rewind, seek, etc. do not work. You can pause and resume though.
Reply With Quote
  #293  
Old 03-05-2013, 10:31 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by Dargason View Post
Fast forward, rewind, seek, etc. do not work. You can pause and resume though.
Is this a fundamental limitation with the approach used by this app, or just a bug?

Thanks,
Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #294  
Old 03-05-2013, 11:49 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by drewg View Post
Yes, that is correct. I had been using chrome, and I think that was the problem.
I use chome (under ubuntu) for my testing/usage... I haven't encountered any issue... but I need to push out a new bmt build using gwt 2.5 so that may fix your issue.

Quote:
Originally Posted by drewg View Post
Does fast-forward or rewind work with any android clients? I've tried mx player and the build in video player on my nexus 7, and I can't seem to ffwd or rewind even though the transcode is far enough ahead to theoretically allow it..

Or is this a bug in how phoenix is setting up the "live" http streaming stuff?

Thanks,

Drew
Quote:
Originally Posted by Dargason View Post
Fast forward, rewind, seek, etc. do not work. You can pause and resume though.
Quote:
Originally Posted by drewg View Post
Is this a fundamental limitation with the approach used by this app, or just a bug?

Thanks,
Drew

It's a fundmental feature of how the vlc hls streaming stuff works... (unless you can see some "tweak" that enables it)

I will at some point look at building a complementary solution to this using vlc and rtsp with a vlc remote interface that "may" enable seeking, etc. That's a "phase 2"
Reply With Quote
  #295  
Old 03-05-2013, 11:49 AM
mkanet's Avatar
mkanet mkanet is offline
SageTVaholic
 
Join Date: Feb 2004
Posts: 3,359
I dont get prompted to start MX player. About one second or so after selecting the priofile and seeing the spinning circle, I get the the generic error message:

"Sorry, this video cannot be played"

It doesnt make any difference if I change the Wait Timeout (Seconds) to

It looks like the .ts files do get created/transcoded on the server.

I'm still not sure if its my server that stops streaming the video or my phone. Maybe the media file type association on my android phone needs to be manually defined?

Quote:
Originally Posted by stuckless View Post
Do you get prompted to start MX Player? (Or any other player)
Quote:
Originally Posted by Dargason View Post
When you get the error, do you find yourself in MX Player or Phoenix App?

That error "This video cannot be played." sounds exactly like the error I sometimes get from MX Player when it can't handle a file. If you're getting the error and you find yourself in MX Player, it could be that it just can't decode the file. You could try another player.

Also, as stuckless mentioned, if you're seeing a dialog pop up asking for which video player you want to use, that's a sign that the video player is the one choking on the file. You won't see this dialog if you have a default video player setting, btw, so you might want to clear it as a check.
__________________
Upgraded to Comcast X1 + Netflix/Amazon Video streaming

***RIP SageTV***
Reply With Quote
  #296  
Old 03-05-2013, 12:18 PM
Dargason Dargason is offline
Sage Expert
 
Join Date: Oct 2003
Posts: 516
If you're not getting prompted, it could be because you already chose a different player as your default player. (Perhaps the one provided by android, for example). The default android player is very limited in what it can play.

Try to figure out how to clear the default settings... it will be different depending one what version of android you have, but it's certainly under the settings menu somewhere. Once you clear the default setting, you should be prompted which player to use, and then you can pick MX Player.

Edit: On my gingerbread phone, you go to "Settings -> Applications -> Manage applications", then you pick the application you want to clear settings for (ie the video player you think is being used instead of MX Player). Then scroll down to where it says "Launch by default" and press the clear button.

Last edited by Dargason; 03-05-2013 at 12:24 PM.
Reply With Quote
  #297  
Old 03-05-2013, 12:59 PM
mkanet's Avatar
mkanet mkanet is offline
SageTVaholic
 
Join Date: Feb 2004
Posts: 3,359
Thanks! I just successfully changed the default media player to MX player. I still get the same error message about 1-2 seconds of the spinning circle. I get the same behavior no matter what I set the default media player to. I'm guessing the video stream doesnt reach my phone.

Quote:
Originally Posted by Dargason View Post
If you're not getting prompted, it could be because you already chose a different player as your default player. (Perhaps the one provided by android, for example). The default android player is very limited in what it can play.

Try to figure out how to clear the default settings... it will be different depending one what version of android you have, but it's certainly under the settings menu somewhere. Once you clear the default setting, you should be prompted which player to use, and then you can pick MX Player.

Edit: On my gingerbread phone, you go to "Settings -> Applications -> Manage applications", then you pick the application you want to clear settings for (ie the video player you think is being used instead of MX Player). Then scroll down to where it says "Launch by default" and press the clear button.
__________________
Upgraded to Comcast X1 + Netflix/Amazon Video streaming

***RIP SageTV***
Reply With Quote
  #298  
Old 03-05-2013, 01:38 PM
HuMan321's Avatar
HuMan321 HuMan321 is offline
Sage Aficionado
 
Join Date: Apr 2009
Location: Idaho
Posts: 365
Quote:
Originally Posted by drewg View Post
Yes, that is correct. I had been using chrome, and I think that was the problem.

This morning before work, I restarted the server and using firefox, found that the values did not persist across the restart. I then added the "channels=2", saved them again (from firefox), and this time they were added to sage.properties & survived the restart. So, maybe there is some funkiness with chrome and/or ghostery & javascript, etc.

But then even though I had 'channels=2' I still had no audio. So I checked the transcoded chunks in ~sagetv/server/userdata/Phoenix/streaming/fba139ca-7481-3c19-8184-244b9e49a352/*.ts, and they had no audio.

So then I changed the acodec to aac, and finally things work!!!!

Drew
Can the transcoded files be configured to a user defined location? I use WHS and do not have much room on my 20GB "C" drive and would like to have transcoded files go to the shared drives if possible.
Reply With Quote
  #299  
Old 03-05-2013, 01:40 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by mkanet View Post
Thanks! I just successfully changed the default media player to MX player. I still get the same error message about 1-2 seconds of the spinning circle. I get the same behavior no matter what I set the default media player to. I'm guessing the video stream doesnt reach my phone.
It might be a timing issue, not sure... I don't set a "default" player, so I prompted to choose a player which takes an extra second or so... the server only waits until vlc creats the html file... may be it hasn't finished "writing" the file before your player tries to read the stream. Can you unset a default player, so that you give yourself extra time and see if that makes a difference... if so, then I can look at updating the server to wait a little long after the file is created.
Reply With Quote
  #300  
Old 03-05-2013, 02:36 PM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by stuckless View Post
I use chome (under ubuntu) for my testing/usage... I haven't encountered any issue... but I need to push out a new bmt build using gwt 2.5 so that may fix your issue.
It may have been the ghostery add-on, or it might just be a PBKC. At any rate, now that I know about the sage.properties, that's how I'll change it. Give me vi over a web form any day




In regard to ffwd / rewind:

Quote:
Originally Posted by stuckless View Post
It's a fundmental feature of how the vlc hls streaming stuff works... (unless you can see some "tweak" that enables it)

I will at some point look at building a complementary solution to this using vlc and rtsp with a vlc remote interface that "may" enable seeking, etc. That's a "phase 2"
Ugh. This just got a lot less interesting for me. Drat..

FWIW, using the plex transcoder & the plex xbmc app setup to use mxplayer to play the video, it looks like Plex transcodes using similar formats (same m3u8), and yet it is seekable in mxplayer. Mxplayer shows the entire show length on the timeline for plex/xbmc, but shows nothing for your sage app. One thing I noticed was that if I snoop the network, I see 2 differences in the extm3u file. One is that that plex generates a complete extm3u file (eg, all the chunks are there). Where the sage app generates an incomplete extm3u file, where the chunks seem to appear as they are transcoded. Also, the header format seems a bit different. eg:
Plex:
Code:
#EXTM3U
#EXT-X-TARGETDURATION:4
#EXT-X-ALLOW-CACHE:NO
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:4, nodesc
00000.ts
#EXTINF:4, nodesc
00001.ts
<...>
Sageapp:
Code:
#EXTM3U
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:5,
http://192.168.200.2:8080/sagex/streaming/files/fba139ca-7481-3c19-8184-244b9e49a352/3876863-00000001.ts
#EXTINF:5,
Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
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
Utility: Phoenix Tools - Phoenix Renamer stuckless SageTV v7 Customizations 116 04-27-2017 10:42 AM
dream to ability view SageTV recordings on Android bjkiller SageTV v7 Customizations 4 09-06-2012 03:16 PM
SageTV Placeshifter for Android nyle SageTV Placeshifter 5 12-31-2011 10:40 AM
SageTV Studio & Android Brent The SageTV Community 5 07-11-2011 06:20 AM
SageTV as Android for TVs? perholm General Discussion 10 06-23-2011 08:26 PM


All times are GMT -6. The time now is 06:56 PM.


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