Page 1 of 1

zoneminder and x264 h.264 h264 compression saa7134 ffmpeg

Posted: Sun Dec 16, 2007 11:11 pm
by tiberiu
hardware :
intel q6600 quad core , board Asus p5k-pro , 500gb samsung sata drive ,1gb ram , a china bord with 8 port and saa7134 chipset

soft: (this is the order to install them )
1. ubuntu 7.10 server x64 ,
2. Yasm 0.6.2
3. x264 svn
4. ffmpeg cvs



add this to /etc/modprobe.d/options
alias char-major-81 saa7134
options saa7134 card=33,33,33,33,33,33,33,33
(if u have a card whit 4 port u add only 4 of 33 )

u need to add this to /etc/sysctl.conf
kernel.shmall = 939524096
kernel.shmmax = 939524096
(i use zoneminder to capture with 640x480 for now, when i will add one more giga of ram i well use 700x525 resolution)

and add this script to cron (for me it's ok to run daily):

X="%08d-capture.jpg"
options="-vcodec libx264 -b 160k -bt 160k -bf 3 -subq 6 -cmp 256 -refs 5 -qmin 10 \
-qmax 51 -qdiff 4 -coder 1 -loop 1 -me hex -me_range 16 -trellis 2 \
-flags +mv4 -flags2 +bpyramid+wpred+mixed_refs+brdo+8x8dct \
-partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -g 250 \
-keyint_min 25 -sc_threshold 40 -i_qfactor 0.71"

for j in `seq 1 8`;
do

cd $j
evita=0
for i in $( ls -t); do
echo $evita $i
pwd
if [ $evita -gt 1 ]; then

zi=`ls -Ald $i|cut -d' ' -f6`
ora=`ls -Ald $i|cut -d' ' -f7`
tmpfile=$j-$zi-$ora-$i.mp4
echo $tmpfile
if [ ! -e /var/cache/filme/$tmpfile -o ! -s /var/cache/filme/$tmpfile ]
then
cd $i
ffmpeg -y -r 6 -i "$X" -deinterlace -an -threads 8 $options /var/cache/filme/$tmpfile
cd ..
fi
else
echo a $evita $i
fi
let evita=evita+1
done;
cd ..

done
does anybody know if u can capture 800x600 whith saa7134 ?

Posted: Wed Sep 15, 2010 1:34 pm
by matias.kippes
hello, this scrip is to convert the events to H.264?
Once you run the script, the events can be viewed from ZM?
The use of disk space is reduced to this?

Is there any way to record directly in H.264?

Thank you very much
Regards