PDA

View Full Version : Titan TV .tvvi files to trigger events in girder?


nwahec
July 11th, 2004, 07:42 PM
I have seen this question asked on this forum but not answered. I"m hoping someone has an idea how to make this work...

For those who arent familiar with titantv it is a slick looking personalized tv guide that has mouseover dialogs that offer options including "watch" and "record". When clicking those options the browser is pointed to a .tvvi file which can be interpretted by several software dvrs. But that assumes i'm watching tv on my computer. Which i'm not. I watch tv on tv and control everything with the computer.

I would like to use the http://www.titantv.com online personalized tv guide to trigger events in girder. Such as: click "watch" on the show that I want to see and girder triggers the command to tune my cable box via usb-uirt. Or: click "record" on the show in the interactive guide and cue a series of events including windows media encoder or other encoder software to record the show after the cable box changes to the appropriate channel.

I know all about myHTPC but i find it way too slow and processor intensive. Plus, i've spent hours on it and still cant get the got tv plug in to work properly.

It seems like a fairly simple routine.. to send channel change commands anyway.

Can anyone point me in the right direction?

Thanks,
Chris

Promixis
July 11th, 2004, 10:01 PM
Chris,

Do you want to parse the file with Girder? Do you have a link to the file format?

nwahec
July 13th, 2004, 05:34 PM
This is what it looks like when i open it in notepad... i'll keep researching and see what else i can find about them

