Commit f1d1c984 authored by Klaus Schmidinger's avatar Klaus Schmidinger

Version 0.90

- Modified the display of the channel group separators (thanks to Markus Lang
  for this suggestion).
- Added support for replaying DVDs (thanks to Andreas Schultz). See INSTALL for
  instructions on how to compile VDR with DVD support.
- Fixed replay progress display in case replay is paused while watching an
  ongoing recording.
- Ringbuffer uses semaphores to signal empty/full conditions.
- Fixed calculating the timeout value in cFile::FileReady() (thanks to
  Wolfgang Henselmann-Weiss).
parent 8f9cc68f
......@@ -106,3 +106,13 @@ Ulrich R
Helmut Schächner <schaechner@yahoo.com>
for his support in keeping the Premiere World channels up to date in 'channels.conf'
Andreas Schultz <aschultz@warp10.net>
for adding support for replaying DVDs (much of this was derived from
dvdplayer-0.5 by Matjaz Thaler <matjaz.thaler@guest.arnes.si>)
Aaron Holtzman
for writing 'ac3dec'
Wolfgang Henselmann-Weiss <Wolfgang_Henselmann@betaresearch.de>
for fixing calculating the timeout value in cFile::FileReady()
......@@ -609,3 +609,15 @@ Video Disk Recorder Revision History
- Increased timeout until reporting "video data stream broken" when recording.
- Explicitly switching back to the previously active channel after ending a
replay session (to have it shown correctly in case it was in 'Transfer Mode').
2001-08-06: Version 0.90
- Modified the display of the channel group separators (thanks to Markus Lang
for this suggestion).
- Added support for replaying DVDs (thanks to Andreas Schultz). See INSTALL for
instructions on how to compile VDR with DVD support.
- Fixed replay progress display in case replay is paused while watching an
ongoing recording.
- Ringbuffer uses semaphores to signal empty/full conditions.
- Fixed calculating the timeout value in cFile::FileReady() (thanks to
Wolfgang Henselmann-Weiss).
......@@ -15,7 +15,16 @@ 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.9.0 or higher
If you want to use your DVD drive you will need to compile VDR with
make DVD=1
to activate DVD support. VDR then also needs the package 'libdvdread'
in order to replay DVDs. This package is expected to be located in the
directory ../DVD (seen from the VDR directory). Adjust the definition
of DVDDIR in the Makefile if necessary.
VDR requires the card driver version 0.9.0 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
......@@ -100,6 +109,19 @@ This program must be given to VDR with the '-a' option, as in
vdr -a ac3play
Accessing the DVD drive:
------------------------
By default VDR expects the DVD drive to be located at /dev/dvd (which
typically is a symbolic link to the actual device, for instance /dev/hdc).
You can use the '-V' option to overwrite this, as in
vdr -V /media/dvd
Note that the user id under which VDR runs needs to have write access to
the DVD device in order to replay CSS protected DVDs (which also requires
the presence of the 'libcss' library).
The video data directory:
-------------------------
......
......@@ -19,7 +19,7 @@ Video Disk Recorder User's Manual
Back - Menu off Main menu Main menu Discard Main menu Recordings menu
Red - Record Edit Edit - Play -
Green - Language New New - Rewind Skip -60s
Yellow - - Delete Delete - Delete Skip +60s
Yellow - Eject DVD Delete Delete - Delete Skip +60s
Blue - Resume Mark Mark - Summary Stop
0..9 Ch select - - - Numeric inp. - Editing
......
......@@ -4,12 +4,24 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Makefile 1.22 2001/06/02 09:15:39 kls Exp $
# $Id: Makefile 1.24 2001/08/06 16:13:42 kls Exp $
DVBDIR = ../DVB
DVDDIR = ../DVD
AC3DIR = ./ac3dec
INCLUDES = -I$(DVBDIR)/ost/include
OBJS = config.o dvbapi.o dvbosd.o eit.o font.o i18n.o interface.o menu.o osd.o\
ifdef DVD
INCLUDES += -I$(DVDDIR)/libdvdread
LIBDIRS += -L$(DVDDIR)/libdvdread/dvdread/.libs
DEFINES += -DDVDSUPPORT
DEFINES += -D_LARGEFILE64_SOURCE # needed by libdvdread
AC3LIB = $(AC3DIR)/libac3.a
DVDLIB = -ldvdread
endif
OBJS = config.o dvbapi.o dvbosd.o dvd.o eit.o font.o i18n.o interface.o menu.o osd.o\
recording.o remote.o remux.o ringbuffer.o svdrp.o thread.o tools.o vdr.o\
videodir.o
......@@ -42,29 +54,30 @@ font: genfontfile fontfix.c fontosd.c
# Dependencies:
config.o : config.c config.h dvbapi.h dvbosd.h eit.h font.h i18n.h interface.h remote.h svdrp.h thread.h tools.h
dvbapi.o : dvbapi.c config.h dvbapi.h dvbosd.h eit.h font.h recording.h remux.h ringbuffer.h thread.h tools.h videodir.h
config.o : config.c config.h dvbapi.h dvbosd.h dvd.h eit.h font.h i18n.h interface.h remote.h svdrp.h thread.h tools.h
dvbapi.o : dvbapi.c config.h dvbapi.h dvbosd.h dvd.h eit.h font.h recording.h remux.h ringbuffer.h thread.h tools.h videodir.h
dvbosd.o : dvbosd.c dvbosd.h font.h tools.h
eit.o : eit.c config.h dvbapi.h dvbosd.h eit.h font.h thread.h tools.h videodir.h
dvd.o : dvd.c dvd.h
eit.o : eit.c config.h dvbapi.h dvbosd.h dvd.h eit.h font.h thread.h tools.h videodir.h
font.o : font.c font.h fontfix.c fontosd.c tools.h
i18n.o : i18n.c config.h dvbapi.h dvbosd.h eit.h font.h i18n.h thread.h tools.h
interface.o : interface.c config.h dvbapi.h dvbosd.h eit.h font.h i18n.h interface.h remote.h svdrp.h thread.h tools.h
menu.o : menu.c config.h dvbapi.h dvbosd.h eit.h font.h i18n.h interface.h menu.h osd.h recording.h remote.h svdrp.h thread.h tools.h
osd.o : osd.c config.h dvbapi.h dvbosd.h eit.h font.h i18n.h interface.h osd.h remote.h svdrp.h thread.h tools.h
recording.o : recording.c config.h dvbapi.h dvbosd.h eit.h font.h interface.h recording.h remote.h svdrp.h thread.h tools.h videodir.h
remote.o : remote.c config.h dvbapi.h dvbosd.h eit.h font.h remote.h thread.h tools.h
i18n.o : i18n.c config.h dvbapi.h dvbosd.h dvd.h eit.h font.h i18n.h thread.h tools.h
interface.o : interface.c config.h dvbapi.h dvbosd.h dvd.h eit.h font.h i18n.h interface.h remote.h svdrp.h thread.h tools.h
menu.o : menu.c config.h dvbapi.h dvbosd.h dvd.h eit.h font.h i18n.h interface.h menu.h osd.h recording.h remote.h svdrp.h thread.h tools.h
osd.o : osd.c config.h dvbapi.h dvbosd.h dvd.h eit.h font.h i18n.h interface.h osd.h remote.h svdrp.h thread.h tools.h
recording.o : recording.c config.h dvbapi.h dvbosd.h dvd.h eit.h font.h interface.h recording.h remote.h svdrp.h thread.h tools.h videodir.h
remote.o : remote.c config.h dvbapi.h dvbosd.h dvd.h eit.h font.h remote.h thread.h tools.h
remux.o : remux.c remux.h thread.h tools.h
ringbuffer.o: ringbuffer.c ringbuffer.h thread.h tools.h
svdrp.o : svdrp.c config.h dvbapi.h dvbosd.h eit.h font.h interface.h remote.h svdrp.h thread.h tools.h
svdrp.o : svdrp.c config.h dvbapi.h dvbosd.h dvd.h eit.h font.h interface.h remote.h svdrp.h thread.h tools.h
thread.o : thread.c thread.h tools.h
tools.o : tools.c tools.h
vdr.o : vdr.c config.h dvbapi.h dvbosd.h eit.h font.h i18n.h interface.h menu.h osd.h recording.h remote.h svdrp.h thread.h tools.h videodir.h
vdr.o : vdr.c config.h dvbapi.h dvbosd.h dvd.h eit.h font.h i18n.h interface.h menu.h osd.h recording.h remote.h svdrp.h thread.h tools.h videodir.h
videodir.o : videodir.c tools.h videodir.h
# The main program:
vdr: $(OBJS)
g++ -g -O2 $(OBJS) -lncurses -ljpeg -lpthread -o vdr
vdr: $(OBJS) $(AC3LIB)
g++ -g -O2 $(OBJS) -lncurses -ljpeg -lpthread $(LIBDIRS) $(DVDLIB) $(AC3LIB) -o vdr
# The font files:
......@@ -80,9 +93,15 @@ genfontfile.o: genfontfile.c
genfontfile: genfontfile.o
gcc -o $@ -L/usr/X11R6/lib $< -lX11
# The ac3dec library:
$(AC3LIB):
make -C $(AC3DIR) all
# Housekeeping:
clean:
-rm -f $(OBJS) vdr genfontfile genfontfile.o core
make -C $(AC3DIR) clean
-rm -f $(OBJS) vdr genfontfile genfontfile.o core *~
CLEAN: clean
-rm -f fontfix.c fontosd.c
Master-Timer
============
1. Einleitung
-------------
Master-Timer ist ein System zum automatischen Aufnehmen von Serien und Filmen.
2. Voraussetzungen
------------------
VDR liefert die "epg.data".
3. Konfigurationsdateien
------------------------
Alle Konfigurationsdateien liegen unter "<HOME>.master-timer"
config: Eine Ansammlung von Key-Value Paaren. Alle sind "optional" und
erhalten dann die angegebenen Default-Werte
(# = Kommentarzeilen)
marginstart (Default 600)
Anzahl der "Sicherheits" Sekunden die ein Timer frueher beginnen soll
marginstop (Default 600)
Anzahl der "Sicherheits" Sekunden die ein Timer laenger dauern soll
defaultprio (Default 50)
Die Prioritaet die fuer Timer verwendet wird wo keine Prioritaet
angegeben ist
DVBCards (Default 1)
Anzahl der vorhandenen DVB-Karten (Derzeit nicht verwendet)
Dest-Host (Default "localhost")
Host-name oder IP des Rechners auf dem VDR laeuft
Dest-Port (Default "2001")
Port der VDR verwendet
jointimers (Default 0)
Sollen aufeinanderfolgende Timer auf den gleichen Kanal zusammengefasst
werden (0 = "Nein", alles andere "Ja")
debug (Default 0)
Debug-Level, die einzelnen Debug-Werte muessen aus folgenden Werten
zusammengezaehlt werden
1 : Dump "torecord"
2 : Dump all timers
4 : Show when a timer will be deleted
8 : Dump the "Done" REs
16 : Verbose Config-Reading
deepblack: Eine Liste von Titeln die man NIEMALS NIMMER sehen will
Jede Zeile = 1 Titel
subtitle-movies: Eine Liste der "Subtitel" die ein Zeichen fuer einen Film sind
(Soweit die von den Sendern richtig ausgefuellt sind.)
Jede Zeile = 1 Subtitel
torecord: Die Sachen die man Aufnehmen will
Jede Zeile = 1 Timer
# Format: (Every field is "optional".
# [Title RE|Subtitle RE|Description RE|Channel-Name|Timeframe|Prio|Timer-Title]
#
# To record something at least one of the "Title", "Subtitle" or "Description"
# Fields has to be provided. This 3 fields are "include" and the rest are
# "exclude" fields!
#
# More than one channel definition can be provided. The delimiter is ";"
# Additionaly you can make a "blacklist" of Channels when you prepent a "!" to the first Channel Definition
# The "!" is only tested for the FIRST Channel definition.
# You can only have a white or a blacklist (Mixing doesn't make sense!)
#
# ex. Record the series "Deep Space Nine" on Sci-Fantasy in the timeframe 09:00 - 14:00
# Deep Space Nine|||Sci-Fantasy|0900-1400|99|DS9
#
# Record all "Actionfilm"s with "Schwarzenegger"
# |Actionfilm|Schwarzenegger
#
done: The titles/subtitles which are already recorded/should not be recorded
(Programmed Timers which got inserted into "done" will be deleted
automaticaly)
4. Notices
----------
- Recordings "overlapping" on the same channel, will be joined into one Timer
- Title/Subtitle/Descriptions are "fixed" for Channel that don't fill them
out "correctly" (Currently the "Bugs" from Pro-7/VOX/VIVA)
Pro7: Remove the Title from the Subtitle '<Title> / <Subtitle>'
VOX/VIVA: Subtitle is enclosed into "" and after ". " is the description
VIVA: When the Subtitle beginns with space the subtitle is moved to
description
All (except the second VIVA one) fixes are tried onto ALL Subtitles.
5. Known-Bugs
-------------
- It isn't checked if there are enough DVB-Cards
- Overlapping Timers, on the same channel, are always joined
- JOINed timers which are "done" don't get deleted automaticaly
Master-Timer (w) by Matthias Schniedermeyer (ms@citd.de)
============
1. Introduction
---------------
Master-Timer ist a system for recording Films/Series automaticaly
2. Requierements
----------------
epg.data
3. Config-Files
---------------
For all files: One Entry per Line. Each line is a "Regular Expresion"
So you can use all Perl-Style REs you want.
The RE are matched with "i" so they are case insensitive!
(Except for the "done"-list, these must match excatly!)
deepblack: Blacklist of "Titles" you NEVER EVER want to get to you eyes
subtitle-movies: A list of "Subtitles" which indicate a movie.
(For Channels that correctly fill out the Subtitle.
e.g. it won't work for *eRTL*)
torecord: The titles/subtitles/Description you want to record
done: The titles/subtitles which are already recorded/should not be recorded
(Programmed Timers which got inserted into "done" will be deleted
automaticaly)
4. Notices
----------
- Recordings "overlapping" on the same channel, will be joined into one Timer
- Title/Subtitle/Descriptions are "fixed" for Channel that don't fill them
out "correctly" (Currently the "Bugs" from Pro-7/VOX/VIVA)
Pro7: Remove the Title from the Subtitle '<Title> / <Subtitle>'
VOX/VIVA: Subtitle is enclosed into "" and after ". " is the description
VIVA: When the Subtitle beginns with space the subtitle is moved to
description
All (except the second VIVA one) fixes are tried onto ALL Subtitles.
5. Known-Bugs
-------------
- It isn't checked if there are enough DVB-Cards
- Overlapping Timers, on the same channel, are always joined
- JOINed timers which are "done" don't get deleted automaticaly
- "Intelligenter" Kanal-Scanner (z.B. nur 1 Kanal fuer ein
Sender-"Gruppe")
- Filtern nach Serie/Film
- "Komfortable" Anzeige, mit Black & Whitelisten, fuer Genres/Titeln usw.
- Unterstueztung von 1xVDR pro Karte
- Abspielen (mit automatischen "killen" des "Frontend"-VDRs) von
Aufzeichnungen
- "View"-Timer d.h. Timer der nicht Aufnimmt sondern nur den Kanal aendert
- "unwichtige" Timer "verdraengen" wenn andere Aufnahmen anstehen.
This diff is collapsed.
#!/usr/bin/perl -w
$dir = "/home/ms/.master-timer";
open (FI,"$dir/done") or die "Can't open \"done\"\n";
while (<FI>)
{
chomp;
if ($_)
{
($title,$subtitle) = split (/\|/,$_,2);
$Done{$title}{$subtitle}=1;
}
}
close (FI);
&traverse('/video');
if ($hit)
{
rename ("$dir/done","$dir/done.bak");
open (FO,">$dir/done");
foreach $title (sort keys %Done)
{
foreach $subtitle (sort keys %{%Done->{$title}})
{
print FO "$title\|$subtitle\n";
}
}
}
sub traverse
{
local($dir) = shift;
local($path);
unless (opendir(DIR, $dir))
{
warn "Can't open $dir\n";
closedir(DIR);
return;
}
foreach (readdir(DIR))
{
next if $_ eq '.' || $_ eq '..';
$path = "$dir/$_";
if (-d $path) # a directory
{
&traverse($path);
}
if ($_ eq "summary.vdr")
{
open (FI,"$path") or die "Can't open \"$path\"\n";
@lines = <FI>;
close (FI);
if ($lines[0] =~ /^Title\:\s\"(.*)\"/)
{
@titles = split (/\~/,$1);
if ($lines[2] && $lines[2] =~ /^Subtitle\:\s\"(.*)\"/)
{
@subtitles = split (/\~/,$1);
foreach $num (0 .. $#titles)
{
if ($titles[$num] && $subtitles[$num])
{
if (!$Done{$titles[$num]}{$subtitles[$num]})
{
$Done{$titles[$num]}{$subtitles[$num]}=1;
$hit = 1;
}
}
}
}
}
}
}
closedir(DIR);
}
# How Many Seconds "too early" should the timer begin
marginstart = 600
# How Many Seocnds "too long" should the timer end
marginstop = 600
# When the Prio isn't provied in the config-File use this value
defaultprio = 50
# How many DVB-Cards are installed in the Computer (Not used yet)
DVBCards = 3
# IP/Hostname:Port of the Destinations (Space is used for delimiter)
Dest-Host = localhost:2001
# Should Timers on the same channels be joined when they overlapp (0 = off)
jointimers = 1
# Debug-Level
debug = 0
Fr alle Flle Stefanie
'MAX' - Das ganze Leben!
10 vor 11
17:30 live
18:30
24 Stunden
Andreas Trck
Arabella
^BIZZ$
Big Brother
Britt - Der Talk um Eins
Brbel Schfer
Call TV
Chicago Hope - Endstation Hoffnung
Chicago Hope
DIE REDAKTION
Dauerwerbesendungen
Die Harald Schmidt Show
Die Oliver Geissen Show
Die Quiz Show
Doppelter Einsatz
Dr. Stefan Frank - Der Arzt, dem die Frauen vertrauen
EXCLUSIV
EXTRA
Ehekriege
Ein Bayer auf Rgen
Emergency Room
Explosiv - Das Magazin
GIRLSCAMP
Glcksrad
Gute Zeiten, schlechte Zeiten
Hallo, Onkel Doc!
Hans Meiser
Hercules
Hinter Gittern - Der Frauenknast
Infomercials
Jeder gegen Jeden
K1 DIE REPORTAGE
K1 Das Magazin
K1 Nachrichten
Kickers
Kochduell
Nachrichten
Nicole - Entscheidung am Nachmittag
OP ruft Dr. Bruckner
PREMIERE WORLD - Das Programm
PROSIEBEN REPORTAGE
Peter Imhof
Programm ab
Programm von
Punkt 12
Punkt 6
Punkt 9
RTL II News
RTL SHOP
RTL aktuell
RTL-Nachtjournal
SAT.1-FRHSTCKSFERNSEHEN
Spiegel TV-Reportage
UEFA Champions
fussball
fball
Vera am Mittag
Wolffs Revier
Zapping
alphateam
peep!
s.a.m.
taff.
^blitz$
SK Klsch
^Becker$
Kommissar Rex
Fit For Fun TV
Nur die Liebe zhlt
Unsere kleine Farm
Die Waltons
^Die Zwei$
^Sieben$
Alles Routine|Komödie
^Abenteuerfilm$
^Actionfilm$
^Actionkomdie$
^Actionthriller$
^Agentenfilm$
^Biografie$
^Biographie$
^Computeranimation$
^Drama$
^Episodenfilm$
^Erotikfilm$
^Familiendrama$
^Fantasy$
^Fantasykomdie$
^Gangsterfilm$
^Gerichtsfilm$
^Gesellschaftsdrama$
^Horrorfilm$
^Horrorkomdie$
^Kinderfilm$
^Komdie$
^Kriegsfilm$
^Krimikomdie$
^Kriminalfilm$
^Liebesfilm$
^Melodram$
^Melodrama$
^Musical$
^Politthriller$
^Psychothriller$
^Road Movie$
^Romanze$
^Satire$
^Science-Fiction$
^Spielfilm$
^TV Movie$
^TV-Drama$
^Thriller$
^Western$
^Zeichentrick$
^Zeichentrickkomdie$
# Format: (Every field is "optional".
# [Title RE|Subtitle RE|Description RE|Channel-Name|Timeframe|Prio|Timer-Title|Marginstart;Marginstop|VDR-Instance]
#
# To record something at least one of the "Title", "Subtitle" or "Description"
# Fields has to be provided. This 3 fields are "include" and the rest are
# "exclude" fields!
#
# More than one channel definition can be provided. The delimiter is ";"
# Additionaly you can make a "blacklist" of Channels when you prepent a "!" to the first Channel Definition
# The "!" is only tested for the FIRST Channel definition.
# You can only have a white or a blacklist (Mixing doesn't make sense!)
#
# ex. Record the series "Deep Space Nine" on Sci-Fantasy in the timeframe 09:00 - 14:00 with 60 Seconds Marginstart and -60 Seconds Marginstop
# Deep Space Nine|||Sci-Fantasy|0900-1400|99|DS9|60;-60
#
# Record all "Actionfilm"s with "Schwarzenegger"
# |Actionfilm|Schwarzenegger
#
Babylon 5|||!Pro-7||99|60;-60|1
Deep Space Nine|||||99|DS9|60;-60|2
Seven Days|||||99|
Stargate|||||99|
Futurama||||2100-2300|50|
Ally McBeal|||||99|
Snoops|||||50|
^Friends$|||||99|Friends|
Pensacola|||||50|
seaQuest|||||50|
||Paltrow|Sci Fantasy;13th Street;Star Kino;Cine Action;Cine Comedy;Romantic Movies;Studio Universal;Premiere||99|
||Aniston|||99|
Matrix
#!/bin/sh
old=`svdrpsend.pl chan | grep 250 | cut -d " " -f2`
for dat in `cat $HOME/.master-timer/channels-to-scan`
do
svdrpsend.pl "chan $dat"
sleep 30s
done
svdrpsend.pl "chan $old"
#!/usr/bin/perl
$titel = $ARGV[0];
chdir ("/x2/temp");
@files=<teil*.mpg>;
$cd = 1;
mkdir "/x2/temp/$cd";
open (FF,">/x2/temp/$cd/$titel\ CD\ $cd");
close (FF);
foreach $file (@files)
{
$size = -s $file;
$total += $size;
if ($total <= 660*1024*1024)
{
print "Moving $file\n";
system ("mv /x2/temp/$file /x2/temp/$cd/$file");
}
else
{
print "Splitting $file\n";
$file =~ s/\.mpg$//;
$total -= $size;
$size = (660*1024*1024) - $total;
$cd = `cut3.pl /x2/temp $cd $file $size \'$titel\' < $file.mpg`;
chomp $cd;
$total = 0;
@files2=</x2/temp/$cd/teil*>;
foreach $file2 (@files2)
{
$total += -s $file2;
}
print "CD: $cd Total $total\n";
unlink "$file.mpg";
}
}
#!/usr/bin/perl
$read = $size = 1024*1024;
$dir = $ARGV[0];
$subdir = $ARGV[1];
$teil = $ARGV[2];
$count1 = $ARGV[3];
$title = $ARGV[4];
$filenum = "1";
$count = 0;
open (FI,">$dir/$subdir/$teil.$filenum.mpg");
while ($read == $size)
{
if (($filenum == 1 && $count < $count1) || ($filenum > 1 && $count < 660*1024*1024))
{
$read = read (STDIN,$data,$size);
print FI $data;
$count += $size;
$a = $count /1024/1024;
}
else
{
close (FI);
$filenum++;
$subdir++;
mkdir ("$dir/$subdir");
open (FF,">$dir/$subdir/$title\ CD\ $subdir");
close (FF);
open (FI,">$dir/$subdir/$teil.$filenum.mpg");
$count = 0;
}
}
close FI;
print "$subdir\n";
#!/usr/bin/perl
open (FI,"cut") or die "Kann Cut-Datei nicht oeffnen\n";
outer: while (<FI>)
{
chomp;
if (! ($_ > 1 || $_ eq "0"))
{
open (FO,">cut2");
print FO "$_\n";
while (<FI>)
{
chomp;
if ($_ > 1 || $_ eq "0")
{
print FO "$_\n";
}
else
{
system ("cutt");
redo outer;
}
}
}
}
if ( -f "cut2")
{
system ("cutt");
unlink "cut2";
}
#include "libmpeg3.h"
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
int main(int argc, char *argv[])
{
mpeg3_t *file;
int x,y,ii,i,j,result,out;
int howmany;