Originally Posted by
lnostdal
maybe: man 1 sync
Thanks Inostdal,
I should have tried IRC before posting. I´ve got my solution... here it is:
Code:
#!/bin/bash
OUTPUT="/home/gord/Desktop/pvr/`date +%y%m%d-%H%M.avi`"
mencoder /dev/video1 \
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1400:keyint=30 \
-oac mp3lame -lameopts cbr:br=128:mode=3 -vop scale=528:360,pp=lb \
-endpos 00:29:59 -o $OUTPUT &
while [ ¨$(pidof mencoder)¨ != ¨¨ ]; do sync; sleep 5; done
exit 0
This executed mencoder in the background and then enters a loop that executes ´sync´ every 5 seconds until mencoder stops.
Thanks
Gord
Bookmarks