zoneminder and x264 h.264 h264 compression saa7134 ffmpeg

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.

Moderator: zoneminder

Posts: 7
Joined: Sun Dec 16, 2007 10:45 pm

zoneminder and x264 h.264 h264 compression saa7134 ffmpeg

Postby tiberiu » Sun Dec 16, 2007 11:11 pm

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):

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`;

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

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


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

Posts: 4
Joined: Tue Apr 21, 2009 7:46 pm

Postby matias.kippes » Wed Sep 15, 2010 1:34 pm

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

Return to “User Contributions”

Who is online

Users browsing this forum: No registered users and 1 guest