Ok, it appears mplayer does something kookie and my changes to
frequencies.c didn't take effect... so I learned some python in a hurry...

Here are the changes which will make 1.4rc1 work in New Zealand... note
that this is a nasty hack and someone who actually understands this stuff
might have more luck finding out why mplayer/mencoder use different
frequency tables than tvtime does.

in src/tv/plugins/generic_record.py, inside class Recorder:

    def Record(self, rec_prog):
        # VHF Channels are out by one....
        if int(rec_prog.tunerid)<15:
                self.tmpchan=int(rec_prog.tunerid)-1
        else:
                # UHF channels are just wrong... Prime (51) is actually on 59!
                if int(rec_prog.tunerid)==51:
                        self.tmpchan=59
                else:
                        self.tmpchan=int(rec_prog.tunerid)

        cl_options = { 'channel'  : self.tmpchan,
                       'filename' : config.DIR_RECORD + '/' + rec_prog.filename,
                       'seconds'  : rec_prog.rec_duration }

        self.rec_command = config.VCR_CMD % cl_options

        self.thread.mode = 'record'
        self.thread.command = self.rec_command
        self.thread.mode_flag.set()
        print('Recorder::Record: %s' % self.rec_command)

(don't forget to rm generic_record.pyo, then restart both recordserver and
freevo so it gets recompiled!)

At long last I now have fully functional New Zealand XMLTV guide, live
viewing and recording!

On Sat, 11 Oct 2003, Matt Camp wrote:

>
> Ahh... appears the mplayer/mencoders and tvtimes channel numbering systems
> are not quite the same...
>
> (MEncoder Channel ID)+1=TVTime Channel ID.
>
> The easiest fix is probably to alter freevo to pass (channel+1) to the
> VCR_CMD, but I really don't know any Python so I've gone with the harder
> solution and modified the mplayer source :)
>
> If some lovely person who understands python can explain how to pass
> channel+1 that could be real useful.
>
>
> On Sat, 11 Oct 2003, Matt Camp wrote:
>
> >
> >
> > I've actually struck another problem... it seems that the channel list
> > that mencoder uses is somewhat different from tvtime...
> >
> > Upshot is that I can now browse the guide happily, and can watch live tv,
> > but when I try to record I get a recording of the wrong channel. (usually
> > one that doesn't actually have anything on it)
> >
> > Unsure if this is just a problem with the Debian mplayer packages from
> > marillat.free.fr or not... am about to recompile it myself and go poke
> > frequencies.c to see whats going on :)
> >
> > Will let you know what I find... (I'm using a cheap Dick Smith brand
> > saa7134 based tv tuner card (aka, a rebadged FlyVideo 3000) so can't use
> > IVTV I believe...)
> >
> > On Sat, 11 Oct 2003, Dave Smylie wrote:
> >
> > > haha - that did the trick. cheers for that. now I'm kicking myself for
> > > not thinking of doing it.
> > >
> > > Now I just need to work out to interface this thing with my sky machine
> > > =)
> > >
> > > Dave
> > >
> > > On Sun, 2003-10-12 at 01:23, Matt Camp wrote:
> > > > Nope... it didn't... although putting in the +1300's into the TV.xml did
> > > > fix it... (leave the date_format thing as it originally was)
> > > >
> > > > So I whipped up the following shell script to fetch and modify the xml...
> > > > (note that i changed my local_conf to store TV.XML in /etc/freevo instead
> > > > of /tmp since it takes a minute or two to run so I like to keep it between
> > > > reboots)
> > > >
> > > > #!/bin/sh
> > > > /usr/bin/tv_grab_nz > /tmp/TV.xml.tmp
> > > > cat /tmp/TV.xml.tmp | sed 's/\" stop/ \+1300\" stop/g' > /tmp/TV.xml.tmp2
> > > > cat /tmp/TV.xml.tmp2 | sed 's/\" channel/ \+1300\" channel/g' > 
> > > > /etc/freevo/TV.xml
> > > >
> > > >
> > > > On Sat, 11 Oct 2003, Dave Smylie wrote:
> > > >
> > > > > doh - the freevo docs didn't talk about nz listings being available so I
> > > > > assumed there weren't any.
> > > > > Still, its going now, but I'm havng the same problem - I've changed:
> > > > > secs = time.mktime(strptime.strptime(str, xmltv.date_format))
> > > > > to
> > > > > secs = time.mktime(strptime.strptime(str, xmltv.date_format_notz))
> > > > >
> > > > > but it didn't make a difference.
> > > > > Did it have any effect for you?
> > > > >
> > > > > Cheers
> > > > > Dave
> > > > >
> > > > > On Sat, 2003-10-11 at 11:35, Matt Camp wrote:
> > > > > > apt-get install xmltv on Debian/Sid.
> > > > > >
> > > > > > :)
> > > > > >
> > > > > >
> > > > > > On Fri, 10 Oct 2003, Dave Smylie wrote:
> > > > > >
> > > > > > > more importantly, where can I find tv_grab_nz? I can't find it in the
> > > > > > > 1.4r1 install. Is it just in cvs?
> > > > > > >
> > > > > > > Cheers
> > > > > > > Dave
> > > > > > >
> > > > > > > On Sat, 2003-10-11 at 01:42, Matt Camp wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I'm attempting to get the program guide working in Freevo 1.4rc1, and 
> > > > > > > > am
> > > > > > > > having a problem... that is, the guide always shows "This channel has 
> > > > > > > > no
> > > > > > > > data loaded".
> > > > > > > >
> > > > > > > > I have used tv_grab_nz to generate /tmp/TV.xml, which contains the
> > > > > > > > following: (excerpt)
> > > > > > > >
> > > > > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > > > > <!DOCTYPE tv SYSTEM "xmltv.dtd">
> > > > > > > >
> > > > > > > > <tv generator-info-name="NZ python generator">
> > > > > > > >   <channel id="tv2.nzoom.com">
> > > > > > > >     <display-name>TV2</display-name>
> > > > > > > >   </channel>
> > > > > > > >   <channel id="primetv.co.nz">
> > > > > > > >     <display-name>Prime</display-name>
> > > > > > > >   </channel>
> > > > > > > >
> > > > > > > > ....
> > > > > > > >
> > > > > > > >   <programme start="200310100110" stop="200310100310" 
> > > > > > > > channel="tv2.nzoom.com">
> > > > > > > >     <title>A Thousand Acres</title>
> > > > > > > >     <desc>A bitter-sweet drama about best friends and sisters who are
> > > > > > > > the worst rivals.</desc>
> > > > > > > >     <date>1997</date>
> > > > > > > >     <category>movie</category>
> > > > > > > >   </programme>
> > > > > > > >   <programme start="200310100310" stop="200310100440" 
> > > > > > > > channel="tv2.nzoom.com">
> > > > > > > >     <title>Bad As I Wanna Be</title>
> > > > > > > >     <sub-title>Rodman</sub-title>
> > > > > > > >     <desc>A controversial documentary that puts Chicago Bulls' 
> > > > > > > > basketballstar Dennis Rodman, who is well-known for his antics on and 
> > > > > > > > off
> > > > > > > > thecourt, in the hot spotlight. Starring: Dwayne Adway John Terry and 
> > > > > > > > Dee Wallace-Stone. D...</desc>
> > > > > > > >   </programme>
> > > > > > > > [...etc...]
> > > > > > > >
> > > > > > > > and my local_conf.py contains:
> > > > > > > >
> > > > > > > > TV_CHANNELS = [('tv2.nzoom.com', 'tv2.nzoom.com', '1'),
> > > > > > > >                 ('primetv.co.nz', 'primetv.co.nz', '2'),
> > > > > > > >                 ('tvone.nzoom.com', 'tvone.nzoom.com', '3'),
> > > > > > > >                 ('tv3.co.nz', 'tv3.co.nz', '4'),
> > > > > > > >                 ('tv4.co.nz', 'tv4.co.nz', '5')]
> > > > > > > >
> > > > > > > >
> > > > > > > > Any ideas?
> > > > > > > >
> > > > > > > > --- Matt Camp
> > > > > > > >
> > > > > > > >
> > > > > > > > -------------------------------------------------------
> > > > > > > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > > > > > > SourceForge.net hosts over 70,000 Open Source Projects.
> > > > > > > > See the people who have HELPED US provide better services:
> > > > > > > > Click here: http://sourceforge.net/supporters.php
> > > > > > > > _______________________________________________
> > > > > > > > Freevo-users mailing list
> > > > > > > > [EMAIL PROTECTED]
> > > > > > > > https://lists.sourceforge.net/lists/listinfo/freevo-users
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > -------------------------------------------------------
> > > > > > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > > > > > SourceForge.net hosts over 70,000 Open Source Projects.
> > > > > > > See the people who have HELPED US provide better services:
> > > > > > > Click here: http://sourceforge.net/supporters.php
> > > > > > > _______________________________________________
> > > > > > > Freevo-users mailing list
> > > > > > > [EMAIL PROTECTED]
> > > > > > > https://lists.sourceforge.net/lists/listinfo/freevo-users
> > > > > > >
> > > > > >
> > > > > > ---
> > > > > > Matt Camp
> > > > > >
> > > > > >
> > > > > > -------------------------------------------------------
> > > > > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > > > > SourceForge.net hosts over 70,000 Open Source Projects.
> > > > > > See the people who have HELPED US provide better services:
> > > > > > Click here: http://sourceforge.net/supporters.php
> > > > > > _______________________________________________
> > > > > > Freevo-users mailing list
> > > > > > [EMAIL PROTECTED]
> > > > > > https://lists.sourceforge.net/lists/listinfo/freevo-users
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > -------------------------------------------------------
> > > > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > > > SourceForge.net hosts over 70,000 Open Source Projects.
> > > > > See the people who have HELPED US provide better services:
> > > > > Click here: http://sourceforge.net/supporters.php
> > > > > _______________________________________________
> > > > > Freevo-users mailing list
> > > > > [EMAIL PROTECTED]
> > > > > https://lists.sourceforge.net/lists/listinfo/freevo-users
> > > > >
> > > >
> > > > ---
> > > > Matt Camp
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > > SourceForge.net hosts over 70,000 Open Source Projects.
> > > > See the people who have HELPED US provide better services:
> > > > Click here: http://sourceforge.net/supporters.php
> > > > _______________________________________________
> > > > Freevo-users mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/freevo-users
> > > >
> > > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > SourceForge.net hosts over 70,000 Open Source Projects.
> > > See the people who have HELPED US provide better services:
> > > Click here: http://sourceforge.net/supporters.php
> > > _______________________________________________
> > > Freevo-users mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/freevo-users
> > >
> >
> > ---
> > Matt Camp
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: SF.net Giveback Program.
> > SourceForge.net hosts over 70,000 Open Source Projects.
> > See the people who have HELPED US provide better services:
> > Click here: http://sourceforge.net/supporters.php
> > _______________________________________________
> > Freevo-users mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/freevo-users
> >
>
> ---
> Matt Camp
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> Freevo-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/freevo-users
>

---
Matt Camp


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Freevo-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to