Airrec
From M1Research
(Difference between revisions)
(→Hardware requirements) |
(→Build/Install/Configure) |
||
(15 intermediate revisions not shown) | |||
Line 4: | Line 4: | ||
Software complex consists of two parts | Software complex consists of two parts | ||
- | *1. PVR - video recorder | + | *1. PVR - video recorder, video preview and audio level monitoring, rotating recorded video (delete older parts to keep spool size in fixed size). |
*2. web-oriented application for DVD building. | *2. web-oriented application for DVD building. | ||
Line 12: | Line 12: | ||
Recorder MPEG-2 stream saved to hard disk, the large disk space - the more video could be saved. :-)) | Recorder MPEG-2 stream saved to hard disk, the large disk space - the more video could be saved. :-)) | ||
+ | |||
+ | [http://www.directfb.org DirectFB] is used for GUI. | ||
+ | |||
+ | ==Downloads== | ||
+ | |||
+ | Current version 1.0 (-r42): | ||
+ | * [{{SERVER}}/downloads/airrec/airrec-1.0-r42.tar.bz2 airrec-1.0-r42.tar.bz2] - source code | ||
+ | |||
+ | ==Build== | ||
+ | *1. Download source code from link above and unpack. | ||
+ | <pre>cd /usr/local/src | ||
+ | wget http://research.m1stereo.tv/downloads/airrec/airrec-1.0-r42.tar.bz2 | ||
+ | bzip2 -cd airrec-1.0-r42.tar.bz2 | tar xvf - </pre> | ||
+ | *2. Make sure that installed additional packets: | ||
+ | **DirectFB-devel | ||
+ | **sqlite-devel-3.1.2-3 | ||
+ | *3. Go to source code dir and compile | ||
+ | <pre>cd airrec | ||
+ | cd src | ||
+ | make</pre> | ||
+ | If DirectFB was installed from rpm you need fix <code>INCLUDES</code> variable in <code>Makefile</code>. | ||
+ | ==Install== | ||
+ | *1. Directory structure preparation: | ||
+ | **<code>/opt/airrec</code> - programs and scripts dir. | ||
+ | **<code>/var/spool/airrec/live</code> - directory for db file and live streams. | ||
+ | **<code>/var/spool/airrec/live/ch0</code> - directory for saving MPEG-2 fragments for channel 0. | ||
+ | **<code>/var/spool/airrec/dvd/master</code> - built dvd storage | ||
+ | **<code>/var/spool/airrec/dvd/temp</code> - temparatiry storage for dvd building. | ||
+ | *2. Copying files: | ||
+ | <pre>#main executable | ||
+ | cp /usr/local/src/airrec/src/airrec /opt/airrec | ||
+ | |||
+ | # database file for storing info about fragments | ||
+ | cp /usr/local/src/airrec/src/airrec.db /var/spool/airrec/live | ||
+ | |||
+ | # mpeg coder setup scripts and srt file making scripts | ||
+ | cp /usr/local/src/airrec/scripts/airrec_srt_creator.pl /opt/airrec | ||
+ | cp /usr/local/src/airrec/scripts/airrec_srt_watcher.sh /opt/airrec | ||
+ | cp /usr/local/src/airrec/scripts/ivtv.setup.CODEC.sh /opt/airrec | ||
+ | cp /usr/local/src/airrec/scripts/ivtv.setup.INPUT.sh /opt/airrec</pre> | ||
+ | |||
+ | ==Configure== | ||
+ | *1. Configuration file for recorder (sample, 1 channel, 2x80GB stripe for video storing): | ||
+ | <pre>db-file=/var/spool/airrec/live/airrec.db | ||
+ | use-channel=0 | ||
+ | ident="M1 [main]" | ||
+ | dev-pcm=/dev/video24 | ||
+ | dev-yuv=/dev/video32 | ||
+ | dev-mpeg=/dev/video0 | ||
+ | spool=/var/spool/airrec/live/ch0 | ||
+ | spool-limit=140000 | ||
+ | #noflip | ||
+ | vsync=25 | ||
+ | syslog=6</pre> | ||
+ | Some parameters explanations: | ||
+ | **<code>db-file=<filename></code> - <i>database file name for storin info about fragments</i> | ||
+ | **<code>fb-mode=<mode str></code> - <i>Setup FrameBuffer mode ( default "1024,768,32")</i> | ||
+ | **<code>use-channel=<N> </code> - <i>Activate channel N and apply further options to that channel</i> | ||
+ | **<code>ident=<N> </code> - <i>Channel ident</i> | ||
+ | **<code>dev-pcm=<filename></code> | ||
+ | **<code>dev-yuv=<filename></code> | ||
+ | **<code>dev-mpeg=<filename></code> | ||
+ | **<code>spool=<PATH> </code> - <i>Location where mpg file stored</i> | ||
+ | **<code>spool-limit=<N> </code> - <i>Limit stored spool to <N> Megabytes</i> | ||
+ | **<code>vsync=<N> </code> - <i>Try to redraw screen at <N> fps.</i> | ||
+ | **<code>noflip </code> - <i>Disable surface flipping mode.</i> | ||
+ | **<code>config=<filename> </code> - <i>Use config file.</i> | ||
+ | **<code>syslog=<N> </code> - <i>Use LOG_LOCAL<N> facility for syslogging.</i> | ||
+ | |||
+ | *2. Running recorder preparation: | ||
+ | **1. <code>/etc/crontab</code> (rotating and srt's creating/cleanup): | ||
+ | <pre>-- skipped -- | ||
+ | 0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /usr/bin/killall -HUP airrec | ||
+ | 0,20,40 * * * * root /opt/airrec/airrec_srt_watcher.sh | ||
+ | --skipped--</pre> | ||
+ | **2. <code>/etc/modprobe.conf</code>: | ||
+ | <pre>-- skipped -- | ||
+ | alias char-major-81 videodev | ||
+ | alias char-major-81-0 ivtv | ||
+ | options ivtv pal=D cardtype=15 | ||
+ | #options i810fb vram=8 xres=1024 bpp=32 yres=768 hsync1=30 hsync2=55 vsync1=55 vsync2=72 accel mtrr | ||
+ | --skipped--</pre> | ||
+ | **3. <code>/etc/rc.d/rc.local</code> (init matrox's module / codes setup): | ||
+ | <pre>-- skipped -- | ||
+ | # setup new io scheduler | ||
+ | echo -n "cfq" > /sys/block/hda/queue/scheduler | ||
+ | echo -n "cfq" > /sys/block/hdc/queue/scheduler | ||
+ | echo -n "cfq" > /sys/block/hdd/queue/scheduler | ||
+ | |||
+ | # airrec init | ||
+ | /sbin/modprobe drm | ||
+ | /sbin/modprobe mga | ||
+ | /sbin/modprobe matroxfb_base | ||
+ | /opt/airrec/ivtv.setup.CODEC.sh | ||
+ | /opt/airrec/ivtv.setup.INPUT.sh | ||
+ | /bin/sleep 2 | ||
+ | --skipped--</pre> | ||
+ | |||
+ | **4. <code>/etc/inittab</code> (start at the first console) | ||
+ | <pre>-- skipped -- | ||
+ | # Run gettys in standard runlevels | ||
+ | #1:2345:respawn:/sbin/mingetty tty1 | ||
+ | 1:2345:respawn:/sbin/startsess tty1 /opt/airrec/airrec -c /opt/airrec/airrec.conf.mga >/dev/null 2>/dev/null | ||
+ | --skipped--</pre> | ||
+ | |||
+ | **5. <code>/etc/directfbrc</code> : | ||
+ | <pre>no-vt-switch | ||
+ | #no-vt-switching | ||
+ | #no-vt</pre> | ||
+ | |||
+ | **6. <code>/etc/hotplug/blacklist</code> (preventing loading mga video board drivers at boot stage) | ||
+ | <pre>-- skipped -- | ||
+ | ohci1394 | ||
+ | matrox_w1 | ||
+ | matroxfb_accel | ||
+ | matroxfb_base | ||
+ | -- skipped --</pre> | ||
+ | |||
+ | ==Licence== | ||
+ | <pre> | ||
+ | airrec | ||
+ | (yet another PVR) | ||
+ | |||
+ | Copyright (C) 2006 Maksym Veremeyenko. | ||
+ | This file is part of airrec project (air monitoring/recording with | ||
+ | video reports build system) | ||
+ | |||
+ | airrec is free software; you can redistribute it and/or modify | ||
+ | it under the terms of the GNU General Public License as published by | ||
+ | the Free Software Foundation; either version 2 of the License, or | ||
+ | (at your option) any later version. | ||
+ | |||
+ | airrec is distributed in the hope that it will be useful, | ||
+ | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
+ | GNU General Public License for more details. | ||
+ | |||
+ | You should have received a copy of the GNU General Public License | ||
+ | along with airrec; if not, write to the Free Software | ||
+ | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
+ | </pre> |
Latest revision as of 12:38, 28 March 2006
Contents |
Overview
This project was developed for air monitoring, video reports (on DVD media) preparation.
Software complex consists of two parts
- 1. PVR - video recorder, video preview and audio level monitoring, rotating recorded video (delete older parts to keep spool size in fixed size).
- 2. web-oriented application for DVD building.
Hardware requirements
PVR uses video capture card with hardware MPEG-2 encoder (see ivtv projects for details).
Recorder MPEG-2 stream saved to hard disk, the large disk space - the more video could be saved. :-))
DirectFB is used for GUI.
Downloads
Current version 1.0 (-r42):
- airrec-1.0-r42.tar.bz2 - source code
Build
- 1. Download source code from link above and unpack.
cd /usr/local/src wget http://research.m1stereo.tv/downloads/airrec/airrec-1.0-r42.tar.bz2 bzip2 -cd airrec-1.0-r42.tar.bz2 | tar xvf -
- 2. Make sure that installed additional packets:
- DirectFB-devel
- sqlite-devel-3.1.2-3
- 3. Go to source code dir and compile
cd airrec cd src make
If DirectFB was installed from rpm you need fix INCLUDES
variable in Makefile
.
Install
- 1. Directory structure preparation:
/opt/airrec
- programs and scripts dir./var/spool/airrec/live
- directory for db file and live streams./var/spool/airrec/live/ch0
- directory for saving MPEG-2 fragments for channel 0./var/spool/airrec/dvd/master
- built dvd storage/var/spool/airrec/dvd/temp
- temparatiry storage for dvd building.
- 2. Copying files:
#main executable cp /usr/local/src/airrec/src/airrec /opt/airrec # database file for storing info about fragments cp /usr/local/src/airrec/src/airrec.db /var/spool/airrec/live # mpeg coder setup scripts and srt file making scripts cp /usr/local/src/airrec/scripts/airrec_srt_creator.pl /opt/airrec cp /usr/local/src/airrec/scripts/airrec_srt_watcher.sh /opt/airrec cp /usr/local/src/airrec/scripts/ivtv.setup.CODEC.sh /opt/airrec cp /usr/local/src/airrec/scripts/ivtv.setup.INPUT.sh /opt/airrec
Configure
- 1. Configuration file for recorder (sample, 1 channel, 2x80GB stripe for video storing):
db-file=/var/spool/airrec/live/airrec.db use-channel=0 ident="M1 [main]" dev-pcm=/dev/video24 dev-yuv=/dev/video32 dev-mpeg=/dev/video0 spool=/var/spool/airrec/live/ch0 spool-limit=140000 #noflip vsync=25 syslog=6
Some parameters explanations:
db-file=<filename>
- database file name for storin info about fragmentsfb-mode=<mode str>
- Setup FrameBuffer mode ( default "1024,768,32")use-channel=<N>
- Activate channel N and apply further options to that channelident=<N>
- Channel identdev-pcm=<filename>
dev-yuv=<filename>
dev-mpeg=<filename>
spool=<PATH>
- Location where mpg file storedspool-limit=<N>
- Limit stored spool to <N> Megabytesvsync=<N>
- Try to redraw screen at <N> fps.noflip
- Disable surface flipping mode.config=<filename>
- Use config file.syslog=<N>
- Use LOG_LOCAL<N> facility for syslogging.
- 2. Running recorder preparation:
- 1.
/etc/crontab
(rotating and srt's creating/cleanup):
- 1.
-- skipped -- 0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /usr/bin/killall -HUP airrec 0,20,40 * * * * root /opt/airrec/airrec_srt_watcher.sh --skipped--
- 2.
/etc/modprobe.conf
:
- 2.
-- skipped -- alias char-major-81 videodev alias char-major-81-0 ivtv options ivtv pal=D cardtype=15 #options i810fb vram=8 xres=1024 bpp=32 yres=768 hsync1=30 hsync2=55 vsync1=55 vsync2=72 accel mtrr --skipped--
- 3.
/etc/rc.d/rc.local
(init matrox's module / codes setup):
- 3.
-- skipped -- # setup new io scheduler echo -n "cfq" > /sys/block/hda/queue/scheduler echo -n "cfq" > /sys/block/hdc/queue/scheduler echo -n "cfq" > /sys/block/hdd/queue/scheduler # airrec init /sbin/modprobe drm /sbin/modprobe mga /sbin/modprobe matroxfb_base /opt/airrec/ivtv.setup.CODEC.sh /opt/airrec/ivtv.setup.INPUT.sh /bin/sleep 2 --skipped--
- 4.
/etc/inittab
(start at the first console)
- 4.
-- skipped -- # Run gettys in standard runlevels #1:2345:respawn:/sbin/mingetty tty1 1:2345:respawn:/sbin/startsess tty1 /opt/airrec/airrec -c /opt/airrec/airrec.conf.mga >/dev/null 2>/dev/null --skipped--
- 5.
/etc/directfbrc
:
- 5.
no-vt-switch #no-vt-switching #no-vt
- 6.
/etc/hotplug/blacklist
(preventing loading mga video board drivers at boot stage)
- 6.
-- skipped -- ohci1394 matrox_w1 matroxfb_accel matroxfb_base -- skipped --
Licence
airrec (yet another PVR) Copyright (C) 2006 Maksym Veremeyenko. This file is part of airrec project (air monitoring/recording with video reports build system) airrec is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. airrec is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with airrec; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA