SageTV Community  

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

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #2221  
Old 01-30-2009, 03:20 PM
AzJazz's Avatar
AzJazz AzJazz is offline
Sage Advanced User
 
Join Date: Feb 2008
Posts: 237
Problems with streaming to my phone

When I try to stream videos to my phone, sometimes I am successful. Most times, though, I get an "Unhandled win32 exception" for vlc on my Sage Server PC.

Does anybody know what is going wrong?
Reply With Quote
  #2222  
Old 01-30-2009, 04:50 PM
Zorglub Zorglub is offline
Sage User
 
Join Date: May 2006
Location: Montreal, QC
Posts: 46
Question using XMLImporter through the command line

I would like to be able to use the XMLImporter via a command line, either through wget, lynx, etc.. OR with java.

I plan on automatizing (is that a word ? ) the importation of my TV episodes that I get from other means than through recording (download, DVD transfer, VHS tapes, etc...), and I need to be able to include this function in a batch file. (see this for more details...)

I assume it would look something like that:

wget.exe "http://username:ypassword@localhost:8080/sage/XMLImporter&&FileName=N:\MEDIA\Videos\TV\sometvepisode.xml"

But I think I would need to pass other parameters like "import tv files", etc... to make it work. I am also not sure that I am calling the right thing (XMLIMporter) ....

Any clue ?
Reply With Quote
  #2223  
Old 01-30-2009, 07:45 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
I'll see if I can give you enough buzzwords to point you in the right direction

XMLImporter (source) is the right servlet to use. The data will have to be submitted using the HTTP POST method and a multipart form. By default wget uses HTTP GET, however it does have command line parameters to do POST requests but I haven't used it.

There are also libraries for Java (Apache has one) that can do HTTP form posting. I'm sure it can be done via scripting languages (python, perl, etc) as well.

Another option would be to use Stuckless' remote APIs along with his scripting framework and nielm's sagexmlinfo jar file to do the same thing the servlet does (parse the xml and call Sage APIs) but from your own script on the command line.

Take a look at the page source for /sage/XMLImporter to see all the form fields that need to be submitted.

That's pretty high level but hopefully gives you an idea of what's necessary.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #2224  
Old 01-30-2009, 08:34 PM
Zorglub Zorglub is offline
Sage User
 
Join Date: May 2006
Location: Montreal, QC
Posts: 46
Thanks for the buzzwords

I went through much of those options already, but although the Stuckless's and nielm's stuff are really great, I was looking for a "quick and dirty solution"

After some ready on curl (which seem to be able to handle POST better than wget) and a lot of fidlding around, I came up with the good syntax:

(FWI: this has been tested on Cygwin)

curl -F "impTVFiles=checked" \
-F "impShowOverwrite=checked" \
-F "impMFOverwrite=checked" \
-F "impMFRename=keep" \
-F "impMFRedate=redateFromAiring" \
-F "xmlFile=@exemple.xml" \
-F "Import=submit" \
http://username:fpasswd@locahost:808...ter?Import=yes

Now if I can convince evilpenguin to modify his mediaScraper to output xml files, I'll be in Heaven, and so will my wife !!!
Reply With Quote
  #2225  
Old 02-01-2009, 11:02 AM
jsschrstrcks jsschrstrcks is offline
Sage User
 
Join Date: Jan 2009
Posts: 21
So, if one has a dynamic, as opposed to static IP, how does one go about always knowing the IP address? For instance, i'm going to the UK in may, for 2 months, and there are some shows i'd like to record on schedule, but it would be cool, if from the UK i could log in, and set something to record on my desktop here in the states.

Is this functionality already included?

If not, could it be bound to a Hamachi IP address? Hamachi if you don't know, is a program that lets you create a vpn without having a static IP through your ISP, they give you a static IP, you log in, their service connects the two computers, and then the service lets the two computers talk, and gets out of the middle.
__________________
Phenom Quad Core x64 2.66ghz Processor, MSI K9n SLI Platinum Motherboard, 8gb Corsair 1066mhz ddr2, Geforce 8500 Video Card, Windows 7 Ultimate x64, Latest Sage TV beta
http://www.kenbakerwebdesign.com http://www.apostlesforchrist.com<br> http://www.kbworldmissions.org
Reply With Quote
  #2226  
