Commit f2937af9 authored by Klaus Schmidinger's avatar Klaus Schmidinger

Version 0.71

- Fixed 'Transfer Mode' in cases where a non-primary interface was switched to
  a channel that only the primary interface can receive (which could happen in
  the EPG scanner).
- The EPG scanner now starts with the first channel (it used to start with the
  second channel).
- Reacitvated setting the PNR.
- Adapted the frame scanning to the new muxing of the driver.
- The new compile time option REMOTE=NONE can be used to compile VDR without
  any remote control support (for applications where it shall be controlled
  exclusively via SVDRP).
- The new command line option -D can be used to define which DVB interfaces
  a certain instance of VDR shall use.
- The "Left" and "Right" keys are now used to page up and down in lists (thanks
  to Martin Hammerschmid). Since the "Timers" menu already uses these keys to
  (de)activate timers, this functionality is not available there.
- The "Main" and "Commands" menu now support "hotkeys", which means that if the
  first non-blank character of a menu item is a digit in the range 1..9, that
  item can be selected by pressing the respective numeric key on the remote
  control.
- The channel data in 'channels.conf' now contains the teletext PID (thanks to
  Dave Chapman). Existing files will be read normally (and the teletext PID set
  to 0), but once they are written back (due to some channel editing) the file
  will have the new format.
- The EPG scanner now scans each transponder only once per cycle.
- Deleted recordings are now automatically removed from disk after a while (not
  only when disk space is being needed for a new recording).
- Fixed repeat function in LIRC remote control.
- Changed the MAXDVBAPI macro in dvbapi.c to 4 in order to directly support the
  maximum possible number of DVB cards.
- The 'Ca' parameter in the default 'channels.conf' has been changed from '2'
  to '3' because the VDR prototype now has 3 DVB cards (and currently the CAM
  module only works if it is inserted into the last DVB card).
- The "Now", "Next" and "Schedule" menus now remember the current channel and
  restore the list when switching between them.
- The "Green" button in the "Recordings" menu can now be used to rewind a
  recording and play it from the very beginning.
- Fixed handling ':' in timer filenames and '\n' in timer summaries (see FORMATS).
- When removing recordings empty directories are now removed from the video
  directory.
- Added the "schnitt" tools from Matthias Schniedermeyer.
- New SVDRP command MESG to display a short message on the OSD.
- The Perl script 'svdrpsend.pl' can be used to send SVDRP commands to VDR.
- SVDRP can now immediately reuse the same port if VDR is restarted.
- SVDRP now has a timeout after which the connection is automatically closed
  (default is 300 seconds, can be changed in "Setup").
