TiVo Community
TiVo Community
TiVo Community
Go Back   TiVo Community > Underground Playground > Developers Corner
TiVo Community
Reply
Forum Jump
 
Thread Tools
Old 06-13-2011, 06:44 PM   #181
cweb
Registered User
 
Join Date: May 2004
Posts: 93
Can I use video manager with my OSX Pytivo installation?
cweb is offline   Reply With Quote
Old 06-13-2011, 06:53 PM   #182
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
Quote:
Originally Posted by cweb View Post
Can I use video manager with my OSX Pytivo installation?
I know nothing about the MAC environment, and I have no way to test there, but it's simple python code. If hme for python runs there I see no reason why this wouldn't as well. Give it a try and let us know. We could probably even resolve simple issues by working together on it.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 06-13-2011, 07:02 PM   #183
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,858
Quote:
Originally Posted by jbernardis View Post
- added "metaspace=" to the config file to indicate if a blank line should be added to the display after the named metadata items.
One tiny bug, here. If I have

Code:
metafirst = title seriesTitle episodeTitle movieYear vWriter vDirector description
metaspace = vDirector description vActor
Things lay out the way I want as long as the metafile has vDirector fields, but some of the metafiles don't have that field. Would it be possible to do a Boolean, something like:

Code:
metafirst = title seriesTitle episodeTitle movieYear vWriter vDirector description
metaspace = movieYear+vWriter+vDirector description vActor
That way a newline will be added after whichever the last of the 3 which exists in the metafile.

Quote:
Originally Posted by jbernardis View Post
- added "infolabelpercent=" to config file to specify the width of the label on the info screen. This value should be expressed as a percent. The default value is 30, but I have found that 20 works OK for HD screens
A value of 15% seems to work fine, here, with a font size of 20. I may increase the font size a bit, though, to make it nicer for the folks in the back row.
lrhorer is offline   Reply With Quote
Old 06-13-2011, 07:05 PM   #184
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,858
Quote:
Originally Posted by cweb View Post
Can I use video manager with my OSX Pytivo installation?
No, it's not allowed on a Mac. The state computing police will come haul you away.

Give it a shot. If you have pyHME working, the rest is a breeze. If you have to set up pyHME, it's still not really very difficult.
lrhorer is offline   Reply With Quote
Old 06-13-2011, 07:08 PM   #185
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
Quote:
Originally Posted by lrhorer View Post
One tiny bug, here. If I have

Code:
metafirst = title seriesTitle episodeTitle movieYear vWriter vDirector description
metaspace = vDirector description vActor
Things lay out the way I want as long as the metafile has vDirector fields, but some of the metafiles don't have that field. Would it be possible to do a Boolean, something like:

Code:
metafirst = title seriesTitle episodeTitle movieYear vWriter vDirector description
metaspace = movieYear+vWriter+vDirector description vActor
That way a newline will be added after whichever the last of the 3 which exists in the metafile.


A value of 15% seems to work fine, here, with a font size of 20. I may increase the font size a bit, though, to make it nicer for the folks in the back row.
I anticipated this issue. I was actually thinking of doing it this way:
I would have two config file options metaspace would become metaspaceafter and work as it does now, and metaspacebefore would put a space before - but the logic would never put out 2 consecutive spaces
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 06-13-2011, 07:09 PM   #186
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,858
Quote:
Originally Posted by jbernardis View Post
You're right - I think it must be their site, I was able to retrieve it just fine with firefox though - just IE gave me problems
Hmm. It works here under IceWeasel, but not FireFox.
lrhorer is offline   Reply With Quote
Old 06-13-2011, 07:10 PM   #187
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,858
Quote:
Originally Posted by jbernardis View Post
I anticipated this issue. I was actually thinking of doing it this way:
I would have two config file options metaspace would become metaspaceafter and work as it does now, and metaspacebefore would put a space before - but the logic would never put out 2 consecutive spaces
That would work.
lrhorer is offline   Reply With Quote
Old 06-13-2011, 07:19 PM   #188
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
new __init__

lrhorer:

I have attached a new __init__.py (I had to rename it to .txt). This is not released yet and has not been thoroughly tested. This has both the key based paging mechanism you described as well as the new metaspacebefore and metaspaceafter that was discussed. metaspaceafter is a synonym for metaspace in the config.ini file.

Give it a try and let me know. I'll release it after you get back to me.
Attached Files
File Type: txt __init__.txt (50.8 KB, 1 views)
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by jbernardis : 06-13-2011 at 07:35 PM.
jbernardis is offline   Reply With Quote
Old 06-13-2011, 07:24 PM   #189
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,858
Quote:
Originally Posted by jbernardis View Post
I have to think about a caching method. I made a conscious decision early that I was going to treat the directories as volatile information; I do no real caching in the program - hme provides a bit, but I simply read the entire directory every time I enter it. Perhaps it's faster the second time because of hme and/or os caching.
OS - level caching would be my guess, or actually more likely the hard drives. I also tried decreasing the nice value of the Python process, and, qualitatively, it seemed to help some. I need to do some more rigorous testing to be sure.

Quote:
Originally Posted by jbernardis View Post
This will be a tough one.
Yeah, and I can understand if you are reticent to spend a lot of resources on it.
lrhorer is offline   Reply With Quote
Old 06-13-2011, 07:35 PM   #190
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
Quote:
Originally Posted by lrhorer View Post
OS - level caching would be my guess, or actually more likely the hard drives. I also tried decreasing the nice value of the Python process, and, qualitatively, it seemed to help some. I need to do some more rigorous testing to be sure.


Yeah, and I can understand if you are reticent to spend a lot of resources on it.
The main issue as I see it is that these are short-lived processes - not like pytivo that is resident at all times. The work of accessing the disk has to be done - and there is no improving the response time the first time it runs, caching will be helpful if I could somehow retain this information from run to run. But then I couldn't take it at faith - I'd still need to verify that the cache was accurate.

All I'm really doing is processing the directory (except for loading of thumbnails). I'm not sure how much I'd save by only needing to verify the cache contents.

I'm going to give this some thought - I'm not ruling it out entirely. I just wanted you to know that you weren't going to get a response in an hour like has been the norm
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 06-13-2011, 09:00 PM   #191
wmcbrine
Resistance Useless
 
wmcbrine's Avatar
 
Join Date: Aug 2003
Posts: 8,909
They're only threads, not processes. You can store common info at the class level, or the module level. This is how I do two-player games in Reversi. pyTivo actually works in a similar way, even though it's not HME.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
wmcbrine is offline   Reply With Quote
Old 06-13-2011, 09:00 PM   #192
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,858
Quote:
Originally Posted by jbernardis View Post
lrhorer:

I have attached a new __init__.py (I had to rename it to .txt). This is not released yet and has not been thoroughly tested. This has both the key based paging mechanism you described as well as the new metaspacebefore and metaspaceafter that was discussed. metaspaceafter is a synonym for metaspace in the config.ini file.

Give it a try and let me know. I'll release it after you get back to me.
Seems to be working perfectly, both the number jump and the metaspacebefore directive.

I almost never use the numeric buttons on my remote. Now I'll start using them!
lrhorer is offline   Reply With Quote
Old 06-13-2011, 09:10 PM   #193
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
Quote:
Originally Posted by wmcbrine View Post
They're only threads, not processes. You can store common info at the class level, or the module level. This is how I do two-player games in Reversi. pyTivo actually works in a similar way, even though it's not HME.
I understand that they're threads. I guess what it boils down to is if I exit to live TV and come back into the app, is there any memory of the previous instantiation.

I noticed that the "mainline" code - code outside of any classes or subroutines - executes at import time, but I would think there is very little I could do here - certainly nothing with any of the HME classes. I assume this is what you are referring to as module-level. I would guess that I could create some empty data structures at this level, and then fill them in as I traverse directories while within the app. They would then be available for subsequent invocations.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 06-13-2011, 09:11 PM   #194
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
Quote:
Originally Posted by lrhorer View Post
Seems to be working perfectly, both the number jump and the metaspacebefore directive.

I almost never use the numeric buttons on my remote. Now I'll start using them!
Thanks much - I'll package it up and get it up on git.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 06-13-2011, 09:24 PM   #195
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
OK - Version 0.5c with the above described features is now available at git
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 06-14-2011, 06:04 PM   #196
rrr22777
Registered User
 
Join Date: Jul 2002
Posts: 529
Quote:
Originally Posted by jbernardis View Post
Be aware though - if you are running without a config.ini, that means it is simply running All apps that it finds. If you want this to continue, make sure you do NOT have an apps line in the config file - if you do, then pyhme will run ONLY the named apps.
Should I see something in the pytivo log after I add this?

Code:
[root@linux1 pytivo]# ls
beacon.py     hdphotos.jnlp   mind.pyc     pyTivo.conf.dist        vidmgr
beacon.pyc    httpserver.py   mutagen      pyTivoConfigurator.pyw  xmpp
Cheetah       httpserver.pyc  nohup.out    pyTivo.py               Zeroconf.py
config.ini    lrucache.py     plugin.py    pyTivoService.py        Zeroconf.pyc
config.merge  lrucache.pyc    plugin.pyc   README
config.py     metadata.py     plugins      stager.py
config.pyc    metadata.pyc    PYCC.pf      stager.pyc
content       mind.py         pyTivo.conf  templates
[root@linux1 pytivo]# cat config.ini
[vidmgr]
exts=.mpg .mp4 .avi .wmv .m4v
descsize=16

[tivos]
tivo1.name=Family Room
tivo1.tsn=748-0001-902C-E861


[pytivos]
pytivo1.config=pyTivo.conf
pytivo1.ip=192.168.0.100
pytivo1.port=9032
pytivo1.sep=/
[root@linux1 pytivo]# python /u03/samba/HMO/pytivo/pyTivo.py
INFO:pyTivo.beacon:Announcing shares...
INFO:pyTivo.beacon:Registering: MyMovies
INFO:pyTivo.beacon:Registering: MyMusic
INFO:pyTivo.beacon:Registering: MyPhotos
INFO:pyTivo.beacon:Scanning for TiVos...
INFO:pyTivo:pyTivo is ready.
INFO:pyTivo:192.168.0.250 [14/Jun/2011 16:10:17] "GET /TiVoConnect?Command=QueryContainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -

rrr22777 is offline   Reply With Quote
Old 06-14-2011, 07:21 PM   #197
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,858
Quote:
Originally Posted by rrr22777 View Post
Should I see something in the pytivo log after I add this?
No, this doesn't run under pyTivo. It runs under HME for Python. It looks to me like you put the code in the wrong directory and modified the wrong config file. Well, sort of.

pyTivo:
Code:
RAID-Server:/usr/share/pyTivo# ls
alphagroup  Cheetah     content    httpserver.py       __init__.py   metadata.py   mind.pyc   plugin.pyc  pyTivo            pyTivoConfigurator.pyw  README      xmpp
beacon.py   config.py   dategroup  httpserver.pyc      lrucache.py   metadata.pyc  mutagen    plugins     pyTivo.conf       pyTivo.py               templates   Zeroconf.py
beacon.pyc  config.pyc  eyeD3      httpserver.py.orig  lrucache.pyc  mind.py       plugin.py  pyshares    pyTivo.conf.dist  pyTivoService.py        Unverified  Zeroconf.pyc
RAID-Server:/usr/share/pyTivo# cat pyTivo.conf
[RAID Server]
force_alpha = True
type = video
path = /RAID/Recordings

[_tivo_SD]

[_tivo_00000DEADBEEF]

[Server]
tivo_password = xxxxxxxxxxx
tivo_mak = yyyyyyyyyy
ffmpeg = /usr/bin/ffmpeg
togo_path = /RAID/Server-Main/Movies/TiVo_TS
debug = True
tivo_username = zzzzzzzzz
port = 9032

[_tivo_HD]

[Videos by Genre]
force_alpha = True
type = video
path = /usr/share/pyTivo/pyshares

[Group by Alpha]
force_alpha = True
type = video
path = /usr/share/pyTivo/alphagroup

[Unverified]
type = video
path = /usr/share/pyTivo/Unverified

[DVD]
path = /RAID/DVD
force_alpha = True
type = dvdvideo
fast_index = true