Old 02-01-2009, 11:13 AM
nspindel nspindel is offline
Sage Advanced User
 
Join Date: Jun 2004
Location: Stamford, CT
Posts: 122
Use a dynamic dns service. So instead of connecting to an ip address, you get a named url to connect to. You install a service on your server that pings your cable modem (or whatever you use) to check your ip address at some timed interval, like every 5 minutes. If it notices a change, it updates the dns entry. So if your ip address changes, the maximum amount of time it would be out of sync would be 5 minutes. I use dyndns - it's free and works great.
Reply With Quote
  #2227  
Old 02-02-2009, 12:37 PM
AzJazz's Avatar
AzJazz AzJazz is offline
Sage Advanced User
 
Join Date: Feb 2008
Posts: 237
Quote:
Originally Posted by AzJazz View Post
When I try to stream videos to my phone, sometimes I am successful. Most times, though, I get an "Unhandled win32 exception" for vlc on my Sage Server PC.

Does anybody know what is going wrong?
Anybody? Anybody? Bueller? Bueller?
Reply With Quote
  #2228  
Old 02-02-2009, 01:27 PM
matt91's Avatar
matt91 matt91 is offline
Sage Icon
 
Join Date: Feb 2005
Location: Washington, DC
Posts: 1,185
Quote:
Originally Posted by nspindel View Post
You install a service on your server that pings your cable modem (or whatever you use) to check your ip address
...
Some router firmware (e.g., DD-WRT) does this too. No need for interaction on the part of the PC; the router detects a change and automagically updates your new IP on the www.
__________________
Server: Ubuntu 16.04 running Sage for Linux v9
Reply With Quote
  #2229  
Old 02-02-2009, 03:39 PM
hoadie hoadie is offline
Sage User
 
Join Date: Dec 2003
Location: Sydney, Australia
Posts: 44
Quote:
Originally Posted by jsschrstrcks View Post
So, if one has a dynamic, as opposed to static IP, how does one go about always knowing the IP address? For instance, i'm going to the UK in may, for 2 months, and there are some shows i'd like to record on schedule, but it would be cool, if from the UK i could log in, and set something to record on my desktop here in the states.
http://www.dyndns.com/
Reply With Quote
  #2230  
Old 02-06-2009, 12:34 AM
AzJazz's Avatar
AzJazz AzJazz is offline
Sage Advanced User
 
Join Date: Feb 2008
Posts: 237
OK - I take back my previous comments. I went back to VLC 0.8.6f, and I don't seem to be seeing the crash messages anymore.

However, it seems that I can't stream at all now. Not to my phone, or to a internet-connected PC, or to anything remote that I control via the Webserver. My home setup with my STX-HD100 still works fine, though. (Thank goodness!)

Are there any ideas on how to fix this? Is there any further information I need to provide to debug this? I'm currently running Sage 6.5.8, and I'll be upgrading to the released 6.5 tomorrow.

Any help would be appreciated!

Cheers!
Reply With Quote
  #2231  
Old 02-07-2009, 08:45 AM
Skybolt's Avatar
Skybolt Skybolt is offline
Sage Icon
 
Join Date: Aug 2006
Location: Annapolis, MD
Posts: 1,027
External App using webserver to control extender?

I am trying to use and external app to pass the web commands to the web server, I am having some trouble formulating the proper command structure.

I have tried these for the "Pause" command.

server - /sage/webremote.html?

"SageCommand?000dfe077d44=SAGETV_PROCESS_LOCAL_UI&command=Pause&returnto=webremote.html%3F000dfe077d44%3DSAGETV_PROCESS_LOCAL_UI%26000dfe077d44%3DLocal%2520SageTV"

and

"SageCommand?RetImage=no&command=Pause&000dfe077d44"

And these don't work. I am obviouly just stabbing in dark with no clue -

Does anyone no how to approach this?

Thanks,
Skybolt
Reply With Quote
  #2232  
Old 02-07-2009, 04:23 PM
MarkV MarkV is offline
Sage Advanced User
 
Join Date: Jan 2007
Posts: 83
Quote:
Originally Posted by Skybolt View Post
I am trying to use and external app to pass the web commands to the web server, I am having some trouble formulating the proper command structure.

I have tried these for the "Pause" command.

server - /sage/webremote.html?

"SageCommand?000dfe077d44=SAGETV_PROCESS_LOCAL_UI&command=Pause&returnto=webremote.html%3F000dfe077d44%3DSAGETV_PROCESS_LOCAL_UI%26000dfe077d44%3DLocal%2520SageTV"

and

"SageCommand?RetImage=no&command=Pause&000dfe077d44"

And these don't work. I am obviouly just stabbing in dark with no clue -

Does anyone no how to approach this?

Thanks,
Skybolt
I have a host of commands from a javascript app (Pronto TSU9600) that I will post when I'm on a PC later tonight. It did take some trial and error. You should be able to practically use them directly. Extender and Client are a bit different. If you can't wait, there is a list somewhere in this thread. Or you can use the webremote and look at the calls that are made when clicked.
Reply With Quote
  #2233  
Old 02-08-2009, 08:06 AM
Skybolt's Avatar
Skybolt Skybolt is offline
Sage Icon
 
Join Date: Aug 2006
Location: Annapolis, MD
Posts: 1,027
Quote:
Originally Posted by MarkV View Post
... Or you can use the webremote and look at the calls that are made when clicked.
yeah - that's how I formulated the commands above, but they don't seem to work.

Thanks for your offer to post code.
-Skybolt
Reply With Quote
  #2234  
Old 02-08-2009, 08:45 AM
Skybolt's Avatar
Skybolt Skybolt is offline
Sage Icon
 
Join Date: Aug 2006
Location: Annapolis, MD
Posts: 1,027
I got it - thanks to wire shark.

If anyone is interested, just open the webremote.html file and get the proper word for the command such as "play" and us it in theis line, where context is the MAC address of the extender.

"http://192.168.2.51:87/sage/SageCommand?RetImage=no&nocache=1234103577546&command=Play&context=000dfe077d44"

The reason this is of value to me is for HomeSeer Touch. Tis now allows me to make a custom interface and use these commands to control a specific extender. This is alot quicker and more customizable then the web interface it self.

-Skybolt
Reply With Quote
  #2235  
Old 02-08-2009, 02:26 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
Quote:
Originally Posted by Fonceur View Post
Actually, by adding your delays I got Nielm's code to work, so one less .jar to worry about.
Fonceur, the quote is from your post #2079, if you still have the source for this could you post it? I'll check it into the web server source on SourceForge.

Thanks.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #2236  
Old 02-08-2009, 11:08 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
Quote:
Originally Posted by AzJazz View Post
OK - I take back my previous comments. I went back to VLC 0.8.6f, and I don't seem to be seeing the crash messages anymore.

However, it seems that I can't stream at all now. Not to my phone, or to a internet-connected PC, or to anything remote that I control via the Webserver. My home setup with my STX-HD100 still works fine, though. (Thank goodness!)

Are there any ideas on how to fix this? Is there any further information I need to provide to debug this? I'm currently running Sage 6.5.8, and I'll be upgrading to the released 6.5 tomorrow.

Any help would be appreciated!

Cheers!
Make sure debug logging is enabled in Sage.properties and transcode.properties then check sagetv_0.txt and the latest file in the webserver/logs folder for any error messages.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #2237  
Old 02-09-2009, 12:52 AM
MickBurke's Avatar
MickBurke MickBurke is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 318
I haven't used this before, but I assume the 2.2 version that is available works and is stable with version 6.59 of the Sage server?
Reply With Quote
  #2238  
Old 02-09-2009, 10:04 AM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
Yes. I've been using it with 6.5.9 for a few days now without any problems.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #2239  
Old 02-10-2009, 01:17 PM
deadend5001 deadend5001 is offline
Sage User
 
Join Date: Mar 2008
Posts: 71
Is there a way to automatically import the XML recordings instead of doing one-by-one via the web interface?
Reply With Quote
  #2240  
Old 02-13-2009, 07:34 AM
AzJazz's Avatar
AzJazz AzJazz is offline
Sage Advanced User
 
Join Date: Feb 2008
Posts: 237
Quote:
Originally Posted by jreichen View Post
Make sure debug logging is enabled in Sage.properties and transcode.properties then check sagetv_0.txt and the latest file in the webserver/logs folder for any error messages.
Thanks for the suggestion, jreichen - here's what I found in my webserver log:

Quote:
[Thu Feb 12 20:23:56 GMT-07:00 2009] /sagepublic/MediaFileTranscode: MediaFileTranscodeServlet.doServletGet(): Retrieveing Airing Info
[Thu Feb 12 20:23:56 GMT-07:00 2009] /sagepublic/MediaFileTranscode: doServletGet(): Retrieveing transcoding parameters
[Thu Feb 12 20:23:56 GMT-07:00 2009] /sagepublic/MediaFileTranscode: doServletGet(): File to play: F:\Videos\LifeonMars-TakeaLookattheLawmen-5523439-0.mpg
[Thu Feb 12 20:23:56 GMT-07:00 2009] /sagepublic/MediaFileTranscode: doServletGet(): Starting the transcode process.
[Thu Feb 12 20:23:56 GMT-07:00 2009] Executing command: "C:\Program Files\VideoLAN\VLC\vlc.exe" -I dummy --dummy-quiet --quiet --no-sub-autodetect-file "F:\Videos\LifeonMars-TakeaLookattheLawmen-5523439-0.mpg" :sout=#transcode{vcodec=WMV2,vb=768,scale=1,acodec=mp3,ab=128,channels=2,threads=2,deinterlace}:duplicate{dst=std{access=http,mux=asf,dst=127.0.0.1:8000}}
[Thu Feb 12 20:23:56 GMT-07:00 2009] VLC(err): [00000001] main libvlc debug: VLC media player - version 0.9.8a Grishenko - (c) 1996-2008 the VideoLAN team
[Thu Feb 12 20:23:56 GMT-07:00 2009] VLC(err): [00000001] main libvlc debug: libvlc was configured with ./configure '--host=i586-mingw32msvc' '--build=i386-linux' '--enable-mkv' '--enable-release' '--without-contrib' '--enable-nls' '--enable-shared-libvlc' '--enable-update-check' '--enable-lua' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-twolame' '--enable-quicktime' '--enable-real' '--enable-realrtsp' '--enable-ffmpeg' '--with-ffmpeg-mp3lame' '--with-ffmpeg-faac' '--with-ffmpeg-config-path=/usr/win32/bin' '--with-ffmpeg-zlib' '--enable-live555' '--with-live555-tree=/usr/win32/live.com' '--ena
[Thu Feb 12 20:23:56 GMT-07:00 2009] VLC(err): [00000001] main libvlc debug: translation test: code is "C"
[Thu Feb 12 20:23:57 GMT-07:00 2009] Connected to sun.net.http://www.protocol.http.HttpURLConn...127.0.0.1:8000
[Thu Feb 12 20:23:57 GMT-07:00 2009] Returning InputStream: net.sf.sageplugins.webserver.TranscodeInputStream@138a4de
[Thu Feb 12 20:23:57 GMT-07:00 2009] /sagepublic/MediaFileTranscode: doServletGet(): Copying transcode stream to outputstream
[Thu Feb 12 20:23:58 GMT-07:00 2009] /sagepublic/MediaFileTranscode: doServletGet(): Stopping transcode due: java.net.SocketException: Connection reset
My sagetv_0.txt file didn't contain much of interest, but this line appeared at about the right time for the error:

Quote:
Thu 2/12 20:25:34.996 UPnP ERROR:net.sbbi.upnp.messages.UPNPResponseException: Detailed error code :501, Detailed error description :Internal Server Error
Any ideas?
Reply With Quote
Reply

Tags
web


Currently Active Users Viewing This Thread: 2 (0 members and 2 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
Plugin: Mobile Web Interface 1.2 jreichen SageTV Customizations 281 06-17-2011 02:20 PM
Can't get Web-based User Interface to install SSBrian SageTV Customizations 3 11-04-2008 08:12 PM
Web User interface link for the metadata file. zzmystique SageTV Customizations 0 06-21-2008 02:26 AM
Idea to enhance the Web User Interface: Messaging jbarr SageTV Customizations 3 05-14-2007 03:59 PM
Linkplayer, Linktheater with SageTV Web User Interface fyodor SageTV Customizations 0 10-08-2006 06:03 PM


All times are GMT -6. The time now is 09:52 PM.


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