TiVo Community Forum banner
  • TiVoCommunity.com Ambassador Program Now Open! >>> Click Here

pyTivo - Transcoding server

2M views 6K replies 596 participants last post by  mlippert 
#1 ·
pyTivo lets you stream most videos from your PC to your unhacked TiVo. It uses the HMO server protocol, so no hacking of the TiVo is required.

* It will guess if your video is 4:3 or 16:9 and pad your video if it thinks it is needed (looked good on my tests).
* It will not transcode an mpeg that is supported by your TiVo.
* It will stream TiVo recordings (.tivo).

http://pytivo.armooo.net/

* Master changes
* Subfolder changes
 

Attachments

#2,827 ·
I give up. This stuff is strictly for programmers or really really smart people or incredibly patient people. Ideally, two of the three.

Just spent three hours trying to make heads or tails from multiple browser tabs I've opened up, each of which contain either wiki pages, forum pages, etc., all of which leave out at least a little bit of some necessary information for setting up pyTivo, which in turns starts another search & tab creation to track down what else is missing. :down:

There really should be an edit of the first post reflecting this reality, particularly for anything pyTivo related.

Sorry, just a little frustrated right now. Not sure if you can tell. ;)
 
#2,828 ·
I give up. This stuff is strictly for programmers or really really smart people or incredibly patient people. Ideally, two of the three.

Just spent three hours trying to make heads or tails from multiple browser tabs I've opened up, each of which contain either wiki pages, forum pages, etc., all of which leave out at least a little bit of some necessary information for setting up pyTivo, which in turns starts another search & tab creation to track down what else is missing. :down:

There really should be an edit of the first post reflecting this reality, particularly for anything pyTivo related.

Sorry, just a little frustrated right now. Not sure if you can tell. ;)
I'm gonna have to agree with you there!
I got somewhere with pytivometathis, but hit a brick wall and just could not find anything to progress.
The one post I found, explains how to get a couple of files to Tivo, in a directory, but the file names are the same, and I couldn't figure out how to get them to be named properly:

I have 2 mpg's:
The Office S03E01.mpg and The Office S03E02.mpg
I created a default.txt file that contained a line:
#seriesId: EP00726133
(I got the number by following the instructions to find the id of any particular office episode at http://tvlistings.zap2it.com/tvlistings)

I run pytivometathis from the same dir. and it creates only one file (The Office S03E01.mpg.txt), and a file called "The Office.seriesID"
I'm sure I need to create another file for episode 2, so I tried doing it manually.
Using Pytivo, I push the 2 mpg files and sure enough, Tivo creates a dir called "The Office" but the two mpgs are both called "The Office".

There is no documentation on the sourceforge site for pytivometathis :mad:
I know I'm close to doing this, but... no cigar!
 
#2,829 ·
I give up. This stuff is strictly for programmers or really really smart people or incredibly patient people. Ideally, two of the three.

Just spent three hours trying to make heads or tails from multiple browser tabs I've opened up, each of which contain either wiki pages, forum pages, etc., all of which leave out at least a little bit of some necessary information for setting up pyTivo, which in turns starts another search & tab creation to track down what else is missing. :down:

There really should be an edit of the first post reflecting this reality, particularly for anything pyTivo related.

Sorry, just a little frustrated right now. Not sure if you can tell. ;)
I had a lot of problems with setting up pytivo until I d/l'd the correct version.
Of course, I don't have a link to it anymore!
Once I had that version, it seemed to go pretty smoothly, but not without a few issues.
 
#2,830 ·
Shouldn't the 'seriesid' file be avail. to push too, in order to get Tivo to create the dir?
No, the folder would be created by the first episode pushed. "default.txt" isn't something you push, it's data that attaches to each episode (or more precisely, each video file in the directory). I'm not familiar with the "seriesId" files created by pyTivoMetaThis (this is the first I've heard of them), but they wouldn't be recognized by pyTivo with that name.

BTW, "#" starts a comment line in pyTivo metadata. A line starting with "#" will be ignored. Also, to name each episode, you want "episodeTitle".
 
#2,831 ·
Hi and thanks for the info.
I'm still not getting unique episode names though.
I'm getting a Folder "The Office" and two videos, The Office & The Office.
When I 'push' from Pytivo, I select the 2 files (the .txt files are not shown - do they get sent to Tivo in the background?)
The contents of each txt file are as follows...

The Office S03E01.mpg.txt:
seriesTitle : The Office
EpisodeTitle: The Office S03E01
isEpisode : true
episodeNumber : 301


The Office S03E02.mpg.txt:
seriesTitle : The Office
EpisodeTitle: The Office S03E02
isEpisode : true
episodeNumber : 302
seriesId: EP00726133

So I can remove the SeriesId line?
But what else is wrong?
I do not have default.txt in this dir anymore, since I am doing this manually.
Pete

I cleaned up the entries:

seriesTitle : The Office
episodeTitle: The Office S03E01
isEpisode : true
episodeNumber : 301


This now works!!!
Either the seriesId was messing it up, or the commands are case sensitive
Thank you v. much!
 
#2,834 ·
I give up. This stuff is strictly for programmers or really really smart people or incredibly patient people. Ideally, two of the three.

Just spent three hours trying to make heads or tails from multiple browser tabs I've opened up, each of which contain either wiki pages, forum pages, etc., all of which leave out at least a little bit of some necessary information for setting up pyTivo, which in turns starts another search & tab creation to track down what else is missing. :down:

There really should be an edit of the first post reflecting this reality, particularly for anything pyTivo related.

Sorry, just a little frustrated right now. Not sure if you can tell. ;)
What OS are you using?
 
#2,835 ·
I run pytivometathis from the same dir. and it creates only one file (The Office S03E01.mpg.txt), and a file called "The Office.seriesID"
I'm sure I need to create another file for episode 2, so I tried doing it manually.
Using Pytivo, I push the 2 mpg files and sure enough, Tivo creates a dir called "The Office" but the two mpgs are both called "The Office".
Are you using the latest version of pyTivoMetaThis from:

http://sourceforge.net/projects/pytivometathis/

When you run pyTivoMetaThis without specifying anything on the command line, it should process all compatible videos within the current directory. If you specify a filename, then I believe it will only process that one file. And the .seriesID files are there so that pyTivoMetaThis can remember what name to seriesID mappings you choose (say when a series name matches multiple seriesIDs and you interactively choose the proper one.) .seriesID files are not used by pyTivo directly.
 
#2,836 ·
Are you using the latest version of pyTivoMetaThis from:

http://sourceforge.net/projects/pytivometathis/

When you run pyTivoMetaThis without specifying anything on the command line, it should process all compatible videos within the current directory. If you specify a filename, then I believe it will only process that one file. And the .seriesID files are there so that pyTivoMetaThis can remember what name to seriesID mappings you choose (say when a series name matches multiple seriesIDs and you interactively choose the proper one.) .seriesID files are not used by pyTivo directly.
FWIW, you can limit what files pyTivoMetaThis reports on by paring down the file extension list. Opening pyTivoMetaThis.py with notepad (or other text editor) and editing the "fileExtList" variable name's values made my install only work on ".mp4" files:

Code:
# Types of files we want to get metadata for
# fileExtList = [".mpg", ".avi", ".ogm", ".mkv", ".mp4", ".mov", ".wmv", ".vob", ".m4v"]
fileExtList = [".mp4"]
("#" indicates a comment line)
 
#2,839 ·
Are you using the latest version of pyTivoMetaThis from:

http://sourceforge.net/projects/pytivometathis/

When you run pyTivoMetaThis without specifying anything on the command line, it should process all compatible videos within the current directory. If you specify a filename, then I believe it will only process that one file. And the .seriesID files are there so that pyTivoMetaThis can remember what name to seriesID mappings you choose (say when a series name matches multiple seriesIDs and you interactively choose the proper one.) .seriesID files are not used by pyTivo directly.
Yes, I am using this ver.
I am just creating my own .txt files for now, so I can at least get all files processed.
I did have some success by doing this:
All 23 files transferred over with Pytivo, but only 1-9 went into a folder.

Here is a txt file for #9:

seriesTitle : The Office Series 3
episodeTitle: The Office S03E09
isEpisode : true
episodeNumber : 309

and here is the txt file for #10:

seriesTitle : The Office Series 3
episodeTitle: The Office S03E10
isEpisode : true
episodeNumber : 310

What do I need to do to get this (and 11 to 23) into the directory "The Office Series 3"?

Thanks!
Peter
 
#2,840 ·
When you run pyTivoMetaThis without specifying anything on the command line, it should process all compatible videos within the current directory. If you specify a filename, then I believe it will only process that one file. And the .seriesID files are there so that pyTivoMetaThis can remember what name to seriesID mappings you choose (say when a series name matches multiple seriesIDs and you interactively choose the proper one.) .seriesID files are not used by pyTivo directly.
So I copied pyTivoMetaThis-0.22.py to my working directory, where I have 2 sample vids:
The Office S03E01.mpg & The Office S03E02.mpg

I get the IMDB warning, then the process finishes and it creates:
The Office.seriesID
and
The Office S03E01.mpg.txt

So,
1. I don't get The Office S03E02.mpg.txt created and.
2. The file, The Office S03E01.mpg.txt, does not contain an 'episodeTitle:' entry, which, wmcbrine has mentioned, it needs.
These are the sticking points right now.
Any ideas why these problems occur?
Here is the contents of the The Office S03E01.mpg.txt file:

seriesTitle : The Office (DE)
isEpisode : true
episodeNumber : 301
vActor : Jochen Busse
 
#2,841 ·
So I copied pyTivoMetaThis-0.22.py to my working directory, where I have 2 sample vids:
The Office S03E01.mpg & The Office S03E02.mpg

I get the IMDB warning, then the process finishes and it creates:
The Office.seriesID
and
The Office S03E01.mpg.txt

So,
1. I don't get The Office S03E02.mpg.txt created and.
2. The file, The Office S03E01.mpg.txt, does not contain an 'episodeTitle:' entry, which, wmcbrine has mentioned, it needs.
These are the sticking points right now.
Any ideas why these problems occur?
Here is the contents of the The Office S03E01.mpg.txt file:

seriesTitle : The Office (DE)
isEpisode : true
episodeNumber : 301
vActor : Jochen Busse
Seems to me that pyTivoMetaThis is encountering an error parsing information coming back from thetvdb (it's data source for TV series.) Otherwise you'd see a lot more actor info and an episodeTitle.

Run it again with a -dddd switch to print all the debugging information.
 
#2,842 ·
Run it again with a -dddd switch to print all the debugging information.
Interesting!
So running pmt (pytivometathis) from an explorer window is one of the issues.
It has to be run from a dos box.
Running from a command line (dos box), I am able to pipe the errors to a report file (pytivometathis-0.22.py -dddd > test.rep)

I now do not get any .txt files generated.
I have a default.txt file with what I think is the correct series ID, since that's one of the choices pmt gave me when I first ran it:
seriesId : 77470

My error report is:
IMDB module could not be loaded. Movie Lookups will be disabled. See http://imdbpy.sourceforge.net

Console Input encoding: cp850
Console Output encoding: ascii
Metadata File Output encoding: UTF-8

Error looking information from thetvdb, no metadata will be retrieved for TV shows.

## Looking for videos in: .
fileList after cull: ['The Office S03E01.mpg', 'The Office S03E02.mpg']

--->working on: The Office S03E01.mpg
Metadir is: .
Metadata service for TV shows is unavailable, skipping this show.

--->working on: The Office S03E02.mpg
Metadir is: .
Metadata service for TV shows is unavailable, skipping this show.
 
#2,843 ·
Interesting!
So running pmt (pytivometathis) from an explorer window is one of the issues.
It has to be run from a dos box.
Running from a command line (dos box), I am able to pipe the errors to a report file (pytivometathis-0.22.py -dddd > test.rep)

I now do not get any .txt files generated.
I have a default.txt file with what I think is the correct series ID, since that's one of the choices pmt gave me when I first ran it:
seriesId : 77470

My error report is:
IMDB module could not be loaded. Movie Lookups will be disabled. See http://imdbpy.sourceforge.net

Console Input encoding: cp850
Console Output encoding: ascii
Metadata File Output encoding: UTF-8

Error looking information from thetvdb, no metadata will be retrieved for TV shows.

## Looking for videos in: .
fileList after cull: ['The Office S03E01.mpg', 'The Office S03E02.mpg']

--->working on: The Office S03E01.mpg
Metadir is: .
Metadata service for TV shows is unavailable, skipping this show.

--->working on: The Office S03E02.mpg
Metadir is: .
Metadata service for TV shows is unavailable, skipping this show.
It looks like when you first attempted to run pyTivoMetaThis, thetvdb was at least partially available because that's where the seriesID comes from. They may have been having problems and didn't return full results.

For your more recent attempts, it looks like thetvdb is completely unavailable.

Without a data source, it can't create any output.

The IMDb error is normal if you didn't install IMDbPY module.

Thetvdb appears to be up right now, though their announcements mention various MySQL database issues they've been having and fixing.
 
#2,844 ·
Yes, I am using this ver.
I am just creating my own .txt files for now, so I can at least get all files processed.
I did have some success by doing this:
All 23 files transferred over with Pytivo, but only 1-9 went into a folder.

Here is a txt file for #9:

seriesTitle : The Office Series 3
episodeTitle: The Office S03E09
isEpisode : true
episodeNumber : 309

and here is the txt file for #10:

seriesTitle : The Office Series 3
episodeTitle: The Office S03E10
isEpisode : true
episodeNumber : 310

What do I need to do to get this (and 11 to 23) into the directory "The Office Series 3"?

Thanks!
Peter
Anyone have any insight of why 10-23 didn't get put in the directory?
 
#2,845 ·
Are you using the latest version of pyTivoMetaThis from:

http://sourceforge.net/projects/pytivometathis/

When you run pyTivoMetaThis without specifying anything on the command line, it should process all compatible videos within the current directory. If you specify a filename, then I believe it will only process that one file. And the .seriesID files are there so that pyTivoMetaThis can remember what name to seriesID mappings you choose (say when a series name matches multiple seriesIDs and you interactively choose the proper one.) .seriesID files are not used by pyTivo directly.
To get pyTivoMetaThis to work with single files passed from the command line, I had to modify the code a bit:

Code:
def processDir(dir, MirrorURL):
	if os.path.isfile(dir):
		fileList = [os.path.split(dir) [1]]
		dir = os.path.dirname(dir)
		dirList = []
	else:
		debug(1,'\n## Looking for videos in: ' + dir)
		(fileList, dirList) = getfiles(dir)
This is how it looked before the mod:

Code:
def processDir(dir, MirrorURL):
	debug(1,'\n## Looking for videos in: ' + dir)
	(fileList, dirList) = getfiles(dir)
I've got some other mods in place to run it in "batch/function" mode, so it ignores metadata files already in place, and doesn't create any actual files, but rather output's the data to stdout so I can parse what pieces I want/need. But those mods aren't relevant to this topic.
 
#2,846 ·
Well, persistence is paying off.
I am not a programmer, so debugging code is not my cup of tea.
However, using the pipe command, and ctrl c'ing the pytivometathis program (because it hangs...), I am able to see somewhat, what is happening.
I increased the timeout value to the tvdb site, and then found that there were several episodes called "The Office".
I renamed the episodes to "The Office (US)" and FINALLY, got the prog. to write TWO .txt files. which transferred over into one directory.

Update:
All metafiles for my 'real' directory of a complete season of The Office were finally written.
I believe there were two problems:

If the timeout setting for tvdb is set too low (default is 5, mine is now 25), and you have a slow connection to the Internet (Either it's my cable company or router s/w), then pytivometathis will time out.

If your filename (I used "The Office S03E01.mpg") is ambiguous, tvdb will give pytivometathis several choices (including the US and UK versions of the show).
I am running this in a command box in Windows 7, and I am not presented with these choices at this time, so the program appears to 'hang'.

Renaming all my videos to "The Office (US) S03E01.mpg" bypassed the choice problem and all meta files were created.
Pytivo then did the rest!
I HOPE that my time spent debugging this will aid others.
Thanks to Rdian06 for pointing me in the right direction.
Pete
 
#2,847 ·
There are 4 different 'The Office' on tvdb.com. Try putting 'The Office (US) S03E01.mpg' or 'The.Office.(US).S03E01.mpg' (I prefer to eliminate spaces since it breaks a lot of DOS batch files).

update: oops, didn't look at the last page of replies on this before posting. Looks like he already figured this out.
 
#2,849 ·
Well, persistence is paying off.
I am not a programmer, so debugging code is not my cup of tea.
However, using the pipe command, and ctrl c'ing the pytivometathis program (because it hangs...), I am able to see somewhat, what is happening.
I increased the timeout value to the tvdb site, and then found that there were several episodes called "The Office".
I renamed the episodes to "The Office (US)" and FINALLY, got the prog. to write TWO .txt files. which transferred over into one directory.

Update:
All metafiles for my 'real' directory of a complete season of The Office were finally written.
I believe there were two problems:

If the timeout setting for tvdb is set too low (default is 5, mine is now 25), and you have a slow connection to the Internet (Either it's my cable company or router s/w), then pytivometathis will time out.

If your filename (I used "The Office S03E01.mpg") is ambiguous, tvdb will give pytivometathis several choices (including the US and UK versions of the show).
I am running this in a command box in Windows 7, and I am not presented with these choices at this time, so the program appears to 'hang'.

Renaming all my videos to "The Office (US) S03E01.mpg" bypassed the choice problem and all meta files were created.
Pytivo then did the rest!
I HOPE that my time spent debugging this will aid others.
Thanks to Rdian06 for pointing me in the right direction.
Pete
When you run the script from a command line, it runs in interactive mode and should print out options if more than one show matches. Perhaps you redirected the output to a file so you weren't seeing the prompts?

The script also has the concept of non-interactive mode where it will just use the first match if there are multiple matches. It tries to detect whether to be in interactive mode or not, but maybe it's broken on Win7. It works fine for me on Win XP.
 
#2,850 ·
When you run the script from a command line, it runs in interactive mode and should print out options if more than one show matches. Perhaps you redirected the output to a file so you weren't seeing the prompts?

The script also has the concept of non-interactive mode where it will just use the first match if there are multiple matches. It tries to detect whether to be in interactive mode or not, but maybe it's broken on Win7. It works fine for me on Win XP.
It used to run in interactive mode for me as well. It works as PeskyPete describes now for me in XP and Vista.
 
#2,851 ·
It used to run in interactive mode for me as well. It works as PeskyPete describes now for me in XP and Vista.
I just downloaded a fresh copy of pyTivoMetaThis 0.22 and placed it in a directory alongside three files (0 bytes, only the name matters) named:

The Office S03E01.mpg
The Office S03E02.mpg
The Office S03E03.mpg

Now if you double click the script from the Windows Explorer, it runs in non-interactive mode and will create two files:

The Office S03E01.mpg
The Office.seriesID (which contains 172751)

This is because of all the possible matches, the first returned match is "The Office (DE)" with a thetvdb seriesID of 172751. In non-interactive mode, the first match is automatically used and "The Office.seriesID" is created.

Now, if you then switch to the command line and run pyTivoMetaThis from there in interactive mode, it will reuse the data in "The Office.seriesID" and NOT prompt you.

If you go to Season 3 of The Office (DE) (172751) on thetvdb, there is only one episode in the database - so trying to query S02 and S03 will fail and no metadata files will be created for them.

Now delete The Office.seriesID and the bogus .txt files so you start again with just the three dummy office mpgs and the pyTivoMetaThis script. Then run pyTivoMetaThis from a command line and because no "The Office.seriesID" file is found AND there are multiple matches for "The Office", the script will prompt you to choose which thetvdb seriesID to use.

Final note, thetvdb seriesID is NOT the pyTivo/Tivo seriesId (notice the slightly different spellings). They have similar names, but very different formats. thetvdb seriesIDs are assigned by thetvdb and are just numbers. pyTivo/Tivo seriesId values begin with EP or SH and are followed by 6 or 8 digits (you may see some of them written as EP or SH followed by 7 digits in thetvdb database, but these are invalid for Tivo grouping and must be padded with a leading 0 - see http://pytivo.sourceforge.net/forum/gmd-s-python-metadata-generator-grouping-fix-t1058.html.)

Tivo seriesIds are stored in the thetvdb database as the "Zap2it / SchedulesDirect ID". If you're browsing thetvdb website, you must be logged in to your thetvdb account to see them (go to the Series main page and under Information, click "show/hide edit".) For shows that don't have the Zap2it ID field filled in, you can go to zap2it.com, find the shows main page, and then look at the end of the URL to find the Tivo/Zap2it seriesId (begins with EP.)
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top