[Videos by Date]
force_alpha = True
type = video
path = /usr/share/pyTivo/dategroup
pyHME:
Code:
RAID-Server:/usr/share/pyhme# ls
config.ini  hme.py  hme.pyc  pyHME  start.py  vidmgr  Zeroconf.py  Zeroconf.pyc
RAID-Server:/usr/share/pyhme# cat config.ini 
[hmeserver]
apps=vidmgr

[vidmgr]
exts=.mpg .mp4 .avi .wmv .m4v
descsize=20
sort=file
skin=local
deleteallowed=false
metafirst = title seriesTitle episodeTitle movieYear vDirector vWriter description
metaspaceafter = vWriter description vActor
metaspacebefore = description vActor
infolabelpercent = 15
metaignore = isEpisode isEpisodic showingBits displayMajorNumber

[tivos]
tivo1.name=LivingRoom
tivo1.tsn=###-####-####-####
tivo2.name=Theater
tivo2.tsn=###-####-####-####
tivo3.name=TiVoHD
tivo3.tsn=###-####-####-####


[pytivos]
pytivo1.config=/usr/share/pyTivo/pyTivo.conf
pytivo1.ip=192.168.1.50
pytivo1.port=9032
pytivo1.sep=/
And looking at the servers:
Code:
RAID-Server:/usr/share/pyhme# ps -ef | grep py
root     13245     1  0 Jun13 pts/1    00:01:21 /usr/bin/python2.6 /usr/share/pyhme/start.py
root     14763     1  0 10:03 pts/1    00:00:42 /usr/bin/python2.6 /usr/share/pyTivo/pyTivo.py /dev/null
Except when pushing a video, the output will be from pyHME, not pyTivo. It will look someting like this:

Code:
RAID-Server:/usr/share/pyhme# cat /var/log/pyhme.log 
192.168.1.101:4119 - - [13/Jun/2011 23:21:23] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.102:1762 - - [13/Jun/2011 23:24:34] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.102:1801 - - [13/Jun/2011 23:24:47] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1801 - - [13/Jun/2011 23:24:47] Starting HME: vidmgr
192.168.1.102:1801 - - [13/Jun/2011 23:29:27] Ending HME: vidmgr
192.168.1.102:1802 - - [13/Jun/2011 23:29:43] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1802 - - [13/Jun/2011 23:29:43] Starting HME: vidmgr
192.168.1.102:1802 - - [13/Jun/2011 23:41:28] Ending HME: vidmgr
192.168.1.102:1807 - - [13/Jun/2011 23:41:31] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.102:1846 - - [13/Jun/2011 23:41:35] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1846 - - [13/Jun/2011 23:41:35] Starting HME: vidmgr
192.168.1.102:1846 - - [13/Jun/2011 23:49:23] Ending HME: vidmgr
192.168.1.102:1856 - - [14/Jun/2011 00:59:53] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1856 - - [14/Jun/2011 00:59:53] Starting HME: vidmgr
192.168.1.102:1856 - - [14/Jun/2011 01:00:37] Ending HME: vidmgr
192.168.1.102:1860 - - [14/Jun/2011 01:00:38] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.102:1899 - - [14/Jun/2011 01:00:44] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1899 - - [14/Jun/2011 01:00:44] Starting HME: vidmgr
192.168.1.102:1899 - - [14/Jun/2011 01:04:20] Ending HME: vidmgr
192.168.1.102:1942 - - [14/Jun/2011 01:25:02] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.102:1982 - - [14/Jun/2011 01:25:15] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1982 - - [14/Jun/2011 01:25:15] Starting HME: vidmgr
192.168.1.102:1982 - - [14/Jun/2011 01:29:26] Ending HME: vidmgr
192.168.1.102:1983 - - [14/Jun/2011 01:30:07] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1983 - - [14/Jun/2011 01:30:07] Starting HME: vidmgr
192.168.1.102:1983 - - [14/Jun/2011 01:35:31] Ending HME: vidmgr
192.168.1.101:4234 - - [14/Jun/2011 10:29:46] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.101:4273 - - [14/Jun/2011 10:30:05] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.101:4273 - - [14/Jun/2011 10:30:05] Starting HME: vidmgr
192.168.1.101:4273 - - [14/Jun/2011 10:30:21] Ending HME: vidmgr
192.168.1.101:4278 - - [14/Jun/2011 10:30:22] "GET /vidmgr/icon.png HTTP/1.0" 200 -
rather than the output from pyTivo:
Code:
RAID-Server:/usr/share/pyhme# more /var/log/pyTivo.log 
INFO:pyTivo.beacon:Announcing shares...
INFO:pyTivo.beacon:Registering: DVD
INFO:pyTivo.beacon:Registering: Group by Alpha
INFO:pyTivo.beacon:Registering: RAID Server
INFO:pyTivo.beacon:Registering: Unverified
INFO:pyTivo.beacon:Registering: Videos by Date
INFO:pyTivo.beacon:Registering: Videos by Genre
INFO:pyTivo.beacon:Scanning for TiVos...
INFO:pyTivo.beacon:HD Theater
INFO:pyTivo.beacon:HD Livingroom
INFO:pyTivo:pyTivo is ready.
INFO:pyTivo:192.168.1.102 [14/Jun/2011 10:03:37] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.101 [14/Jun/2011 10:03:37] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:04:37] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:15] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:16] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:16] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:24] "GET /TiVoConnect?Command=QueryFormats&SourceFormat=video%2Fx-tivo-mpeg HTTP/1.1" 200 -
DEBUG:pyTivo.dvdvideo:mobileagent: -1 useragent: tvhttpclient
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:24] "GET /TiVoConnect?Command=QueryContainer&Container=DVD&SortOrder=!CaptureDate&ItemCount=8&Filter=x-tivo-container%2Ftivo-videos,x-tivo-container%2Ffolder,video%2Fx-tivo-
mpeg,video%2F* HTTP/1.1" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:28] "GET /TiVoConnect?Command=QueryFormats&SourceFormat=video%2Fx-tivo-mpeg HTTP/1.1" 200 -
DEBUG:pyTivo.dvdvideo:mobileagent: -1 useragent: tvhttpclient
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:28] "GET /TiVoConnect?Command=QueryContainer&Container=DVD%2F39%20Steps&SortOrder=!CaptureDate&ItemCount=8&Filter=x-tivo-container%2Ftivo-videos,x-tivo-container%2Ffolder,vi
deo%2Fx-tivo-mpeg,video%2F* HTTP/1.1" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:33] "GET /TiVoConnect?Command=QueryFormats&SourceFormat=video%2Fx-tivo-mpeg HTTP/1.1" 200 -
DEBUG:pyTivo.video.transcode:starting ffmpeg, will wait 10 seconds for it to complete
DEBUG:pyTivo.video.transcode:ffmpeg output=FFmpeg version SVN-r25838, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 21 2011 08:21:58 with gcc 4.4.5
  configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --en
able-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable
-libdirac --disable-decoder=libdirac --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-
armv5te --disable-armv6 --disable-vis
  libavutil     50.33. 0 / 50.33. 0
  libavcore      0.14. 0 /  0.14. 0
  libavcodec    52.97. 2 / 52.97. 2
  libavformat   52.87. 1 / 52.87. 1
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.65. 0 /  1.65. 0
  libswscale     0.12. 0 /  0.12. 0
  libpostproc   51. 2. 0 / 51. 2. 0
pipe:: Invalid data found when processing input


Last edited by lrhorer : 06-15-2011 at 12:48 AM.
lrhorer is offline   Reply With Quote
Old 06-14-2011, 07:39 PM   #198
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
Hooray for DEAD BEEF! It's fun to spell in Hex.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
orangeboy is offline   Reply With Quote
Old 06-14-2011, 08:01 PM   #199
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,858
Damn! I keep forgetting the pyTivo.conf file has some modestly sensitive information in it.
lrhorer is offline   Reply With Quote
Old 06-14-2011, 09:26 PM   #200
rrr22777
Registered User
 
Join Date: Jul 2002
Posts: 529
Quote:
Originally Posted by lrhorer View Post
...
Thank you for the example. Got things working well except this error when trying to browse.