〰㄰〰㤲〰㄰〰㄰㐶㜱〳〰㄰〰〰〰〴좒ớ甬ꬦŘ
嵤쬔䅄䜤틜ஙⅎꝑ䌈〰㄰〰㐳㔹〲㈹〰㄰〰〰〰〴剴논ﴓ➫㑖痙㈤��绌劸볂笤濾扐褥岺〰㄰〰 㜴㤳ㄶ㔸〰㄰〰〰〰〴✤ទ뮄몞᪹�﹙峴댣䑩牺Ρ␗骱⦡騑〰㄰〰㤷㌰㈵㠴〰㄰〰〰〰〴⽂鈒逞醵罞ힸ 蓛ꏑ뷑햘쨫Ɔͪ쥊罵◪驔楓〰㄰〰ㄹ㈴㠵㜰〰㄰〰〰〰〴ᖳ䱰麟œ팯ᒑꬭ羖䌟ڰ땋쵘嬛谈絴숂槷✧駴〰㄰〰㐹 㜷㐱㐴〰㄰〰〰〰〴≴쩾펾�腸຋籾괩욆�신웄꣮炲㈆및乚䏖〰㄰㄰㐰㠱㐶㌶〰㄰〰〰〰〴�婮㓇珻梑཭粮˾ 䯿븛�팳녳⺰ಹ蹦菵㙟ថ〰㄰㄰㜳㜶㘰ㄷ〰㄰〰〰〰〴챧��筈麐뺫譂⣚儔犧䓽�ᶔ빎頕틺〰㄰㄰ㄶ㐳 㔱㘶〰㄰〰〰〰〴吥혷꫞턐ꕒ鿦춌峋鎠�䃖紞ꞙ࿒ᒍ鎺瘽〰㄰㄰ㄸ㤳㤷㜴〰㄰〰〰〰〴抇ⴚ鐲襖媎圩퓾㿻嘫 ﯾ烮뙄匭ꅪ똚≩䠥줫㡳洄〰㄰㈰㐷㤹㜳㄰〰㄰〰〰〰〴敫햽䳻웺瀞蔮禂까礔ϧ�ࣰ뿠곆钷⏸捼엗〰㄰㈰ㄸ㜴㈷ ㈷〰㄰〰〰〰〴¢ꐯ䶤ҳ၃謑㔅爲亅ᝀ蹋⟀�윜ﶖ퍪b㘾�晱〰㄰㌰㠱㤴ㄸ㌲〰㄰〰〰〰〴虈⓻瓺妹侰�픝 ﰃ⇍뾸뷜঎몃庽딮즄됷〰㄰㌰㠲㤲ㄲ㈸〰㄰〰〰〰〴捦Ꮙ튓췽㙴䝆胢뢨ꇆ遶蔝ﱫ霡쥤䩌涰鼒陀〰㄰㌰㐳㘷㔳㤲 〰㄰〰〰〰〴鎯۷펇乧᱀㭥㶑�賭ᳰ嗧淼⒱廣฽啡씞൮〰㄰㌰㈴㘳㈶〱〰㄰〰〰〰〴黏汏�⓺醱䜀㱳쀏㍖뻻楲 ⌺鼧뼓鞳掻㪬쾾䋬〰㄰㌰㠶㐸㤷㌲〰㄰〰〰〰〴徠隍玔ˆ䘯歚謫/堆ꖑ࿛㈱윕锧䕛㜦䞾〰㄰㌰㈹㤰ㄱ㜹〰 ㄰〰〰〰〴≎ɟ審襃炲エ損ꩈ象긺ཞ㍋欘䥻冼읋ꊭ뇏〰㄰㐰㘱〵㠳㠵〰㄰〰〰〰〴븵漌못룥䈻ㅾ䚼䚏綠 읱成뺀匚ếh騸〰㄰㐰㘲㠵㤶㤲〰㄰〰〰〰〴읲ᄰ૙圂諾쉱릷䳁፺䩫疻臔々⨅㓢ᗿ䅻珀澚〰㄰㐰〶㤴㘰㌱〰㄰ 〰〰〰〴ㄺ玧䬽텭᧤穋䪢봐륕륜☱ҳ⯴捲벊縶踔ј遈ⶻ〰㄰㐰㈶㔲㌳㘶〰㄰〰〰〰〴덞썡첬犷큐ꫝ໷釗ꯝ⒆쩷⌆꣢ ᅙ軓ƀ܉န�䵠〰㄰㐰㘶㈴㔰㘰〰㄰〰〰〰〴셍ᗹⰩ잗ᑼᎧ峹ꛢ繎棭嵅Ȕ挟╷చ꬇櫪萯〰㄰㐰㔷㈸〸㤳〰㄰〰 〰〰〴챓ﻵꅃ非瓃쑱潿ꚿᏫრ놀搋”ᬺᅄⱸʟξ锂〰㄰㐰㘷㔰㠳㐵〰㄰〰〰〰〴�헃쳞큤૸涙勇绀步䶬汧惰� 稝⎅䟗嶸㳭〰㄰㐰㘸㜱㔳㈴〰㄰〰〰〰〴⛱㘥魹䭢숳⟠棟ꉕ㶰䟟⅒탋ﶮ魧�യ强솼〰㄰㔰㜱㠰㈱㌶〰㄰〰〰 〰〴�鼻蛕㈓暭頧ꯠ倌쀘摴Ⲑ쾚麟壚젱ਗ옡〰㄰㔰㔲㤷㠹㘲〰㄰〰〰〰〴ࡋ闔≚悅짽읟媏턓㔉ⱛ幻飄嬾 칁楥흮䫌⟉〰㄰㔰㘳㈲㤹㌶〰㄰〰〰〰〴搞蝬ⁱ䙺늑稘ᎏꑅ唐游㒩ﮫ櫳^莨屘첼ૌ〰〰㘰〸㐡껶缜⹮䉨됹乨 ၉䘃Dआ輪쒠祟뜈및룋Ҁ矆佊벞䐾潥�༴㛼꺝铉궾꡹௳쿭榍㵶ᗨ郮쩨ꂨ鲐硟⚊ꩮ�遖Ꞻꏿ帖ᒱ剋혺﭅橔陻 之狝六Ꮰ慄및蓋Ҁ᳆䕥ᛷ誨娀및蓋Ҁ᳆ێẚ脸껩︒蕏쬋웎钲敦θ妤쵵Ὧ掂⟩磀哳滹掋ᎉ횙젥�邳u溁鳵 タ臒ᤣẗꘫ줿ം夐䍈胜揫抱リՐ䘱ࡃ泝薊뗒㠖骭㇭Კ腩愷金柞␆ൃ鞁ᆆ셔彊勌犫梮⬳胢瞜빻ഏ੸뺡ᖔᾫ஺Èᙘ 嫤ฒ₰ᖇ醠ꨠꬤ튵랍翱놂筮ꄷ⋮䉹藱湀ଥ誝*궾薜陁่ⷄ쨠⯟쨮압贉崭哠挎꒒鼎훾躿㒵精逎쎔ᢑ ㉟柼┒㤁⻔槝涓⢔䲠묲퓉冂㡾휾檐㨗鸗奻꠬疿먈籺꒾ᖴ⼡큢갶鞰뵒⏎䟕蚎蒤㨍嚉臌飊詝쾷脐ꕳ읤ᭉ뵖㾠不띹ꖨ 牡ꁭ탋�䑷ꄀඋ蛄㞘従ࣦᒔ꺃唱䑅䓨꺶⹹躜⎍駯嶈㦅阁顆茣ꢙ༑┶嶈㦅阁顆싱壏椉돊찗ు䇊㵞䈳遞뀫罓 搴㡓墢쾗㳥䠪뛳㺇ힺ醭괖₧ﱅ憢珓끛岐呿ⱊ뛊ﰔ쯵﬷艹䖮흀⛃穃颏

