View Full Version : Tivoserver Helper Scripts
07-24-2007, 12:04 AM
Here are a few scripts I find invaluable for preparing videos for Tivoserver. If anyone has additional or better tools, I'd be happy to add them to this post.
1. launch_start_tivoserver.bat - Two Windows batch scripts to restart Tivoserver automatically. Running the launch_start_tivoserver.bat script will launch the other batch file, which starts Tivoserver. If Tivoserver quits or the Tivoserver window is closed, the the first script will restart it automatically.
2. tyffmpeg2.bat - Windows batch script that batch encodes multiple videos sequentially using ty-enabled ffmpeg (http://www.dealdatabase.com/forum/showthread.php?t=49935). Edit top portion of script, and then run without arguments. Supports avi's, mpg's, and vob's in the same source folder, and encode each type with different options. It also allows you to stop/interrupt the encoding process, and remember which file you left off on when you run it again.
3. xml.sh - Cygwin script that generates XML files for all shows in a given folder on your PC. This is especially useful if you have a folder on your PC filled with 100 movies, and you want them to appear in a "movies" folder when you transfer them with Tivoserver. The script generates a unique XML file for every show in the folder, and then edits the file, giving it a unique TMSID and setting the episode title equal to the name of the show with the extension stripped off. Since Tivo doesn't like you creating TMSIDs from scratch, you need to extract a template XML file from the target folder you plan to transfer the shows to. Usage is explained here (http://www.dealdatabase.com/forum/showthread.php?t=52025&highlight=xml).
03-19-2009, 12:19 AM
UPDATED to support passing settings directory from the service or systray.
UPDATED to be compatible with cygwin 1.7, and show version in file properties.
To get tivoserver to launch as a service, I had to hard code a few things, so tivoserver.exe
(and the cygwin1.dll) must exist in the same directory with tivoserver_service.exe
(same for tivoserver_tray), and once installed as a service, you must
manually change the service to login as a user, and to autostart if you wish.
Before setting up the service, make sure that TS runs properly
by opening a command prompt, then CD to your tivoserver directory.
Enter the command "tivoserver_service -t" to test that it loads properly.
(If you just launch TSS without flags (except -d), it will restart forever)
Control-C a few times to watch the service restart until you get a
pop-up window about restarting too many times. (only the test has a limit)
Next, enter "tivoserver_service -i" to install the windows service.
There is also a "-r" flag to remove the service, and "-h" for help.
If you wanted to pass arguments down to tivoserver.exe from the service,
install with explicit path to the service executable plus args, EX:
tivoserver_service.exe -i C:\tivoserver\tivoserver_service.exe -d C:\tivoserver
To test before installing the service, you can also use the -d flag in test mode:
tivoserver_service.exe -t -d C:\tivoserver
Open the services control panel, then open the properties for the TivoServer service.
Set startup type to 'Automatic', if you want it to reload after a system reboot.
If not using the '-d' settings directory option, or for builds earlier than -a7:
Click the 'Log On' tab, then the radio button for 'This Account', and
enter your login id and password for the service.
tivoserver will run under whatever security settings you give it,
so that account must have a home directory for the .tivoserver settings directory,
and must have security permission to access any media directories you tell it to.
Tivoserver_service can now run as the LocalSystem account without setting a password,
as long as you specify a '-d' directory for tivoserver to use, AND use a version of
tivoserver which supports reading the '-d' command line before checking
the user's home directory (-a7 or later). By default, the service will
start with an interactive console window. If you don't want to see the console,
check the 'Log On' tab in the service properties, and unselect the checkbox for
"Allow service to interact with the desktop".
The requirements that tivoserver running as LocalSystem have read permission
to the video directories still applies, and MUST have write permission to the
.tivoserver settings directory.
REQUIRES TivoServer 0.4.4-a7 or later for LocalSystem + '-d' to work!!
Also included below is a win32 app to run tivoserver hidden behind a systray icon.
It's really simple, put it in the same directory as tivoserver.exe and run it.
TST now supports -d directory arg for tivoserver startup as well.
(Tray app based on code written by original TS author WSewell)
Both service and tray apps should allow any number of arguments to pass down
to TivoServer, just make sure the -d is the first one, EX:
tivoserver_tray.exe -d c:\tivoserver -s TivoServName -l 5
Neither tivoserver_service or tivoserver_tray are designed to run more than one copy,
so if you need more than one instance of tivoserver.exe, you'll still have to run it manually,
or run one copy as a service and on in the systray (with separate settings directories specified)
tivoserver_service.exe and tivoserver_tray.exe in here. (http://www.bintec.com/tivo/tivoserver-win32-tools.zip)
(Should support earlier versions of tivoserver.exe as well, not just my builds)
[Earlier than 0.4.4-a7 requires setting a login id and password for the service]
03-19-2009, 12:19 PM
Thanks for the guidance, and thanks for all the work Bitmap !
I have a few movie clips that were in quicktime format, but then I converted them to mpeg2 in an attempt to get ts to stop cutting off the clips. In both formats, tivoserver loads the clip properly and plays it fine, but it is only guessing as to how long the clip is, and it is mostly wrong.
Can you point me in the right direction to correct this problem?
06-24-2009, 05:47 PM
where can I find TivoServer 0.4.4-a7? All that I find at sourceforge is TivoServer 0.4.4-a4!!
My main problem is getting the old version to work again once I installed Vista SP1 - worked fine before that.
06-28-2009, 12:13 PM
Look at the signature two messages above yours and the link for a9 is there.
09-23-2009, 09:38 PM
sorry, that link seems to be DOA - anyone have this and can email it to me?
06-08-2011, 10:06 AM
You don't want to hear this, I'm sure, but I'd suggest scrapping Vista- I've spent way too many hours in vain trying to solve problems that Vista has caused me.
06-22-2013, 12:49 AM
I was able to run the patched version on my THD without issue, but as you can tell by the dates it was quite some time ago, not sure what SW version I was on back then. Is it easy to reproduce the issue you are seeing. If so, I may install it and see what I can find.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.