vers. 0.5-1-03May2000-1 ####################### So I've just finished the Cookie-LoadConfig stuff ! PUH ! (I did my last JavaScript 2 years ago !!) But it _SHOULD_ work ;) there are still some debug-alerts in the java-scriptings but i've disabled them. If something doesn't work tellme !! Now I've got another special idea :) The Channelsfile-format of your Receiver isn't supported ? Well let's change this !! From now on i'll release some parts of the source - NO I WON'T RELEASE the COMPLETE SOURCE ! I did the cgi for DXAndy only and he doesn't want to find it on any other webservers ! The script is done in PERL ! So if you code something useful do it in PERL otherwise i can't use it ! So here some descriptions: I use the following internal format for computing the list: $c[18], # channel name $c[3], # frequency $c[4], # symbol rate $fec[$c[5]], # FEC flag $c[6], # BW ($c[7] ? "V" : "H"), # polarity &hex4(9), # video PID &hex4(10), # audio PID &hex4(2), # PMT PID &hex4(11), # PCR PID &hex4(16), # teletext PID &hex4(13), # PMC &hex4(12), # scrambling flags (($c[14] & 3) == 3 ? "NTSC" : "PAL"), # video mode substr( "NVLR", $c[14] >> 6, 1 ), # audio mode ($c[14] & 0x10 ? "12v" : "0v"), # 12v setting $c[8] & 0x03, # DiSEqC $spec[($c[8] >> 2) & 3], # spec. inv. &hex2(15), # service type &hex4(17), # transport stream ID &hex4(1), # service ID &hex4(22), # network ID ASTRA 19,2ĝOst Das Erste 11837 27500 3/4 30 H 0065 0066 0064 0065 1FFF 0005 0000 PAL N 0v 0 Auto 01 4D04 6DCA 0001 the service-types for every channel/marker are stored in an extra array: @services so here the input and output filter for binary dvbedit format: # conversion definitions @fec = ("AUT", "1/1", "1/2", "2/3", "3/4", "???", "5/6", "7/8"); @spec = ("Auto", "Off", "On", "???"); $chan_fmt = "a4 n4 C4 n3vn C2 nv a20 a8 C2 n"; %fec = ( "AUT" => 0, "1/1" => 1, "1/2" => 2, "2/3" => 3, "3/4" => 4, "???" => 5, "5/6" => 6, "7/8" => 7 ); %spec = ( "Auto" => 0, "Off" => 1, "On" => 2, "???" => 3 ); # DVBEdit bin format # 0 char szFlag[4]; // always DVSO 0-3 # 1 unsigned short usChannelID; // channel ID 4-5 # 2 unsigned short usPMTPID; // PMT PID 6-7 # 3 unsigned short usFreq; // frequency 8-9 # 4 unsigned short usSR; // symbol rate a-b # 5 unsigned char ucFEC; // FEC flag c # 6 unsigned char ucAcqBW; // Aquisition bandwidth d # 7 unsigned char ucPolarity; // polarity e # 8 unsigned char ucDiseqc; // diseqc mode f # 9 unsigned short usVPID; // video PID 10-11 # 10 unsigned short usAPID; // audio PID 12-13 # 11 unsigned short usPCRPID; // PCR PID 14-15 # 12 unsigned short usFlags; // scrambling flags 16-17 # 13 unsigned short usPMC; // PMC for CA 18-19 # 14 unsigned char ucVideo; // video/audio mode 1a # 15 unsigned char ucServiceType; // service type 1b # 16 unsigned short usTPID; // teletext PID 1c-1d # 17 unsigned short usTSID; // Transport stream ID 1e-1f # 18 unsigned char szName[20]; // channel name 20-33 # 19 unsigned char szReserved3[8]; // reserved 34-3b # 20 unsigned char link; // channel link ? 3c # 21 unsigned char unknown; // unknown 3d # 22 unsigned short usNetworkID; // Network ID 3e-3f sub hex2 { sprintf "%02X", $c[$_[0]]; } sub hex4 { sprintf "%04X", $c[$_[0]]; } sub read_bin { my @ret; open(BINC,"$_[0]") or error("Couldn't read channels-file ($_[0])"); while ( read( BINC, $chan, 64 ) == 64 ) { @c = unpack $chan_fmt, $chan; error("Error in channels-file ($_[0])") if $c[0] ne "DVSO"; $c[18] =~ s/\x86/[/g; $c[18] =~ s/\x87/]/g; $c[18] =~ s/\x00.*//; push(@services,hex2(15)); if ( $c[3] == 0 ) { push(@ret,sprintf("%-20s\n",$c[18])); } else { $^A = ""; formline('@<<<<<<<<<<<<<<<<<<< @#### @#### @<< @# @ @>>> @>>> @>>> @>>> @>>> @>>> @>>> @<<< @ @<< @ @<<< @< @>>> @>>> @>>>', $c[18], # channel name $c[3], # frequency $c[4], # symbol rate $fec[$c[5]], # FEC flag $c[6], # BW ($c[7] ? "V" : "H"), # polarity &hex4(9), # video PID &hex4(10), # audio PID &hex4(2), # PMT PID &hex4(11), # PCR PID &hex4(16), # teletext PID &hex4(13), # PMC &hex4(12), # scrambling flags (($c[14] & 3) == 3 ? "NTSC" : "PAL"), # video mode substr( "NVLR", $c[14] >> 6, 1 ), # audio mode ($c[14] & 0x10 ? "12v" : "0v"), # 12v setting $c[8] & 0x03, # DiSEqC $spec[($c[8] >> 2) & 3], # spec. inv. &hex2(15), # service type &hex4(17), # transport stream ID &hex4(1), # service ID &hex4(22), # network ID ); push(@ret,$^A); } } return @ret; } sub save_bin { my $scount=0; print "Content-type: DVB2000/channels-bin\n"; print "Content-Disposition: attachment; filename=channels.dvb\n\n"; binmode(STDOUT); foreach(@mylist) { next if /^$/; $def_vpid = "0"; $chanlink = 0; s/^(.{1,20})//; $name = $1; $name =~ s/\s+$//; $name =~ s/\[/\x86/g; $name =~ s/\]/\x87/g; $_ = "0 0 AUT 0 H $def_vpid 0 0 0 0 0 0 PAL N 0v 0 Auto $def_servid 0 0 0" if $_ eq ""; @f = split; $_=$name; # dirty trick too - not used any longer # if (/^-/) { # $f[17]=01; # } # elsif (/^\*/) { # $f[17]=02; # } $f[17]=$services[$scount]; @c =("DVSO", hex $f[19], # service id hex $f[7], # PMT PID $f[0], # frequency $f[1], # SR $fec{$f[2]}, # FEC $f[3], # BW $f[4] eq "V", # polarity ($spec{$f[16]} << 2) # spec. | $f[15], # DiSEqC hex $f[5], # video PID hex $f[6], # audio PID hex $f[8], # PCR PID hex $f[11], # scrambling flags hex $f[10], # PCM 3 * ($f[12] ne "PAL") # video mode | index("NVLR", $f[13]) << 6 # audio mode | ($f[14] eq "12v") << 4, # 12v hex $f[17], # service type hex $f[9], # teletext PID hex $f[18], # transport stream ID $name, # channel name "", # reserved $chanlink, 0, hex $f[20], # NID ); $c = pack $chan_fmt, @c; print substr($c,0,64); #syswrite( STDOUT, $c, 64 ); $scount++; } flush(STDOUT); } most of those conversion-functions are adapted from the mmtools for linux: http://web.inter.nl.net/users/dick.streefland/mmtools/ So if you want a format to be included in the script code it yourself or mail me a EXACT!! description of the format you use ! If there are enough requests for this format to be included in the script I will see if i have some time left to include it ;)