nwahec
July 13th, 2004, 05:53 PM
#
# Copyright (C) 2002 Alex Shah. All rights reserved.
#

our $VCR_HOME = "C:/Program Files/Creative/VideoBlaster Digital VCR";

use Win32;
use Win32::Setupsup;
use XML::Simple;
use Data::Dumper;
use Time::Local;
use Tk;

use strict;

# global variables
our $window;
our $timeout = 0;
our $standby = 0;
our $freq= 'daily';

# read parameters from titantv xml
my $input;
if (scalar(@ARGV) == 0)
{
$input = \*STDIN;
}
else
{
$input = $ARGV[0];
}

my $config = XMLin($input)->{program};

# clean up config
foreach my $key (keys(%$config))
{
if (ref($config->{$key}) || !defined($config->{$key}))
{
$config->{$key} = '';
}
}

print Dumper($config);

# convert the start and end time to seconds
my ($start_year, $start_mon, $start_day) = unpack("A4A2A2", $config->{'start-date'});
my ($end_year, $end_mon, $end_day) = unpack("A4A2A2", $config->{'end-date'});
my ($start_hour, $start_min) = unpack("A2xA2", $config->{'start-time'});
my ($end_hour, $end_min) = unpack("A2xA2", $config->{'end-time'});

# sanity check, are start and end time before after or now?
my $start = timegm(0, $start_min, $start_hour, $start_day, $start_mon-1, $start_year-1900);
my $end = timegm(0, $end_min, $end_hour, $end_day, $end_mon-1, $end_year-1900);
my $curr = time();

# did program already pass?
if ($end < $curr)
{
print "cannot record program that occurred in the past\n";
exit();
}

# is program currently playing?
if ($start < $curr && $end > $curr)
{
print "flip to this channel.\n";
start();
flip($config->{'rf-channel'});
exit();
}
else
{
# prompt for whether you want to record one, daily, weekdays, or weekly
$config->{date} = scalar(localtime($start));
showGUI($config);
print "frequency = $freq\n";

# figure out if we are recording today
my ($sec,$min,$hour,$mday,$mon,$year,$wday);
($sec,$min,$hour) = localtime();
my $curr_time = $hour*3600 + $min*60 + $sec;
($sec, $min, $hour, $mday, $mon, $year, $wday) = localtime($start);
my @weekdays = ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
my $start_time = $hour*3600 + $min*60 + $sec;
my $skip = int(($start - $curr)/(24*60*60));

print "start = $start_time, curr = $curr_time\n";
# if time has already passed today, skip to tomorrow
if ($start_time < $curr_time)
{
print "skipping an extra day\n";
$skip++;
}

# start application and set recording
start();
record(
$config->{'rf-channel'},
$skip,
mytime($start),
mytime($end),
$config->{'program-title'},
$config->{'program-description'},
$freq,
$weekdays[$wday]
);
if ($standby)
{
print "standing by\n";
standby();
}
exit();
}


sub mytime
{
my $time = shift(@_);
my ($sec,$min,$hour) = localtime($time);
my $ampm = "A";
if ($hour >= 12)
{
$ampm = "B";
}
if ($hour > 12)
{
$hour = $hour - 12;
}
if ($hour == 0)
{
$hour = 12;
}
return sprintf("%02d%02d%s", $hour, $min, $ampm);
}


sub showGUI
{
my $config = shift(@_);

my $main = MainWindow->new();

# add text
foreach my $text (
"Program Title",
"Program Description",
"Date",
"Duration"
)
{
my $key = $text;
$key =~ s/ /-/;
$key =~ tr/A-Z/a-z/;
my $frame = $main->Frame();
my $txt2 = $config->{$key};
my $height = int(length($txt2) / 40) + 1;
my $box = $frame->Text(-width => 40, -height => $height, -wrap => 'word');
$box->insert('end', $txt2);
$box->configure(state => 'disabled');
$box->pack(-side => 'right');
$frame->Label(-text => $text )->pack(-side => 'right');
$frame->pack(-fill => 'x');
}

my $frame = $main->Frame();
foreach my $myfreq ('once', 'daily', 'weekdays', 'weekly')
{
$frame->Button(-text => ucfirst($myfreq), -command => sub {our $freq = $myfreq; $main->destroy();})->pack(-side => 'left');
}
$frame->Button(-text => 'Cancel', -command => sub{ exit(); })->pack(side=>'left');
$frame->pack();
MainLoop();
}

