|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#21
|
|||
|
|||
localhost
127.0.0.1 is the ip address for 'localhost'. In my case, I was clicking on the sage interface from the same PC.
I'm not sure yet whether the 127.0.0.1 you put into the 'sout' VLC option is the source IP address or destination IP address. I know in some streaming modes (such as UDP), VLC needs the destination address... it just starts streaming video to that IP addr as soon as you launch VLC. In other modes (HTTP), VLC listens for a connection, then begins streaming. I'm pretty sure that the mode that Sage is using is the latter, because I saw in 'netstat -ao' that VLC was listening on those ports. Just checked the command line I posted, yep.. it's using the HTTP mode. Also, if you use 'netstat -aob' windows will go ahead and fish out the process's name for you. Or, you can use task manager to relate the PID and process name. So if you're worried about XP services possibly colliding with ports you're trying to use for Sage/VLC, then you can check beforehand. When Sage kicks off the VLC process, is VLC responsible for accepting the connection to the outside world, or is Sage doing that and piping data between VLC and the external connection? I've been assuming VLC is doing it. How does the Sage webserver direct the client to the right VLC port? (Guessing that if ports 8000 and 8001 are in use for one connection, then VLC and/or Sage is going to use 8002 and 8003 for the second connection?) - J. |
#22
|
||||
|
||||
Technically that's your streaming server that you will access from another player, at least for the HTTP method. Have you been able to stream to the Android through that command line test? I only have an Android emulator, but when I pointed Safari to ip:8000 it complained about not being able to determine the size of download.bin and just refused to stream... Maybe I just need to change the access to rpt 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 |
#23
|
|||
|
|||
I just started playing with VLC recently. Haven't had much luck yet with VLC + Android, but over on the VLC forums it seemed like some people had some luck.
When I put in my hard coded URL on the android phone, I was able to start downloading the mpeg stream, but since it was probably going to be something like a 100MB file, I stopped the download. Didn't have time to try to get sage to stream me a 3 second clip that'd be easier to test with. If you figure that out, post your working VLC command line if you don't mind. - J. |
#24
|
||||
|
||||
With my server at 192.168.0.102, port 8000, I can use the command:
Code:
"C:\Program Files\VideoLAN\VLC\vlc.exe" -I dummy --no-sub-autodetect-file "Troisfugitifs-512272-0.mpg" --sout "#transcode{vcodec=h264,venc=x264{no-cabac,level=12,vbv-maxrate=384,vbv-bufsize=1000,keyint=75,ref=3,bframes=0},width=320,height=180,acodec=mp4a,ab=64,vb=384}:rtp{dst=192.168.0.102,port=8000,sdp=rtsp://192.168.0.102:8000/stream.sdp,mp4a-latm}" I tried using that in the emulator, but Safari just does a google search, instead of using it (might need to embed it in an html file or something). Launching MediaPlayer with it crashes with an error (1, -1)/PVMFFailure, which might be an emulator issue due to not having accessing to the UPD stream with it or something.
__________________
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 |
#25
|
|||
|
|||
Android phone browsers can't take an rtsp link directly, must be in an html file as a link. Clicking on that link will then call up the medai player.
|
#26
|
||||
|
||||
Yeah, that's what I thought I had read... After more reading, it does seem like I won't be able to stream to the emulator anyway, so much for that...
__________________
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 |
#27
|
|||
|
|||
building webserver?
jreichen, do you have a guide anywhere that describes how to build the webserver from source? Was kind of interested in maybe instrumenting it with prints or experimenting with changing some of the defaults encodings supported, etc. Thought it'd be "easy".
I downloaded it from sourceforge in CVS, poked around and didn't see any obvious README/BUILDING style instructions... tried just loading 'webserver' in Eclipse (Galileo, Java EE version) with 'New->Project->Java Project from Existing Ant Buildfile', selected webserver/build.xml. Eclipse did its initial compile.. I got 1424 errors, so something is not right. A lot of it just looks like maybe it's pointing at the wrong version of Java. I'm just doing something dumb, I'm sure. It looks like maybe you're using cygwin for some of your make/build. What are you using for your IDE? I did my CVS checkout into C:\cvs\sageplugins\webserver. There aren't any dependencies on directory path, are there..? Everything is relative? I only know enough about Java and Eclipse to be dangerous, not useful, so there's probably an "oh duh" waiting to happen. I didn't see anything on the source forge site, either. Thanks, - J. |
#28
|
||||
|
||||
OK, so I can create the rtsp or http stream just fine in SageTCPServer, with plenty of configurable options... The only issue is that I'm using the Android emulator, which doesn't support multi-cast and other things like that, which means streaming (or UPnP, etc.) won't work for me, but if someone with a real device want to be the guinea pig, just send me a pm with an email where I can send you the latest taSageTV.apk file...
__________________
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 |
#29
|
||||||
|
||||||
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
__________________
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. |
#30
|
||||
|
||||
ffmpeg is another transcoding engine option but AFAIK it doesn't support rtsp.
__________________
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. |
#31
|
||||
|
||||
Quote:
I use Eclipse as my IDE. To load the web server project into Eclipse, go to File -> Import, Projects from CVS. You'll need to do that for the webserver, sageutils, and sagexmlinfo projects. Follow the steps in the wizard to connect the project to CVS and pull the code down. Sourceforge has documentation about checking out for anonymous or developer access. You also need to go to Windows -> Preferences -> Java -> Build Path -> Classpath Variables and set up a variable named SAGE_JAR that points to the Sage.jar file on your machine. Nielm used cygwin to build the project when he used to do the builds. I created an ant script when I took over and don't use the cygwin scripts. To test the webserver, I copy the zip file for Jetty to the server then unzip it and "touch" the context file.
__________________
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. |
#32
|
||||
|
||||
Since I got the VLC part streaming, for now I will stick with it, unless we really can't get the Android devices to process those streams...
__________________
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 |
#33
|
|||
|
|||
got webserver building
Thanks, those instructions worked. I had to remove the NSIS part of the ant build file, since I didn't have NSIS and didn't want to build the TJWS builds. (More for others that come this way at some point in the future...)
Also, I have the two webserver war files installed side by side.. I renamed my war file to test_webserver.war and created my own test context file, updating paths in the context file as appropriate. - J. |
#34
|
|||
|
|||
logs showing failure on server side
@jreichen,
Got some logs that I think are showing that the file is coming over the wire with the truncated link. Gzip is now disabled, so should be easier to see now: Code:
GET /sage/public/PlaylistGenerator?Command=generate&pltype=wvx&fntype=url&MediaFileId=300316&TranscodeOpts=mode=vlc&vc=h264&vb=96&ac=mp3&ab=32&scale=0.25&mux=ts&deint=1 HTTP/1.1 Cookie: grid_num_hours=6; grid_num_chans=999 Host: sageserver:8888 Connection: Keep-Alive User-Agent: Mozilla/5.0 (Linux; U; Android 2.0.1; en-us; Droid Build/ESD56) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 HTTP/1.1 200 OK Date: Sun, 28 Mar 2010 18:40:21 GMT Content-Type: video/x-ms-wvx Content-Disposition: attachment; filename=playlist.wvx Content-Length: 268 Server: Jetty(6.1.x) <asx Version = "3.0"> <title>Downloaded Playlist</title> <entry> <title>"Make" at Mon, Mar 8 10:00 AM on 32-2 KRINDT2</Title> <ref href="http://sageserver:8888/sage/public/MediaFileTranscode?MediaFileId=300316&Segment=0&mode=vlc"/> </entry> </Asx> [Edit: This was clicking on the H264 128kbit deinterlaced quarter-res, Play In External Player links. Verifed the same link is generated in the M3U and PLS files as well.] Last edited by jrjbertram; 03-28-2010 at 12:48 PM. |
#35
|
|||
|
|||
broken url encodings
I think I figured out what's going wrong... the URL that's being submitted is coming to the server unencoded:
From windows PC, clicking on one of the playlist links: Code:
TranscodeOpts=mode%3Dvlc%26vc%3Dh264%26vb%3D96%26ac%3Dmp3%26ab%3D32%26scale%3D0.25%26mux%3Dts%26deint%3D1 Code:
TranscodeOpts=mode=vlc&vc=h264&vb=96&ac=mp3&ab=32&scale=0.25&mux=ts&deint=1 So is that a phone bug or can the webserver be modified to spit out a pre-encoded URL? And how was windows (or I guess Chrome in this case) smart enough to re-encode the URL the right way? - Josh. |
#36
|
|||
|
|||
bahhhhg!
Here's what one of the links looks like when I view the source from windows/chrome:
Code:
<a href="player.html?fntype=url&title=Make+-+Fire+Sculpture&filename=Make-FireSculpture-35212-0.mpg&MediaFileId=300316&filename=TranscodedVideo.mpg&TranscodeOpts=mode%3Dvlc%26vc%3Dmp2v%26vb%3D768%26ac%3Dmp2a%26ab%3D128%26scale%3D1%26mux%3Dts" - J. |
#37
|
||||
|
||||
Would you mind grabbing the corresponding entry from the most recent request log in jetty/logs so I can compare to what I have on my server?
I have an iPhone (also the WebKit browser) and the request URL is fine. It doesn't handle the playlist but that's not the concern, it's the URL format.
__________________
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. |
#38
|
||||
|
||||
I think you're right. I'm surprised the iPhone doesn't unencode it since they're both using the WebKit browser. Now just to find a workaround...
__________________
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. |
#39
|
|||
|
|||
possible workaround
Could you substitute '&' and '=' with some other character that'll survive the normal URL parameter parsing? (maybe "_" and I don't know.. "~") Then restore the proper URL here with string replace after the getParameter call?
Code:
private void ExportMediaFile(HttpServletRequest req, LinkedList<PlaylistItemInfo> playListItems, Object mediafile, int fntype) throws Exception { if ( mediafile == null || !SageApi.booleanApi("IsMediaFileObject",new Object[]{mediafile})) { log("ExportMediaFile: Not a mediafile "+mediafile); return; } String transcodeOpts =req.getParameter("TranscodeOpts"); |
#40
|
||||
|
||||
Sounds like a good idea. I'll probably try something a little more unique like '_amp_' and '_eq_'.
__________________
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. |
Tags |
android, error, jetty, streaming, transcode, vlc, webserver |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Webserver Java Error | bialio | SageTV Customizations | 5 | 12-07-2007 06:56 PM |
Nielm Webserver streaming issue | kck | SageTV Customizations | 1 | 07-09-2007 11:30 AM |
VLC Player Can Play iso DVD images -- How to Make SageTV Use VLC? | bbkim | SageTV Customizations | 3 | 06-07-2007 05:24 PM |
No sound on DVB-T recordings using Webserver 2.6 and VLC | Grunter | SageTV Customizations | 0 | 03-24-2006 11:56 PM |