Code:
[root@linux1 pyhme]# python start.py
HME Server for Python 0.19
Tue Jun 14 19:31:19 2011 Server Starts
Registering: vidmgr
192.168.0.250:37550 - - [14/Jun/2011 19:31:25] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.0.250:37551 - - [14/Jun/2011 19:31:28] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.0.250:37551 - - [14/Jun/2011 19:31:28] Starting HME: vidmgr
----------------------------------------
Exception happened during processing of request from ('192.168.0.250', 37551)
Traceback (most recent call last):
  File "/usr/lib64/python2.6/SocketServer.py", line 560, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib64/python2.6/SocketServer.py", line 322, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "start.py", line 141, in __init__
    client_address, server)
  File "/usr/lib64/python2.6/SocketServer.py", line 617, in __init__
    self.handle()
  File "/usr/lib64/python2.6/BaseHTTPServer.py", line 329, in handle
    self.handle_one_request()
  File "/usr/lib64/python2.6/BaseHTTPServer.py", line 323, in handle_one_request
    method()
  File "start.py", line 232, in do_GET
    self._page(True)
  File "start.py", line 186, in _page
    appinst.mainloop()
  File "/u03/samba/HMO/pyhme/hme.py", line 1139, in mainloop
    while self.active and self.get_event():
  File "/u03/samba/HMO/pyhme/hme.py", line 1192, in get_event
    handle(keynum, rawcode)
  File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 314, in handle_key_press
    self.handle_key_pressList(keynum, rawcode)
  File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 463, in handle_key_pressList
    self.drawScreen()
  File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 761, in drawScreen
    self.drawScreenDetail()
  File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 896, in drawScreenDetail
    if self.listing[self.indexDetail]['thumb']:
IndexError: list index out of range
----------------------------------------

rrr22777 is offline   Reply With Quote
Old 06-14-2011, 09:58 PM   #201
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
Quote:
Originally Posted by lrhorer View Post
Damn! I keep forgetting the pyTivo.conf file has some modestly sensitive information in it.
As does pyHME...
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
orangeboy is offline   Reply With Quote
Old 06-14-2011, 09:59 PM   #202
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
Quote:
Originally Posted by rrr22777 View Post
Thank you for the example. Got things working well except this error when trying to browse.

Code:
[root@linux1 pyhme]# python start.py
HME Server for Python 0.19
Tue Jun 14 19:31:19 2011 Server Starts
Registering: vidmgr
192.168.0.250:37550 - - [14/Jun/2011 19:31:25] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.0.250:37551 - - [14/Jun/2011 19:31:28] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.0.250:37551 - - [14/Jun/2011 19:31:28] Starting HME: vidmgr
----------------------------------------
Exception happened during processing of request from ('192.168.0.250', 37551)
Traceback (most recent call last):
  File "/usr/lib64/python2.6/SocketServer.py", line 560, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib64/python2.6/SocketServer.py", line 322, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "start.py", line 141, in __init__
    client_address, server)
  File "/usr/lib64/python2.6/SocketServer.py", line 617, in __init__
    self.handle()
  File "/usr/lib64/python2.6/BaseHTTPServer.py", line 329, in handle
    self.handle_one_request()
  File "/usr/lib64/python2.6/BaseHTTPServer.py", line 323, in handle_one_request
    method()
  File "start.py", line 232, in do_GET
    self._page(True)
  File "start.py", line 186, in _page
    appinst.mainloop()
  File "/u03/samba/HMO/pyhme/hme.py", line 1139, in mainloop
    while self.active and self.get_event():
  File "/u03/samba/HMO/pyhme/hme.py", line 1192, in get_event
    handle(keynum, rawcode)
  File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 314, in handle_key_press
    self.handle_key_pressList(keynum, rawcode)
  File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 463, in handle_key_pressList
    self.drawScreen()
  File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 761, in drawScreen
    self.drawScreenDetail()
  File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 896, in drawScreenDetail
    if self.listing[self.indexDetail]['thumb']:
IndexError: list index out of range
----------------------------------------
Do you see anything on the TV before this message? What is in the directory you are currently in? Can you give me a dierctory listing?
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 06-14-2011, 10:05 PM   #203
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
I have a new version out on git that addressed some of the concerns of lrhorer. This is version 0.5d. The changes are:
Version 0.5d 6/14/11
- added logic to load thumbnails just in time rather than ahead of time. This speeds up initial painting of a page, but slows down navigation within the page. Beacuse of this,
- I added an image cache to speed up image processing. This is just an in-memory cache, but if you exit the app cleanly - by hitting left all the way out - the cache is saved to disk for future runs. The cache quickly got too big to save to disk with every change, so this was a compromise
- added logic to scale the thumbnail to fit in the 320 pixel wide view frame. Thanks to wmcbrine for the picture sample hme app that told me how to do this. A side effect of this - you need to have the python image lib (PIL) installed. Just google PIL and you will find links for the version of python you have installed.

I am a bit concerned over the size the cache can grow to - so I'd be interested if lrhorer could give me his experience with this. I might have to implement something that limits the size of the cache.

I could also provide a tool to generate the cache ahead of time if there is interest in that. Right now, there is a little sluggishness the first time you load an image, but once it's in the cache, things are snappier. If you pre-create the cache, you avoid this first time pain.


NOTE there is a new py file (thumbcache.py) in the vidmgr directory.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 06-15-2011, 12:49 AM   #204
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,858
Quote:
Originally Posted by orangeboy View Post
As does pyHME...
What, the TSNs? Are those sensitive?
lrhorer is offline   Reply With Quote
Old 06-15-2011, 01:03 AM   #205
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,858
Quote:
Originally Posted by jbernardis View Post
I have a new version out on git that addressed some of the concerns of lrhorer. This is version 0.5d. The changes are:
Version 0.5d 6/14/11
It's not on the git, yet. Did you upload it? Also, the download is still not working here in FireFox. It works for IceWeasel.
lrhorer is offline   Reply With Quote
Old 06-15-2011, 04:18 AM   #206
wmcbrine
Resistance Useless
 
wmcbrine's Avatar
 
Join Date: Aug 2003
Posts: 8,909
Quote:
Originally Posted by jbernardis View Post
I might have to implement something that limits the size of the cache.
pyTivo uses the lrucache module for this purpose.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
wmcbrine is offline   Reply With Quote
Old 06-15-2011, 07:45 AM   #207
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
Quote:
Originally Posted by lrhorer View Post
It's not on the git, yet. Did you upload it? Also, the download is still not working here in FireFox. It works for IceWeasel.
Sorry about this everybody - I guess I was tired last night. Apparently I forgot to upload to git. I THOUGHT I had done so. I am at work and do not have the latest code with me - it will have to wait until this evening.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 06-15-2011, 07:47 AM   #208
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
Quote:
Originally Posted by wmcbrine View Post
pyTivo uses the lrucache module for this purpose.
I was thinking of some kind of LRU algorithm, but I didn't realize python has one already. I need to explore the modules more.

I also need to explore how to make the cache threadsafe. Since the cache exists at the module level, there could potentially be multiple threads using it. I assume python has some kind of mutex mechanism.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 06-15-2011, 08:00 AM   #209
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,062
Quote:
Originally Posted by rrr22777 View Post
Thank you for the example. Got things working well except this error when trying to browse.
rrr22777 - I'm just looking a bit closer at the code, and I think I know what happened. I just want to make sure my assumptions are accurate:

Since it appears you are new to pytivo also, I guessed that 1) you have no videos in your shares, and 2) you only have a single share.

I think I see where the logic falls apart in that case. In that situation, there is basically nothing for the app to do - there is nothing to navigate. I can test that tonight - I already know how to fix it, and if I am right, I will post the fix with the release I apparently forgot to upload last night.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 06-15-2011, 09:42 AM   #210
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
Quote:
Originally Posted by lrhorer View Post
What, the TSNs? Are those sensitive?
Hmm... Good question. But yes, that's what I was referring to. There's been some discussion about disclosing one's TSN publicly, but really no examples of what another could do with such a TSN.

Apologies for meandering off-topic.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
orangeboy 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 08:22 PM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |