# Is there any way to put PC-to-Tivo files in folders?



## Hcour (Dec 24, 2007)

The last thread I could find on this subject was a couple of years old, so I thought I'd check. I thought I'd read somewhere that there was a program that could do this, but I can't remember what it was or if I misunderstood what I'd read.

Thanks,
Harold


----------



## Dan203 (Apr 17, 2000)

You mean a way to make it so when you browse your PC on the TiVo the files show up in folders instead of just one big list? If so then the answer is to use pyTiVo instead of TiVo Desktop. It has the ability to display your files in the same folder structure you have them in on the PC.

Dan


----------



## orangeboy (Apr 19, 2004)

Checkout pyTivo Metadata Generator in addition to pyTivo.


----------



## wmcbrine (Aug 2, 2003)

There are two ways to do this with pyTivo:

1. Using "pull" (transfers started from the TiVo): You must add a valid seriesId to the metadata, and you can only group with existing shows.

2. Using "push" (transfers started from pyTivo): You can create arbitrary groups.


----------



## Hcour (Dec 24, 2007)

Ok, thanks guys.

How does one "push" from PC to Tivo? I've searched but can't find it and when I installed pyTivo I haven't seen any kind of interface.


----------



## reneg (Jun 19, 2002)

If you are on the PC running pyTivo, try browsing to http://localhost:9032


----------



## wmcbrine (Aug 2, 2003)

The push feature is not enabled by default. You have to first set your tivo_username and tivo_password in the Server section of the config.


----------



## fyodor (Sep 19, 2006)

wmcbrine said:


> There are two ways to do this with pyTivo:
> 
> 1. Using "pull" (transfers started from the TiVo): You must add a valid seriesId to the metadata, and you can only group with existing shows.
> 
> 2. Using "push" (transfers started from pyTivo): You can create arbitrary groups.


How do you create arbitrary groups? I couldn't find this feature??


----------



## wmcbrine (Aug 2, 2003)

Through metadata... files with the same seriesId or seriesTitle will be grouped, with the folder name based on the seriesTitle or title of the first one pushed.


----------



## MichaelK (Jan 10, 2002)

wmcbrine said:


> Through metadata... files with the same seriesId or seriesTitle will be grouped, with the folder name based on the seriesTitle or title of the first one pushed.


If one were to Push the first item with a made up seriesId and then pulled subsequent items with the same id would they all be grouped together?