sub flip
{
my $channel = shift(@_);
Win32::Setupsup::SendKeys($window, "$channel\\RET\\", 0, $timeout);
}

sub start
{
Win32::Setupsup::WaitForWindow('Digital VCR', \$window, 100, 10);
if (!defined($window))
{
$standby = 1;
}

chdir($VCR_HOME);
system("btLaunch.exe");

Win32::Setupsup::WaitForWindow('Digital VCR', \$window, 1000, 100);

if (!defined($window))
{
print "digital vcr not responding\n";
exit();
}

if ($standby)
{
sleep(3);
}
}

sub standby
{
Win32::Setupsup::SendKeys($window, "m", 0, $timeout);
for (my $i=0;$i<10;$i++)
{
Win32::Setupsup::SendKeys($window, "\\DN\\", 0, $timeout);
}
Win32::Setupsup::SendKeys($window, "\\UP\\\\RET\\", 0, $timeout);
}

sub record
{
my ($channel, $date, $from, $to, $title, $desc, $freq, $dayofweek) = @_;

print "channel: $channel\n";
print "date = $date\n";
print "from = $from\n";
print "to = $to\n";
print "title = $title\n";
print "description = $desc\n";
print "frequency = $freq\n";

if ($date > 7)
{
print "Invalid date in record()\n";
exit();
}

# choose "schedule"
Win32::Setupsup::SendKeys($window, "m", 0, $timeout);
for (my $i=0;$i<10;$i++)
{
Win32::Setupsup::SendKeys($window, "\\UP\\", 0, $timeout);
}
Win32::Setupsup::SendKeys($window, "\\DN\\\\DN\\\\RET\\", 0, $timeout);

# choose "schedule recording"
for (my $i=0;$i<50;$i++)
{
Win32::Setupsup::SendKeys($window, "\\UP\\", 0, $timeout);
}
Win32::Setupsup::SendKeys($window,
"\\RET\\\\UP\\\\UP\\\\UP\\\\UP\\\\UP\\\\UP\\\\UP\\" .
"$channel\\DN\\", 0, $timeout);

# enter date
for (my $i=0; $i<$date; $i++)
{
Win32::Setupsup::SendKeys($window, "\\RIGHT\\", 0, $timeout);
}
Win32::Setupsup::SendKeys($window, "\\DN\\", 0, $timeout);

# enter from
Win32::Setupsup::SendKeys($window, $from, 0, $timeout);
Win32::Setupsup::SendKeys($window, "\\DN\\", 0, $timeout);

# enter to
Win32::Setupsup::SendKeys($window, $to, 0, $timeout);
Win32::Setupsup::SendKeys($window, "\\DN\\\\DN\\", 0, $timeout);

# frequency
if ($freq ne "once")
{
# create recording group
Win32::Setupsup::SendKeys($window, "\\RET\\\\UP\\\\UP\\\\UP\\\\UP\\\\RIGHT\\\\RIGHT\\\ \RIGHT\\",
0, $timeout);

if ($freq eq "weekdays")
{
Win32::Setupsup::SendKeys($window, "\\LEFT\\", 0, $timeout);
}
elsif ($freq eq "daily")
{
Win32::Setupsup::SendKeys($window, "\\LEFT\\\\LEFT6\\", 0, $timeout);
}
Win32::Setupsup::SendKeys($window, "\\DN\\\\DN\\\\DN\\", 0, $timeout);
for (my $i=0; $i<30; $i++)
{
Win32::Setupsup::SendKeys($window, "\\BACK\\", 0, $timeout);
}
Win32::Setupsup::SendKeys($window, $title, 0, $timeout);
$freq = ucfirst($freq);
my $extra = "";
if ($freq eq "Weekly")
{
$extra = "$dayofweek "
}
Win32::Setupsup::SendKeys($window, " ($extra $freq)", 0, $timeout);
Win32::Setupsup::SendKeys($window, "\\DN\\", 0, $timeout);
}
else
{
Win32::Setupsup::SendKeys($window, "r", 0, $timeout);

# erase untitled
for (my $i=0; $i<8; $i++)
{
Win32::Setupsup::SendKeys($window, "\\BACK\\", 0, $timeout);
}

# send title
Win32::Setupsup::SendKeys($window, $title, 0, $timeout);
Win32::Setupsup::SendKeys($window, "\\DN\\", 0, $timeout);

# send description
if (length($desc) > 0)
{
Win32::Setupsup::SendKeys($window, $desc, 0, $timeout);
}
}

# confirm
Win32::Setupsup::SendKeys($window, "\\RET\\", 0, $timeout);

Win32::Setupsup::SendKeys($window, "\\BACK\\\\BACK\\", 0, $timeout);
}