- The compile time switch VFAT can be used to make VDR avoid the ':' character
  in file names (VFAT can't handle them). Do 'make VFAT=1' to enable this.
- Support for DVB-C (thanks to Hans-Peter Raschke and Peter Hofmann).
  See the INSTALL file for more information about the use of VDR with cable.
- Fixed an occasional segfault in the EIT processor.
- A value of '0' for the EPGScanTimeout setup parameter now completely turns off
  scanning for EPG data on both single and multiple card systems.
- New setup parameter "PrimaryLimit" that allows to prevent timers from using the
  primary DVB interface in multi card systems. Default value is 0, which means
  that every timer may use the primary interface.
- The 'active' field of a timer will now be explicitly set to '1' if the user
  modifies an active timer (see FORMATS for details).
- The new command line option -w can be used to activate a watchdog that makes
  VDR exit in case the main program loop does not respond for more than the
  given number of seconds. This is mainly useful in combination with the new
  'runvdr' script that restarts VDR in case is has exited.
parent 3fe3c15d
Video Disk Recorder - Known Bugs
--------------------------------
* Sometimes the picture "jumps" as if a frame is skipped.
Presumably this is a problem in the card driver or firmware?
* The pictures captured with the GRAB command in SVDRP
appear to be too dark.
......@@ -34,18 +34,29 @@ Niels de Carpentier <niels@casema.net>
Martin Hammerschmid <martin@hammerschmid.com>
for suggesting to display the direct channel select input on the OSD
for suggesting to use the "Blue" button in the main menu to resume replay
for implementing pege up/down with the "Left" and "Right" keys
Bastian Guse <bastian@nocopy.de>
for writing the FORMATS entry for timers.conf
Matthias Schniedermeyer <ms@citd.de>
for implementing the 'MarkInstantRecord' setup option.
for implementing the 'MarkInstantRecord' setup option
for his "schnitt" tools
Miha Setina <mihasetina@softhome.net>
for translating the OSD texts to the Slovenian language.
for translating the OSD texts to the Slovenian language
Alberto Carraro <bertocar@tin.it>
for translating the OSD texts to the Italian language.
for translating the OSD texts to the Italian language
Deti Fliegl <deti@fliegl.de>
for implementing the 'CurrentChannel' setup parameter.
for implementing the 'CurrentChannel' setup parameter
Dave Chapman <dave@dchapman.com>
for implementing support for the teletext PID
Hans-Peter Raschke <Hans-Peter.Raschke@Wintermann-DatenService.de>
for his support in adapting VDR to DVB-C
Peter Hofmann <software@pxh.de>
for his support in adapting VDR to DVB-C
......@@ -13,7 +13,7 @@ Video Disk Recorder File Formats
A "channel definition" is a line with channel data, where the fields
are separated by ':' characters:
Example: "RTL:12188:h:1:27500:163:104:0:12003"
Example: "RTL:12188:h:1:27500:163:104:0:0:12003"
The fields in a channel definition have the following meaning (from left
to right):
......@@ -21,15 +21,19 @@ Video Disk Recorder File Formats
- Name: the channel's name (if the name originally contains a ':' character
it has to be replaced by '|')
- Frequency in MHz (as an integer)
- Polarization (one of 'h', 'H', 'v', 'V')
- Diseqc number
- Polarization (one of 'h', 'H', 'v', 'V') **
- Diseqc number **
- Symbol rate
- Video PID
- Audio PID
- Teletext PID
- Conditional Access (0 = Free To Air, 1 = can be decrypted by the first
DVB card, 2 = can be decrypted by the second DVB card)
- Program Number
Fields marked with ** are only meaningful for DVB-S (satellite) receivers.
DVB-C receivers simply ignore these.
* timers.conf
This file contains the timer setup.
......@@ -37,7 +41,10 @@ Video Disk Recorder File Formats
The fields in a timer definition have the following meaning (from left
to right):
- Timer active (0 = inaactive, 1 = active)
- Timer active (0 = inactive, 1 = active)
Values larger than '1' can be used by external programs to mark active timers
and recognize if the user has modified them. When a user modifes an active
timer the 'active' field will be explicitly set to '1'.
- Program number of the channel to record
- Day of recording, either one or more of
M------ = Monday
......@@ -55,8 +62,10 @@ Video Disk Recorder File Formats
- End time (first two digits for the hour, second two digits for the minutes)
- Priority (from 00 to 99, 00 = lowest prioity, 99 = highest priority)
- Guaranteed lifetime of recording (in days)
- Name of timer (will be used to name the recording)
- Summary
- Name of timer (will be used to name the recording); if the name contains
any ':' characters, these have to be replaced with '|'
- Summary (any newline characters in the summary have to be replaced with '|';
the summary may contain ':' characters)
* setup.conf
......@@ -86,9 +95,13 @@ Video Disk Recorder File Formats
Examples:
Check for new mail: /usr/local/bin/checkmail 2>&1
CPU status : /usr/loval/bin/cpustatus 2>&1
Disk space : df -h | grep '/video' | awk '{ print 100 - $5 "% free"; }'
1 Check for new mail: /usr/local/bin/checkmail 2>&1
2 CPU status : /usr/loval/bin/cpustatus 2>&1
3 Disk space : df -h | grep '/video' | awk '{ print 100 - $5 "% free"; }'
If the first non-blank character of the 'title' is a digit in the range
1..9, the command can be selected directly by pressing the respective numerical
key on the remote control.
* marks.vdr
......
......@@ -349,3 +349,67 @@ Video Disk Recorder Revision History
- The EIT scanning thread is now locked when switching channels to avoid problems.
- Encrypted channels can now be selected even without knowing the PNR (however, it
is still necessary for the EPG info).
2001-02-24: Version 0.71
- Fixed 'Transfer Mode' in cases where a non-primary interface was switched to
a channel that only the primary interface can receive (which could happen in
the EPG scanner).
- The EPG scanner now starts with the first channel (it used to start with the
second channel).
- Reacitvated setting the PNR.
- Adapted the frame scanning to the new muxing of the driver.
- The new compile time option REMOTE=NONE can be used to compile VDR without
any remote control support (for applications where it shall be controlled
exclusively via SVDRP).
- The new command line option -D can be used to define which DVB interfaces
a certain instance of VDR shall use.
- The "Left" and "Right" keys are now used to page up and down in lists (thanks
to Martin Hammerschmid). Since the "Timers" menu already uses these keys to
(de)activate timers, this functionality is not available there.
- The "Main" and "Commands" menu now support "hotkeys", which means that if the
first non-blank character of a menu item is a digit in the range 1..9, that
item can be selected by pressing the respective numeric key on the remote
control.
- The channel data in 'channels.conf' now contains the teletext PID (thanks to
Dave Chapman). Existing files will be read normally (and the teletext PID set
to 0), but once they are written back (due to some channel editing) the file
will have the new format.
- The EPG scanner now scans each transponder only once per cycle.
- Deleted recordings are now automatically removed from disk after a while (not
only when disk space is being needed for a new recording).
- Fixed repeat function in LIRC remote control.
- Changed the MAXDVBAPI macro in dvbapi.c to 4 in order to directly support the
maximum possible number of DVB cards.
- The 'Ca' parameter in the default 'channels.conf' has been changed from '2'
to '3' because the VDR prototype now has 3 DVB cards (and currently the CAM
module only works if it is inserted into the last DVB card).
- The "Now", "Next" and "Schedule" menus now remember the current channel and
restore the list when switching between them.
- The "Green" button in the "Recordings" menu can now be used to rewind a
recording and play it from the very beginning.
- Fixed handling ':' in timer filenames and '\n' in timer summaries (see FORMATS).
- When removing recordings empty directories are now removed from the video
directory.
- Added the "schnitt" tools from Matthias Schniedermeyer.
- New SVDRP command MESG to display a short message on the OSD.
- The Perl script 'svdrpsend.pl' can be used to send SVDRP commands to VDR.
- SVDRP can now immediately reuse the same port if VDR is restarted.
- SVDRP now has a timeout after which the connection is automatically closed
(default is 300 seconds, can be changed in "Setup").
- The compile time switch VFAT can be used to make VDR avoid the ':' character
in file names (VFAT can't handle them). Do 'make VFAT=1' to enable this.
- Support for DVB-C (thanks to Hans-Peter Raschke and Peter Hofmann).
See the INSTALL file for more information about the use of VDR with cable.
- Fixed an occasional segfault in the EIT processor.
- A value of '0' for the EPGScanTimeout setup parameter now completely turns off
scanning for EPG data on both single and multiple card systems.
- New setup parameter "PrimaryLimit" that allows to prevent timers from using the
primary DVB interface in multi card systems. Default value is 0, which means
that every timer may use the primary interface.
- The 'active' field of a timer will now be explicitly set to '1' if the user
modifies an active timer (see FORMATS for details).
- The new command line option -w can be used to activate a watchdog that makes
VDR exit in case the main program loop does not respond for more than the
given number of seconds. This is mainly useful in combination with the new
'runvdr' script that restarts VDR in case is has exited.
......@@ -15,7 +15,7 @@ If you have the DVB driver source in a different location
you will have to change the definition of DVBDIR in the
Makefile.
This program requires the card driver version 0.8.1 or higher
This program requires the card driver version 0.8.2 or higher
to work properly. You need to load the dvb.o module *without* option
'outstream=0' (previous versions of VDR required this option to have
the driver supply the data in AV_PES format; as of version 0.70 VDR
......@@ -38,6 +38,7 @@ following values 'make' call to activate the respective control mode:
(see http://www.cadsoft.de/people/kls/vdr/remote.htm)
REMOTE=LIRC control via the "Linux Infrared Remote Control"
(see http://www.lirc.org)
REMOTE=NONE no remote control (in case only SVDRP shall be used)
Adding "DEBUG_OSD=1" will use the PC screen (or current window)
to display texts instead of the DVB card's on-screen display
......@@ -45,6 +46,13 @@ interface. These modes are useful when testing new menus if you
only have a remote connection to the VDR (which, in my case, is
located in the living room and has neither a monitor nor a keyboard).
If your video directory will be on a VFAT partition, add the compile
time switch
VFAT=1
to the 'make' command.
When running, the 'vdr' program writes status information into the
system log file (/var/log/messages). You may want to watch these
messages (tail -f /var/log/mesages) to see if there are any problems.
......@@ -63,6 +71,13 @@ If the program shall run as a daemon, use the --daemon option. This
will completely detach it from the terminal and will continue as a
background process.
Automatic restart in case of hangups:
-------------------------------------
If you run VDR using the 'runvdr' shell script it will use the built-in
watchdog timer to restart the program in case something happens that
causes a program hangup.
Command line options:
---------------------
......@@ -132,6 +147,21 @@ that the channels defined in 'channels.conf' are correct before attempting
to record anything. Channel parameters may vary and not all of the channels
listed in the default 'channels.conf' file have been verified by the author.
As a starting point you can copy the 'channels.conf' file that comes with the
VDR archive into your video directory (or into your config directory,
respectively, in case you have redirected it with the -c option).
Running VDR with DVB-C (cable):
-------------------------------
VDR automatically recognizes if the DVB card in use is a cable card.
The only things that needs to be different when using digital cable
is the 'channels.conf' file. The distribution archive contains a default
'channels.conf.cable', which cable users can rename or copy to 'channels.conf'
in order to receive cable channels. The format of this file is exactly the
same as for satellite channels (the fields containing "Polarization" and
"Diseqc" data are ignored in case of DVB-C).
Learning the remote control keys:
---------------------------------
......
......@@ -12,16 +12,16 @@ Video Disk Recorder User's Manual
Up Ch up Crsr up Crsr up Crsr up Crsr up Crsr up Play
Down Ch down Crsr down Crsr down Crsr down Crsr down Crsr down Pause
Left Prev group - - Disable Decrement - Search back
Right Next group - - Enable Increment - Search forward
Left Prev group - Page up Disable Decrement Page up Search back
Right Next group - Page down Enable Increment Page down Search forward
Ok Ch display Select Switch Edit Accept Play Progress disp.
Menu Menu on Menu off Menu off Menu off Menu off Menu off Menu on
Back - Menu off Main menu Main menu Discard Main menu Recordings menu
Red - Record Edit Edit - Play -
Green - - New New - - Skip -60s
Green - - New New - Rewind Skip -60s
Yellow - - Delete Delete - Delete Skip +60s
Blue - Resume Mark Mark - - Stop
0..9 Ch select - - - Numeric inp. - -
Blue - Resume Mark Mark - Summary Stop
0..9 Ch select - - - Numeric inp. - Editing
* Navigating through the On Screen Menus
......@@ -310,7 +310,7 @@ Video Disk Recorder User's Manual
1 = instant recordings will be marked.
LnbFrequLo = 9750 The low and high LNB frequencies (in MHz)
LnbFrequHi = 10600
LnbFrequHi = 10600 (these have no meaning for DVB-C receivers)
SetSystemTime = 0 Defines whether the system time will be set according to
the time received from the DVB data stream.
......@@ -326,7 +326,21 @@ Video Disk Recorder User's Manual
EPGScanTimeout = 5 The time (in hours) of user inactivity after which the
DVB card in a single card system starts scanning channels
to keep the EPG up-to-date.
A value of '0' turns off scanning on a single card system.
A value of '0' completely turns off scanning on both single
and multiple card systems.
SVDRPTimeout = 300 The time (in seconds) of inactivity on an open SVDRP
connection after which the connection is automatically
closed. Default is 300, a value of 0 means no timeout.
PrimaryLimit = 0 The minimum priority a timer must have to be allowed to
use the primary DVB interface, or to force another timer
with higher priority to use the primary DVB interface.
This is mainly useful for recordings that should take
place only when there is nothing else to do, but should
never keep the user from viewing stuff on the primary
interface. On systems with only one DVB card, timers
with a priority below PrimaryLimit will never execute.
* Executing system commands
......
......@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Makefile 1.18 2001/01/13 12:26:43 kls Exp $
# $Id: Makefile 1.20 2001/02/24 15:52:58 kls Exp $
DVBDIR = ../DVB
......@@ -25,6 +25,11 @@ ifdef DEBUG_OSD
DEFINES += -DDEBUG_OSD
endif
ifdef VFAT
# for people who want their video directory on a VFAT partition
DEFINES += -DVFAT
endif
all: vdr
font: genfontfile fontfix.c fontosd.c
@echo "font files created."
......@@ -75,6 +80,6 @@ genfontfile: genfontfile.o
# Housekeeping:
clean:
-rm -f $(OBJS) vdr genfontfile genfontfile.o
-rm -f $(OBJS) vdr genfontfile genfontfile.o core
CLEAN: clean
-rm -f fontfix.c fontosd.c
TODO list for the Video Disk Recorder project
---------------------------------------------
* Implement simultaneous record/replay with a single DVB card once
the card driver/firmware allows this.
* Implement channel scanning.
* Implement remaining commands in SVDRP.
Sammlung von "Hilfs"-Scripten
Diese Sammlung an "Hilfs"-Scripten habe ich mir zum scheiden und anderen
Zwecken zusammengeschrieben.
Das ganze unterliegt natuerlich der GPL.
Ich bin nicht sonderlich gut im "Dokumentieren". Also gilt die Devise
"Hilf dir selbst".
Ein paar Worte zu den "Hart"-Codierten Pfaden.
/yele/video (/video/video0)
/yelg/video (/video/video1)
Sind die 2 Pfade auf meinem DVB-Rechner
/x1/video
Ist das Verzeichniss in das die Video zum schneiden verschoben werden.
/x1/temp
/x2/temp
Sind die beim schneiden verwendeten Temporaer-Verzeichnisse
Enthalten sind folgende Scripte:
cutall -> "Master"-Script zum starten des Scheide vorgangs.
Ist ein "find" nach "cut" -Dateien
cutt -> Das "eigentliche" Schnitt-Script
Scheidet die Stuecke aus, demultipext, remultipext,
splitted die Dateien und macht am Ende ein
ISO-Image daraus
index.php -> PHP-Script zum finden der Schnitt-Punkte, mit
Testmoeglichkeit ob erfolgreich an diesem Punkt
geschnitten werden kann
mv2 -> Zum Moven der Aufnahmen von meinem DVB-Rechner
auf mein "Arbeitsrechner"
schnitt.pl -> Extraiert ein einzelnes Bild um es anzuzeigen
(Fuer index.php)
schnitt2.pl -> Gibt alles zwischen 2 Schnittpunkten auf STDOUT aus
schnitt3.pl -> Testet ob erfolgreich geschnitten werden kann.
schnitt3.pl.new -> Version fuer PES-Datenstroeme
schnitt4.pl -> "Beschleunigtes" Schnitt-Programm fuer VIVA
aufnahmen. 1 "VIDEO" pro Zeile erzeugt
"a", "b" ... Dateien
schnitt5.pl -> Gibt Datei-Nummern von einer Schnittmarke
+- 15000 Frames aus
schnitt6.pl -> Loescht alle Dateien die nicht von in einer von
schnitt5.pl abgedeckt ist. (Damit mv2 nicht so
lange braucht)
show -> Wird auf einem X-Display gestartet und zeigt das
aktuelle Bild von "schnitt.pl" an
vdr-remote.pl -> "Skeleton" um ueber SVDR-Kommandos zu schicken
vdr2 -> Start-Script
vmount -> Mounten aller zusammengehoeriger ISO-Images zum
abspielen
Hilsscripte:
------------
cut.pl -> Entspricht weitestgehend "split" aber mit
"Nummer" anstatt Buchstaben
cut2 -> Entfernt escapende Backslashes
cutall2 -> Springt ins Schnitt-Verzeichniss und ruft das
"eigentliche" Schnitt-Script auf
lmplex -> Multiplexed Datenstrome unter Zurhilfename
saemtlicher CPUs
schnittcommon.pli -> Das "Common" Script fuer schnitt?.pl
getpreviframe.pl -> Findet das vorherige I-Frame.
unsort -> Macht das Gegenteil von sort.
Die ganze "Schnittloesung" ist leider etwas "unbrauchbar", weil ich aus
Unachtsamkeit leider die gepatchten Sourcen von 2 wichtigen Programm
geloescht habe.
dumpfrage -> Extraiert das erste Frage in eine Datei zum
anzeigen (gepatchtes dump aus "libmpeg3"
pvademux -> gepatcht um eine Pfad-Angabe
Entweder macht jemand/ich patchen "nochmal" oder ich kann auch die
Binaries zur Verfuegung stellen.
#!/usr/bin/perl -w
use strict;
my $maxsize = 660 * 1024 * 1024;
my $read = 1024*1024;
my $size = 1024*1024;
my $filenum = "1";
my $count = 0;
my ($fi,$data);
$fi = sprintf ("part%d",$filenum);
open (FI,">$fi");
while ($read == $size)
{
if ($count < $maxsize)
{
$read = read (STDIN,$data,$size);
print FI $data;
$count += $size;
$a = $count /1024/1024;
if ($a % 10 == 0) {
print STDERR "File: $filenum Size: ${a}MB\n";
}
}
else
{
close (FI);
$filenum++;
$fi = sprintf ("part%d",$filenum);
open (FI,">$fi");
$count = 0;
}
}
close FI;
#!/bin/sh
cat cut | head -n 1 | tr -d [\\\\]
#!/bin/sh
cutdir=/x1/video/
find $cutdir -name "cut" -exec cutall2 {} \;
#!/bin/sh
a=`echo $1 | cut -d / -f1-5`
cd $a
cutt
mv cut cut.bak
#!/bin/sh
DIRA=/x2/temp
DIRB=/x1/temp
if [ -f cut ]; then
name="`cut2`"
echo $name
count=`cat cut | wc -l`
let count=count-1
let test=count%2
if [ "$test" == "1" ]; then
echo Ungerade Anzahl von Markierungen
exit 1
fi
file=1
while [ "$count" != "0" ]
do
start=`cat cut | tail -n $count | head -n 1`
let count=count-1
end=`cat cut | tail -n $count | head -n 1`
let count=count-1
echo Cutting\&Demuxing from $start to $end
schnitt2.pl $start $end | pvademux $DIRA teil$file
# schnitt2.pl $start $end | pes2av_pes | pvademux $DIRA teil$file
let file=file+1
done
else
echo Keine Beschreibungsdatei
exit 1
fi
# Ab hier mkimg
sync
lmplex $DIRA $DIRB `ls -la $DIRA/teil*.m2v | cut -b 30- | sort -n -r | cut -d / -f4`
echo Multiplexing DONE
rm -f $DIRA/teil*.m2v $DIRA/teil*.mp2
sync
if [ -f $DIRB/teil1.mpg ]; then
echo Splitting
cd $DIRA
# cat $DIRB/teil*.mpg | split -b 723517440
cat $DIRB/teil*.mpg | cut.pl
rm $DIRB/teil*
fi
sync
cd $DIRA
if [ -f part2 ]; then
count=1
cond=0
while [ "$cond" != "1" ]
do
mkdir a
mv "part$count" "a/${name} Teil $count"
echo mkisofs Teil $count
mkisofs -r -o $DIRB/image1.raw a
rm -rf a
mv -- $DIRB/image1.raw "$DIRB/${name} Teil $count"
sync
let count=count+1
if [ ! -f "part$count" ]; then
cond=1
fi
done
else
mkdir a
mv part1 "a/${name}"
echo mkisofs
mkisofs -r -o $DIRB/image1.raw a
rm -rf a
mv -- $DIRB/image1.raw "$DIRB/${name}"
fi
#!/usr/bin/perl
use strict;
my ($index, $oindex);
require "/usr/local/bin/my/schnittcommon.pli";
if (!open (INDEX,"index.vdr"))
{
exit 1;
}
$index = $oindex = $ARGV[0];
if ($index > 0)
{
&prevI;
if ($oindex != $index)
{
print "$index\n";
}
else
{
print "$oindex\n";
}
}
else
{
print "0\n";
}
<html>
<head>
<title>Schneiden</title>
</head>
<body bgcolor=#C0C0C0>
<?
if ($level == 0)
{
$dircount=0;
$handle=opendir('/x1/video');
while ($file = readdir($handle)) {
if ($file != "." && $file != ".." && $file != "epg.data") {
$dir=$file;
$dircount++;
}
}
if ($dircount == 1) {
$level=1;
}
else
{
?>
<center><h1>Sender</h1></center>
<form action="index.php" method="post">
<input type=hidden name=level value="1">
<?
$handle=opendir('/x1/video');
while ($file = readdir($handle)) {
if ($file != "." && $file != ".." && $file != "epg.data") {
echo "<input type=submit name=dir value=\"$file\">\n";
}
}
closedir($handle);
?>
</form>
<?
}
}
if ($level == 1)
{
$dircount=0;
$handle=opendir("/x1/video/$dir");
while ($file = readdir($handle)) {
if ($file != "." && $file != "..") {
$dira="$dir/$file";
$dircount++;
}
}
if ($dircount == 1) {
$dir = $dira;
$level = 2;
}
else
{
?>
<form action="index.php" method="post">
<input type=hidden name=level value="2">
<?
echo "<center><h1>Filme/Serien fuer den Sender $dir</h1></center>";
$handle=opendir("/x1/video/$dir");
while ($file = readdir($handle)) {
if ($file != "." && $file != "..") {
echo "<input type=submit name=dir value=\"$dir/$file\"><br>\n";
}
}
closedir($handle);
?>
</form>
<?
}
}
if ($level == 2)
{
if ($aindex)
$index = $aindex;
else if (!$index)
$index = 0;
if ($dir)
chdir ("/x1/video/$dir");
switch ($cindex) {
case "-10000":
if ($index >=10000)
$index -= 10000;
break;
case "-4000":
if ($index >=4000)
$index -= 4000;
break;
case "-2000":
if ($index >=2000)
$index -= 2000;
break;
case "-1000":
if ($index >=1000)
$index -= 1000;
break;
case "-500":
if ($index >=500)
$index -= 500;
break;
case "-100":
if ($index >=100)
$index -= 100;
break;
case "Vorheriges I-Frame":
$pindex = $index - 1;
$fp = popen ("/usr/local/bin/my/getpreviframe.pl $pindex","r");
$i = fgets($fp,1000);
$index = chop ($i);
pclose ($fp);
break;
case "Naechstes I-Frame":
$index ++;
break;
case "+100":
$index += 100;
break;
case "+500":
$index += 500;
break;
case "+1000":
$index += 1000;
break;
case "+2000":
$index += 2000;
break;
case "+4000":
$index += 4000;
break;
case "+10000":
$index += 10000;
break;
}
if ($test)
{
$fp = popen ("/usr/local/bin/my/schnitt3.pl $index","r");
$i = fgets($fp,1000);
pclose ($fp);
$index = chop ($i);
}
if ($name)
{
$fp = fopen ("cut","w");
fputs ($fp,"$name\n");
fclose ($fp);
}