(I'll try it myself when i get a chance- but curious if the answer is already known)


----------



## wmcbrine (Aug 2, 2003)

You'd have to use the seriesId as it ends up on the TiVo, which in the case of a push is _not_ the one you put into the metadata file. Even then, it might not work; I dunno.


----------



## lrhorer (Aug 31, 2003)

Dan203 said:


> You mean a way to make it so when you browse your PC on the TiVo the files show up in folders instead of just one big list? If so then the answer is to use pyTiVo instead of TiVo Desktop.


Or Galleon.


----------



## MichaelK (Jan 10, 2002)

wmcbrine said:


> You'd have to use the seriesId as it ends up on the TiVo, which in the case of a push is _not_ the one you put into the metadata file. Even then, it might not work; I dunno.


sorry to be thick 

but are you saying if I push a file the tivo will assign it a seriesId? (independant of what i want i might have put in the metadata for that file).

So could I just push a file and then extract it to get the seriesId that Tivo assigned? (But I think I'll try that...). I haven't experimented with pushing yet and just tried but can't seem to get it to work- so i guess i need to go read on that subject some. 

Basically I want to burn all our DVD's to server that runs pytivo. And I want my kids and wife to be able to just browse off the tivo (too complicated to show them a browser to push). But I dont want to have umpteen entries in NPL of dvd's they pulled up. So I'd like to have be able to assign a few series ID's asigned to the various metadata files. So that DVD's pulled up would wind up in different folders - maybe "animation DVD's" or "Disney DVD's" and the like.

I've read some are using the paid programing (or other such always there things) seriesId in order to group pulled files. But it seems when you pull a file that tivo looks up the seriesId and uses the name it has in it's database rather than the name from the metadata on the file. Or maybe is there a way to rename paid programming to something else I want even though the seriesId is in the tivo database already?


----------



## wmcbrine (Aug 2, 2003)

MichaelK said:


> but are you saying if I push a file the tivo will assign it a seriesId? (independant of what i want i might have put in the metadata for that file).


I think it's actually assigned by a server at TiVo Inc. But, yeah.


----------



## audiodane (Oct 28, 2009)

MichaelK said:


> but are you saying if I push a file the tivo will assign it a seriesId? (independant of what i want i might have put in the metadata for that file).
> 
> So could I just push a file and then extract it to get the seriesId that Tivo assigned? (But I think I'll try that...).





wmcbrine said:


> I think it's actually assigned by a server at TiVo Inc. But, yeah.


Pushing to arbitrary groups works, but currently it sorts by the date you pushed (most recent on top) inside the created group folder. I've created a crude calculator to create a "recorded-on date" to trick Tivo into sorting by that date which causes the items to be alpha-sorted to the first six characters. But it needs the "time" metadata tag to be included in the push feature which I believe wmcbrine said he was going to work on (but have not heard back an official word on that yet).

What was said here is quite interesting however-- that the Tivo reassigns its own created seriesId (if I'm reading the above right) when you push an arbitraty seriesID value. However, I've found that anything I push is listed as "protected" and I can't get to the file once it's pushed.

Does anyone know if one can browse the tivo filesystem (such as using the WeaKnees MFSTool 2.0 bootCD) and get access to recorded programs that way? If so, if it would support figuring this problem out I'd be willing to help do that (push a bunch of files and manually 'extract' them back off the HDD). I'm not sure if that's exactly necessary though if other things like 'time' etc can get implemented with pushing..

I have also seen a script that extracts the seriesId list currently in the tivo-- I haven't tried that, but it might be worth an investigation..

..dane


----------



## audiodane (Oct 28, 2009)

audiodane said:


> But it needs the "time" metadata tag to be included in the push feature which I believe wmcbrine said he was going to work on (but have not heard back an official word on that yet).


Quoting myself to say that I found a post from wmcbrine on pytivo's forum that says:



> The time metadata keyword is ignored since May 25th... will fix soon.


so it looks like it is in fact being worked on..

woot! 

..dane


----------



## audiodane (Oct 28, 2009)

I pushed several media files with pyTivo to a forced arbitrary folder, and then used wmcbrine's python script to extract the seriesId's currently used in your NPL, and this is what I found:

Pushed default.txt
seriesId : MOVIES__KIDS
seriesTitle : 1. Movies (Kids)
isEpisode : true
...

extracted seriesId values
BS1761749840 1. Movies (Kids)
SH730219 Charlie & Lola
SH01170249 Dinosaur Train
...

So that backs up what wmcbrine said about the tivo reassigning the seriesId value to pushed content....

So then I went back and edited the "default.txt" file and changed the seriesId line to the one reported back from the python seriesId extraction script so that it looked like this:

new "default.txt"
seriesId : BS1761749840
seriesTitle : 1. Movies (Kids)
isEpisode : true

and went into the Tivo and tried to "pull" an item from the pyTivo server to see if it would bring it into the grouped folder in the NPL... unfortunately, it did NOT. 

Oh well..

..dane


----------



## MichaelK (Jan 10, 2002)

audiodane said:


> I pushed several media files with pyTivo to a forced arbitrary folder, and then used wmcbrine's python script to extract the seriesId's currently used in your NPL, and this is what I found:
> 
> Pushed default.txt
> seriesId : MOVIES__KIDS
> ...


bummer- i was hoping that would work but hadn't got around to trying myself.


----------



## sender_name (Feb 12, 2005)

Hey just bumping this because I think? That I encountered a similar problem..
I have a kids show my kid watches on the tivo and I wanted to cut the commercials out etc....So I grabbed a show with FFmpeg and converted it to mpeg2. I cut out the commercials...using windows movie maker (just to test before going to something more robust) and recomb them to a wmv w/ the HD parameters. I then used the tivo text metadata file from the original grab and renamed it the same as the wmv. I then pushed that to the tivo w/ pyTiVo...and the resulting show had all the correct info, but it didn't put it in the original folder. It left it out on it's own as a single episode...The tivo (series 3) didn't group it in the same folder. I want it to go to the same folder so I can do play all and have it just play these shows consecutively...I am guessing that maybe during the push it gave it it's own series id, diff from the one in the original show metadata..

I have been brainstorming and wondering if i grab the CF show i just pushed and then pull it back again with a fresh copy of the metadat.txt and the newly grabbed .tivo version of the .wmv...hmm...if that would then put it in the right folder...


Thanks for input...


----------



## orangeboy (Apr 19, 2004)

sender_name said:


> Hey just bumping this because I think? That I encountered a similar problem..
> I have a kids show my kid watches on the tivo and I wanted to cut the commercials out etc....So I grabbed a show with FFmpeg and converted it to mpeg2. I cut out the commercials...using windows movie maker (just to test before going to something more robust) and recomb them to a wmv w/ the HD parameters. I then used the tivo text metadata file from the original grab and renamed it the same as the wmv. I then pushed that to the tivo w/ pyTiVo...and the resulting show had all the correct info, but it didn't put it in the original folder. It left it out on it's own as a single episode...The tivo (series 3) didn't group it in the same folder. I want it to go to the same folder so I can do play all and have it just play these shows consecutively...I am guessing that maybe during the push it gave it it's own series id, diff from the one in the original show metadata..
> 
> I have been brainstorming and wondering if i grab the CF show i just pushed and then pull it back again with a fresh copy of the metadat.txt and the newly grabbed .tivo version of the .wmv...hmm...if that would then put it in the right folder...
> ...


Once you push a video to the DVR, that show is mark copy protected. However, if you push another video using the same seriesID in the metadata file, a folder will be created with the two pushed shows in it.



> ...I am guessing that maybe during the push it gave it it's own series id, diff from the one in the original show metadata...


I think that's what happens, too.


----------



## sender_name (Feb 12, 2005)

well, since i am going to be cutting and pushing 12 episodes of "Busytown Mysteries" yeah. that's right...my kid loves the show but 9 min's of garbage commercials per ep is going to rot a child's brain...
Since I am doing all the ep's it doesn't matter then...all the edited shows will eventually end up in the same folder...that's all i care about...time to forge on and see what happens thanks!


----------



## wmcbrine (Aug 2, 2003)

Push can't group with existing seriesID's, only with groups it creates itself. If you want the edited programs grouped with the TiVo-recorded shows, you have to Pull them.


----------



## sender_name (Feb 12, 2005)

ah. ok...pull from the pytivo share folder...and they will i hope pull the metadata as well


----------



## oregonman (Jul 1, 2002)

With push, is there any way to use the default.txt file to get all the programs in the directory pushed to the same folder without creating individual meta files for each. I tried just setting the SeriesTitle in the default.txt, and I was hoping the filenames would be used to name the programs in the NPL folder, but the program names came up blank.


----------



## orangeboy (Apr 19, 2004)

oregonman said:


> With push, is there any way to use the default.txt file to get all the programs in the directory pushed to the same folder without creating individual meta files for each. I tried just setting the SeriesTitle in the default.txt, and I was hoping the filenames would be used to name the programs in the NPL folder, but the program names came up blank.


The metadata field to do this is seriesID.

I actually use both seriesID and isEpisode : true.


----------



## Gavroche (May 27, 2007)

orangeboy said:


> Once you push a video to the DVR, that show is mark copy protected. However, if you push another video using the same seriesID in the metadata file, a folder will be created with the two pushed shows in it.


"mark copy protected."

No it isn't. Pushing a file to the Tivo does not mark it as copy-protected. (It doesn't for me, anyway!)


----------



## wmcbrine (Aug 2, 2003)

Yes, it does.


----------



## oregonman (Jul 1, 2002)

orangeboy said:


> The metadata field to do this is seriesID.
> 
> I actually use both seriesID and isEpisode : true.


This doesn't seem to do what I want. My default.txt file is:
SeriesId: Videos from pc
isEpisode : true

I don't have any other .txt files in the directory. When I push files, they end up in a folder named "Videos from pc", but within that folder they have null names ("""").

Again, what I was hoping for was a way to use default.txt so that any files that I push from the directory go into a specified folder, with a program name related to the file name. I am trying to avoid having to create a metadata file for each file.


----------



## Spenner (Mar 28, 2006)

oregonman said:


> Again, what I was hoping for was a way to use default.txt so that any files that I push from the directory go into a specified folder, with a program name related to the file name. I am trying to avoid having to create a metadata file for each file.


Yes that's what I do. Follow the instructions in this post: http://www.tivocommunity.com/tivo-vb/showthread.php?p=7555181#post7555181 to create your "Videos from pc" folder on the Tivo. Once you've pushed the two test files, have the default.txt in your PC folder be just:
isEpisode : true
episodeNumber : 1
seriesId : SH999901 [whatever series ID you used]
and all files you push from that folder (no other metadata needed) will go to "Videos from pc" on your Tivo.


----------



## oregonman (Jul 1, 2002)

orangeboy said:


> The metadata field to do this is seriesID.
> 
> I actually use both seriesID and isEpisode : true.





Spenner said:


> Yes that's what I do. Follow the instructions in this post: http://www.tivocommunity.com/tivo-vb/showthread.php?p=7555181#post7555181 to create your "Videos from pc" folder on the Tivo. Once you've pushed the two test files, have the default.txt in your PC folder be just:
> isEpisode : true
> episodeNumber : 1
> seriesId : SH999901 [whatever series ID you used]
> and all files you push from that folder (no other metadata needed) will go to "Videos from pc" on your Tivo.


OK
I tried following the directions in that post. I started with pytivo shut down and I created a new subdirectory and put in video1.avi, video2.mp4 and two metadata files, video1.avi.txt and video2.mp4.txt, each containing the following:
title : PC Videos
seriesTitle: PC Videos
episodeNumber : 1
isEpisode :true
seriesId : SH999902

I started the pytivo console, then browsed to the new directory and sent both videos to Tivo. (By the way both videos show as title "PC Videos" in the browser.)

When they finish, I check the Tivo and both videos are in a folder named "Videos from pc" which is the name I was using for testing yesterday. Also they both have null names. So somehow something is being held over from yesterday even though I created a new directory and started pytivo fresh. Any ideas on what is going on?


----------



## txporter (Sep 18, 2006)

@oregonman: If you have already used that seriesID to push a show to your Tivo, it will continue to use whatever name (seriesTitle) you assigned it the first time. Try changing the seriesID to something else to see if you get the naming that you are interested in.


----------



## Gavroche (May 27, 2007)

wmcbrine said:


> Yes, it does.


I stand corrected. Indeed, it does! (I must have been confusing it with pulling from the Tivo, perhaps.)

I also remember now why I never use push... you can't watch the damned thing until it's done transferring.


----------



## orangeboy (Apr 19, 2004)

Gavroche said:


> ...I also remember now why I never use push... you can't watch the damned thing until it's done transferring.


That too is incorrect. I push (h264/ac3) mp4 files that are available for playback immediately. I actually have found that mpeg2 files are available while transferring (although I am not certain if they are "immediately").


----------



## Gavroche (May 27, 2007)

orangeboy said:


> That too is incorrect. I push (h264/ac3) mp4 files that are available for playback immediately. I actually have found that mpeg2 files are available while transferring (although I am not certain if they are "immediately").


All of my files have to be transcoded. If I pull from the Tivo, I can begin watching more-or-less immediately and only encounter the "please wait for more of the program to transfer" situation with HD material. SD I never have to wait for. (Files are either Mpeg1 or Nero-encoded AVC MP4 with AAC stereo, mono, or multi-channel)

If I push the same files, I can't watch it until it's completely finished transferring, and it usually tells me it's going to take some ridiculous amount of time like 5 hours to transfer. No, of course, it never takes that long or anything close to it.

(Sorry, I should have clarified the specifics of my statement.)

I always thought this was normal, though... it's not?


----------



## wmcbrine (Aug 2, 2003)

There may be a delay until you can start watching, but it's not necessarily for the full length of the program.


----------



## Spenner (Mar 28, 2006)

It seems to be related to the speed of the transfer. When pushing HD mp4's, I've found that when my Tivo is wired, I can watch a few minutes after it's started. When using the wireless, I get the "try watching after X hours..." message. Haven't done SD so I don't know if when pushing SD over wireless if Tivo considers the transfer rate fast enough to allow watching right away.


----------



## Gavroche (May 27, 2007)

wmcbrine said:


> There may be a delay until you can start watching, but it's not necessarily for the full length of the program.


What kind of delay? I've never been able to watch a pushed program before it had completely transferred, on my series 2's or my series 3.

I feel like (I say "I feel like" because I have not actually timed it) it does take longer to push than to pull... would that be normal, or could there be something else going on with my network perhaps?

Using all wireless via Linksys WRT54G.


----------



## Gavroche (May 27, 2007)

Spenner said:


> It seems to be related to the speed of the transfer. When pushing HD mp4's, I've found that when my Tivo is wired, I can watch a few minutes after it's started. When using the wireless, I get the "try watching after X hours..." message. Haven't done SD so I don't know if when pushing SD over wireless if Tivo considers the transfer rate fast enough to allow watching right away.


I think you may have hit it... I'm on all wireless here.


----------



## wmcbrine (Aug 2, 2003)

A push takes the same amount of time as a pull, given the same data. (Since a push can in some cases transfer a file without transcoding where a pull can't, "the same data" isn't always a given.) However, pushes don't start immediately, as pulls do; first, notice is sent to mind.tivo.com, then at some later time, the TiVo gets the request, and only then starts the transfer.

The second issue is the delay before you can play it -- this doesn't happen at all with pulls, only with pushes. I believe this is because push was originally designed to work over the Internet (for TiVoCasts), where the transfer rate was unpredictable, while pull works over the LAN, where the rate should be fairly fast and consistent. The idea seems to be that one, initial delay will be less frustrating to users than a constant start-and-stop experience.

The length of the delay is based on the rate at which the video is coming in, according to the final size the TiVo expects it to be -- i.e., if it seems to be coming in at better than real time, you can start playing it sooner. With transcoded material, pyTivo makes this worse, because it intentionally overestimates the size, so that it appears to be coming in more slowly than it really is. However, this is necessary, because _underestimating_ the size causes the TiVo to discard the entire recording once it exceeds the projected size.


----------



## oregonman (Jul 1, 2002)

txporter said:


> @oregonman: If you have already used that seriesID to push a show to your Tivo, it will continue to use whatever name (seriesTitle) you assigned it the first time. Try changing the seriesID to something else to see if you get the naming that you are interested in.


I used a new seriesId for that test. Is it seriesId or seriesID? The Wiki says seriesId.


----------



## orangeboy (Apr 19, 2004)

oregonman said:


> I used a new seriesId for that test. Is it seriesId or seriesID? The Wiki says seriesId.


My apologies for the mixup. I stated that using seriesID would do the trick, but it is seriesId, with lowercase d.


----------



## etvv (Dec 20, 2009)

You have to use the IF that is unique to the series.


----------



## txporter (Sep 18, 2006)

orangeboy said:


> My apologies for the mixup. I stated that using seriesID would do the trick, but it is seriesId, with lowercase d.


Yeah, I said it as well. It is seriesId.


----------



## oregonman (Jul 1, 2002)

I still can't get the default.txt file to do what I want, which is to push files into the correctly named folder with program names related to the filename of the video without creating a separate meta file for each file.

Since the relevant post is a ways back now, I'll restate what I've done so far:

I started with pytivo shut down and I created a new subdirectory and put in video1.avi, video2.mp4 and two metadata files, video1.avi.txt and video2.mp4.txt, each containing the following:
title : PC Videos
seriesTitle: PC Videos
episodeNumber : 1
isEpisode :true
seriesId : SH999902

I started the pytivo console, then browsed to the new directory and sent both videos to Tivo. (By the way both videos show as title "PC Videos" in the browser.) That seriesId had not been used before.

I repeated this test, renaming the files to video3.avi and video4.mp4 and video3.avi.txt and video4.mp4.text and changing the seriesId to SH999903. When I browsed the directory, the videos both show the name "PC Videos". I pushed the files and once again the folder name on the Tivo was "Videos from pc" which is a name that I was using from earlier testing. 

So somehow that name is associated with something other than SeriesId and remembered.

I then tried pushing the files to another Tivo that I had not used for any testing yet and the folder came up with the correct name, "PC Videos".

But the programs show up with null ("") names. So I have two problems:

1) how do I get the Tivo or ptivo to forget the old name?
2) how do I get the program name to be the file name of the video file?


----------



## wmcbrine (Aug 2, 2003)

oregonman, are you using an up-to-date version of pyTivo?


----------



## orangeboy (Apr 19, 2004)

wmcbrine said:


> oregonman, are you using an up-to-date version of pyTivo?


That's what I was wondering! I was poking around and found this thread talking about video.py, and it looks like "f.name" is used in some of the metadata logic. Me not exactly knowing python doesn't clue me into what is really going on, but it would seem that the filename _should_ be sent along if there is no title metadata(?)


----------



## rjmitche (Dec 30, 2004)

Maybe I'm misreading all of this but, I think what oregonman is seeing with the episode title being empty is more related to this thread over on the pyTivo forum. I'm pretty sure I'm experiencing the same thing and I'm using a snapshot from early December. I've worked around the issue by writing a batch file to create a separate metadata file for each video file that contains a single line:

episodeTitle : _<filename>_​
This, along with a default.txt file that contains values for _seriesTitle_, _isEpisode_ (true), and _seriesId_, make the pushes behave for me (i.e. they are pushed into an appropriate folder with an episode title that matches the filename). The extra step of creating the individual metadata files makes it more difficult to automate the entire process though.


----------



## oregonman (Jul 1, 2002)

wmcbrine said:


> oregonman, are you using an up-to-date version of pyTivo?


I think so. I got it from here:
http://repo.or.cz/w/pyTivo/wmcbrine.git
and the file I extracted was:
wmcbrine-e84b4c19fa5a65fdc454c60a823706dc11a9c7c7.tar.gz

I extracted it into a previous windows package that I installed. Is there any way to tell the version of the running pytivo to see that I extracted it correctly?


----------



## oregonman (Jul 1, 2002)

rjmitche said:


> Maybe I'm misreading all of this but, I think what oregonman is seeing with the episode title being empty is more related to this thread over on the pyTivo forum. I'm pretty sure I'm experiencing the same thing and I'm using a snapshot from early December.


That thread seems to imply that the behavior I was looking for used to exist, but it disappeared in some update. That thread is from August, though, and it just kind of ends with no resolution.

If I want to try to go back to a version that has the behavior I am looking for, can someone recommend a stable release that I could use? The original version I tried was a windows installer version and it did not seem to have the ability to push (or I didn't find it).


----------



## txporter (Sep 18, 2006)

oregonman said:


> I think so. I got it from here:
> http://repo.or.cz/w/pyTivo/wmcbrine.git
> and the file I extracted was:
> wmcbrine-e84b4c19fa5a65fdc454c60a823706dc11a9c7c7.tar.gz
> ...


It sounds like you are on Windows. Is it perhaps a 64-bit version of windows? I had an issue a while back where I installed on a Vista64 machine with Rdian06's windows installer and then tried to upgrade with one of wmcbrine's git packages. There ended up being two different directory structures for pytivo (one in the Program Files directory and the other in Program Files (x86)). Could that be happening to you and maybe you actually aren't running the newest version of pytivo that you have downloaded?


----------



## oregonman (Jul 1, 2002)

txporter said:


> It sounds like you are on Windows. Is it perhaps a 64-bit version of windows? I had an issue a while back where I installed on a Vista64 machine with Rdian06's windows installer and then tried to upgrade with one of wmcbrine's git packages. There ended up being two different directory structures for pytivo (one in the Program Files directory and the other in Program Files (x86)). Could that be happening to you and maybe you actually aren't running the newest version of pytivo that you have downloaded?


I am not using a 64 bit Windows. I think that I am running the newer version of pytivo because before I extracted the newer version, I did not have the ability to push at all.


----------