Promixis
July 13th, 2004, 07:22 PM
Anyone know what language thats written in? It should be easy to parse the tvvi or tvpi file with Girder and Lua but I cannot find anywhere the file layout. It is not a simple xml file ....

nwahec
July 13th, 2004, 08:14 PM
I've been playing around with this help site from myHTPC http://home.mho.net/kaushik/dvcr/html/setup_perl_script.html

It shows you how to trigger the above perl script to operate the digital vcr program. I'm hoping i can modify the script to either control girder or call php scripts that i'm using from a flash based remote control sending events over internet event server to girder.

goal being to change the channel.

I'll keep working on it. If anyone has any suggestions i'm all ears!

Thanks mike for responding so quickly.

Chris

nwahec
July 13th, 2004, 08:21 PM
lots more about tvvi tvpi formats here: http://www.spidersweb.freeserve.co.uk/dab/dabdig.htm

including this very small faq: TVPI/TVVI
What is this TVPI/TVVI introduced in version 2.20?
There is a file format supported by a few PC-based TV software packages.
It looks like it was defined by TitanTV.
I use myHD for my HDTV and it supports TVPI/TVVI - TitanTV but I do not get the Digital channels recorded - any ideas?
A basic channel number is not enough for such a digital HDTV channel, so change the format of the channel "number" to Digital/rfchan/psip-major/psip-minor/stream-number ... e.g. Digital/23/46/2/1.

nwahec
July 13th, 2004, 08:26 PM
jackpot!

check this

phileuro wrote:
I have searched high and low and can't find any info on the tvvi file format. Is there an actual spec? I know it is from TitanTV, but I can't find any technical info on their site either!


It's a simple xml file:
<tv-program-info version="1.0">
<program>
<station>stationname</station>
<tv-mode>cable</tv-mode>
<program-title>title</program-title>
<start-date>20040705</start-date>
<start-time>05:00</star-time>
<end-date>20040705</end-date>
<end-time>05:30</end-time>
<duration>00:30</duration>
<rf-channel>channel</rf-channel>
</program>
</tv-program-info>

I think you may include other data as well, but that's the minimum as I understand it.
I included sample values for the times/dates to demonstrate the format.
tvvi is the extension to use to VIEW
tvpi is the extension to use to PROGRAM

Hope this helps

from here:
http://myhtpc.net/forum/viewtopic.php?t=10703&highlight=tvvi+tvpi

Promixis
July 13th, 2004, 09:06 PM
I have also looked through several sources. I am guessing that at one time the format was simple xml but there are now encrypting the file (I downloaded one and it isn't an xml file)...

nwahec
July 16th, 2004, 08:05 PM
I emailed titan tv directly to ask for a spec for their tvvi and tvpi files. the response i got follows:

Thank you for your interest in TitanTV. TitanTV is the definite source for
knowing what's on TV now and in the future. TitanTV has also set the
standard for interactive EPGs allowing members to interact with features
such as our Watch Now, PVR scheduling, Remote scheduling and Burn to DVD.
With that said we stand ready to support any viable TV tuner or PVR product.
To become a TitanTV Partner, we have a standard license agreement along with
marketing and technical guidelines. To aid the approval process, please
complete the attached Partner Questionnaire. Once completed please submit
via email back to me. Upon receipt I will send the license agreement and
guidelines for you and your team to review and approve.

Best regards,
Deb

Deb Rolfes
Lady Titan
Decisionmark Corp.


I filled out the short questionairre but i'm not sure i will qualify to get thier spec. If i get it i will post here. I'll post the questionairre below just for info.

TitanTV Partner Questionnaire page 1 of 1

In an effort to aid the process of becoming a TitanTV Partner, please fill out this form to the best of your abilities. The detailed information provided will help speed the application process.
Company Information

Full Company Name:
Company Address:

Main Contact:
Phone:
Public: Private:

Product Information

Product Name:
(List all that are seeking EPG support)

Hardware: Software:

Product Spec:
(PDF versions can be submitted.)

Price:

Units Sold: Projected Volumes:

Distribution Channel:

Retailers:

International Offerings:

Additional EPG Support:

Future Product Releases:

Customer Support

Support Email:

Support FAQs:

nwahec
November 6th, 2005, 09:00 AM
Hi all,

I'd still like to do this. Checking back in to see if anyone has an idea how to use .tvvi files to trigger events in girder.

Thanks,
chris

rbmcgee
August 21st, 2007, 08:43 AM
Bump this for any updates.