TiVo Community
TiVo Community
TiVo Community
Go Back   TiVo Community > Underground Playground > Developers Corner
TiVo Community
Reply
Forum Jump
 
Thread Tools
Old 03-21-2014, 04:36 PM   #121
Allanon
Registered User
 
Join Date: Nov 2005
Posts: 531
Tlc, please give more information. What video player were you using to access Tivo Proxy Server? Did this happen while the video was playing or before seeing any of the video? Did TivoDecode start? Describe what you were doing when the error occurred.
Allanon is online now   Reply With Quote
Old 03-22-2014, 08:19 PM   #122
tlc
Registered User
 
Join Date: May 2002
Posts: 460
Quote:
Originally Posted by Allanon View Post
Tlc, please give more information. What video player were you using to access Tivo Proxy Server? Did this happen while the video was playing or before seeing any of the video? Did TivoDecode start? Describe what you were doing when the error occurred.
The Broken pipe (SIGPIPE) happened when I was trying to test through a ssh tunnel from work with VLC. We have a crappy connection at work, so I can imagine the pipe getting full. But IIRC, that should give EWOULDBLOCK, not SIGIPIPE. (I don't know python does with these though.)

I saw zero video, but based on my print statements, the read/write loop ran MANY times before the exception.


Today I tested at home and it worked. But sometimes the connection fails (and VLC tries the next one). Sometimes it fails for many before one catches. VLC writes:
Quote:
[0x107da27d0] main access error: connection failed: Connection refused
[0x107da27d0] access_http access error: cannot connect to 192.168.1.222:10000
[0x107da27d0] main access error: connection failed: Connection refused
[0x107da27d0] access_mms access error: cannot connect to 192.168.1.222:10000
[0x10ae24100] main input error: open of `http://192.168.1.222:10000/download/...aying&id=83290' failed
[0x107da27d0] main access error: connection failed: Connection refused
[0x107da27d0] access_http access error: cannot connect to 192.168.1.222:10000
[0x107da27d0] main access error: connection failed: Connection refused
[0x107da27d0] access_mms access error: cannot connect to 192.168.1.222:10000
[0x10ae24100] main input error: open of `http://192.168.1.222:10000/download/...aying&id=80700' failed
...

__________________
"You want lifetime. The other plans are for suckers who can't do math." -- Bigg
tlc is offline   Reply With Quote
Old 03-23-2014, 01:05 AM   #123
telemark
Registered User
 
Join Date: Nov 2013
Posts: 811
Most internet connections will have trouble keeping up with an HD stream coming from a Tivo. Keep in mind, Tivo Corp invented the Stream for this reason.

Using an SSH tunnel will limit the bandwidth available even more.

I would test the bandwidth available between those two points over SSH before thinking there's anything wrong with the software.
__________________
Premiere 2 tuner & SiliconDust
on Comcast CableCard + OTA
telemark is offline   Reply With Quote
Old 03-23-2014, 01:39 AM   #124
Allanon
Registered User
 
Join Date: Nov 2005
Posts: 531
Quote:
Originally Posted by tlc
The Broken pipe (SIGPIPE) happened when I was trying to test through a ssh tunnel from work with VLC. We have a crappy connection at work, so I can imagine the pipe getting full. But IIRC, that should give EWOULDBLOCK, not SIGIPIPE. (I don't know python does with these though.)

I saw zero video, but based on my print statements, the read/write loop ran MANY times before the exception.
I guess the pipe can be overflowing. TivoDecode may be decoding the video faster than it can be sent through the SSH tunnel making the pipe back up and overflow. I only have a Tivo HD which doesn't have very fast video streaming so this isn't a problem for me but if you have a newer Tivo that can stream fast then maybe this is your problem.

Right now there is no buffering on the pipe but you can change bufsize to -1 in the following code and it will add a buffer:
Code:
decode = subprocess.Popen(cmd, shell=False,bufsize=0,stdin=subprocess.PIPE,stdout=subprocess.PIPE)
Quote:
Originally Posted by tlc
Today I tested at home and it worked. But sometimes the connection fails
The connection fails and VLC skips when the video is copy protected but I don't get those errors. You might try rebooting the Tivo.
Allanon is online now   Reply With Quote
Old 10-24-2014, 12:29 AM   #125
a_gizmo
Registered User
 
Join Date: May 2014
Posts: 4
I know it's been several months since anything was posted in this thread, but I wanted to know if I have to do anything special to make Tivo Proxy Server work for PS3MediaServer. I've have tivodecode & Tivo proxy server setup and working on my Ubuntu server and can watch unencrypted streams on my laptop using VLC.

I just started setting PS3MS up for the first time got local video playback to work to my PS3. To use the TiVo as a source I I added the following code to my WEB.conf file.
Code:
# video feeds
videofeed.Web,Tivo=http:/isengard2:10000/rss <had to omit a "/" in the URL example because my post count is 1 right now>
When I try to play a video from the Tivo through PS3MS I get the following error message in PS3MS regardless of trying to play it straight or transcode it through ffmpeg or Mencoder:
Code:
[Hanging External Process Stopper] External input stream instance is null... stopping process
[New I/O worker #1] There is no inputstream to return for Red Band Society
On Tivo Proxy Server's side the video starts to decode but PS3MS immediately disconnects.
Code:
Decoding video


/home/tony/tivo/tivodecode-0.2pre4/tivodecode

Encryption by QUALCOMM ;)

Disconnect
----------------------------------------
Exception happened during processing of request from ('192.168.1.251', 52750)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 651, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 710, in finish
    self.wfile.close()
  File "/usr/lib/python2.7/socket.py", line 279, in close
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------
The "Broken pipe" error looks to appear whenever a video stream stops. I got the error message when watching a video through VLC directly from Tivo Proxy Server and pressing stop.

I wonder if my problem has more to do with PS3MS not being able to parse out the URL. Any ideas what I need to do to get this working?

Thanks,
a_gizmo
a_gizmo is offline   Reply With Quote
Old 10-24-2014, 10:35 AM   #126
telemark
Registered User
 
Join Date: Nov 2013
Posts: 811
Yes, "Broken Pipe" is an internal error that you could remap in your head to, connection terminated.

Is the RSS feed rendering correctly? And then you select a file and that's when it breaks?

If so, have you tested the file format compatibility yet?
Download a show from the Tivo,
tivodecode but leave it in .TS format.
Feed it to PS3MS, see what happens.

If you use kmttg or pytivo, you'll have to find the right settings to just decode.
__________________
Premiere 2 tuner & SiliconDust
on Comcast CableCard + OTA
telemark is offline   Reply With Quote
Old 10-25-2014, 08:16 AM   #127
a_gizmo
Registered User
 
Join Date: May 2014
Posts: 4
Quote:
Originally Posted by telemark View Post
Yes, "Broken Pipe" is an internal error that you could remap in your head to, connection terminated.

Is the RSS feed rendering correctly? And then you select a file and that's when it breaks?

If so, have you tested the file format compatibility yet?
Download a show from the Tivo,
tivodecode but leave it in .TS format.
Feed it to PS3MS, see what happens.

If you use kmttg or pytivo, you'll have to find the right settings to just decode.
Thanks of the suggestion telemark. Yes, the RSS feed is rendering correctly. Through VLC I can view the feed and play the recordings back with no issues. I will try your suggestion of testing format compatibility in PS3MS by manually downloading, decoding a recording, and sharing it to my PS3. I'll report back my findings.

Thanks,
a_gizmo
a_gizmo is offline   Reply With Quote
Old 10-25-2014, 02:49 PM   #128
Allanon
Registered User
 
Join Date: Nov 2005
Posts: 531
Quote:
Originally Posted by a_gizmo View Post
The "Broken pipe" error looks to appear whenever a video stream stops. I got the error message when watching a video through VLC directly from Tivo Proxy Server and pressing stop.
Berkinet posted code that handles errors and removes that message from being displayed.

Quote:
Originally Posted by a_gizmo View Post
I wonder if my problem has more to do with PS3MS not being able to parse out the URL. Any ideas what I need to do to get this working?
I wrote this program hoping it would work with media servers. I tested PS3MS, TVersity, Plex, etc. but the only one I could get it to work with was Serviio. Serviio met all my media server needs so I stopped trying to get it to work with others.

The main problem is probably the way it handles the responses to the video requests. I really don't know a lot about proper responses to HTTP requests so I just copied code from Internet samples. I think more robust HTTP response handling will be needed to get this working with other media servers. I don't have plans to do that since my media server needs are met using Serviio.
Allanon is online now   Reply With Quote
Old 11-01-2014, 02:11 PM   #129
a_gizmo
Registered User
 
Join Date: May 2014
Posts: 4
Quote:
Originally Posted by telemark View Post
Yes, "Broken Pipe" is an internal error that you could remap in your head to, connection terminated.

Is the RSS feed rendering correctly? And then you select a file and that's when it breaks?

If so, have you tested the file format compatibility yet?
Download a show from the Tivo,
tivodecode but leave it in .TS format.
Feed it to PS3MS, see what happens.

If you use kmttg or pytivo, you'll have to find the right settings to just decode.
I downloaded a video using tivodecode and saved it locally on my server. There were no issues streaming the mpegts tivo file to my PS3.

Quote:
Originally Posted by Allanon View Post
Berkinet posted code that handles errors and removes that message from being displayed.



I wrote this program hoping it would work with media servers. I tested PS3MS, TVersity, Plex, etc. but the only one I could get it to work with was Serviio. Serviio met all my media server needs so I stopped trying to get it to work with others.

The main problem is probably the way it handles the responses to the video requests. I really don't know a lot about proper responses to HTTP requests so I just copied code from Internet samples. I think more robust HTTP response handling will be needed to get this working with other media servers. I don't have plans to do that since my media server needs are met using Serviio.
I assume your right. WGET and CURL have issues downloading directly from the url provided by Tivo Proxy Server. I'm unfortunately not programmatically inclined so I can't offer a solution. It was a fun thing to try even though I can't get it to work for my particular situation. Thanks for making Tivo Proxy Server. It's a really cool script.
a_gizmo is offline   Reply With Quote
Old 11-01-2014, 04:43 PM   #130
telemark
Registered User
 
Join Date: Nov 2013
Posts: 811
Quote:
Originally Posted by a_gizmo View Post
I assume your right. WGET and CURL have issues downloading directly from the url provided by Tivo Proxy Server. I'm unfortunately not programmatically inclined so I can't offer a solution. It was a fun thing to try even though I can't get it to work for my particular situation. Thanks for making Tivo Proxy Server. It's a really cool script.
I'm fluent in HTTP so if that's the problem I could probably fix it.

I can't find a license attached to the code though. The original author(s) have to specify that it's under an open source license, public domain, or none of the above.
__________________
Premiere 2 tuner & SiliconDust
on Comcast CableCard + OTA
telemark is offline   Reply With Quote
Old 11-01-2014, 04:54 PM   #131
Allanon
Registered User
 
Join Date: Nov 2005
Posts: 531
Quote:
Originally Posted by telemark View Post
I'm fluent in HTTP so if that's the problem I could probably fix it.

I can't find a license attached to the code though. The original author(s) have to specify that it's under an open source license, public domain, or none of the above.
Do whatever you like with my code, it's public domain.
Allanon is online now   Reply With Quote
Old 11-02-2014, 01:46 AM   #132
telemark
Registered User
 
Join Date: Nov 2013
Posts: 811
This fixes wget and curl.
Code:
# diff orig/Tivo\ Proxy\ Server.py Tivo\ Proxy\ Server.py 
234c235
<                 self.send_header('Content-Length','0')
---
>                 #self.send_header('Content-Length','0')
I don't know what it breaks if anything.
telemark is offline   Reply With Quote
Old 11-03-2014, 11:06 PM   #133
a_gizmo
Registered User
 
Join Date: May 2014
Posts: 4
Quote:
Originally Posted by telemark View Post
This fixes wget and curl.
Code:
# diff orig/Tivo\ Proxy\ Server.py Tivo\ Proxy\ Server.py 
234c235
<                 self.send_header('Content-Length','0')
---
>                 #self.send_header('Content-Length','0')
I don't know what it breaks if anything.
Commenting out that line of code definitely made a difference. Using I was able to successfully stream a show from my Tivo to the PS3.
a_gizmo is offline   Reply With Quote
Reply
Forum Jump




Thread Tools


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

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

Advertisements

TiVo Community
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skins by: Relivo Media

(C) 2013 Magenium Solutions - All Rights Reserved. No information may be posted elsewhere without written permission.
TiVoŽ is a registered trademark of TiVo Inc. This site is not owned or operated by TiVo Inc.
All times are GMT -5. The time now is 02:00 AM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |