the cheap boards work.. just get one with the proper amount of inputs you need. The switching of inputs does NOT work. I use a cheap eight port board that works fine.. Ebay.. china...

here is a bit of info on how I got my cheapo card to work..

Bob Story
/ Yogi Berra: "Think! How the hell are \
| you gonna think and hit at the same  |
\ time?"                               /
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Sergio A.S. de Aguiar wrote:
Thank you, Milan, for your answer

These kinds of boards are a little bit more expensives and, at this moment, 
it's impossible for me to afford one.
One possible solution could be to do what you sugest but only having it 
passig thru a mpeg encoder before saving to a file (thru a pipe)?



----- Original Message -----
From: Milan van de Swaluw <>
To: Motion discussion list <>
Date: Thu, 10 Dec 2009 21:57:06 +0100
Subject: Re: [Motion-user] mpeg4 codec problem and videos not smooth


you can also buy a capture card with hardware mpeg encoding and wire it 
parallel to your other card.

On an event you can just run "cat /dev/video1 >> event.mpg" and kill the 
process on the end of the event.

I use a WinTV PVR USB, that works fine. Additional system load is about 
1% on my 3.0 GHz system when recording.


Sergio A.S. de Aguiar wrote:

I think I got what is the problem.
If I use only one thread, everything s ok.
The videos are saved ok and they are as good as possible.
The videos saved using another script, using the loopback are also very 
good (if I use only one motion thread).
So, the problem seems to be when i use more than one camera in motion 
(more than one thread).
I am using one cheap pico2000's like capture board and has to use round 
robin stuff to capture 3 channels, using 3 threads.
With this, I have all the problems described (specially the videos 
captured not being constan at all).

Now, my question to you, because I decided to purchase another board.
I have the possibility to purchase one Geovision model G800 (with 4 
chips bt878), or G250 (4 channels - the same stuff as the pico 2000 - 1 
chip bt878 multiplexed).
So, i think it's best to use the G800 and use one camera for each of 
bt878 chips, to avoid the round robin problem.
What is you advice? Am I right?

Thanks to all for your help and patience.


Sergio A.S. de Aguiar escreveu:

I thank you all for the help you are providing.
I am also experimenting 2 other problems wich are related each other.
When I select the mpeg4 or msmpeg4 as the codec to save the motion's 
videos, I get "codec not found" when motion try to save the movie.
I had to select flv as the video format.
To know:
The ffmpeg seems to be ok, as I am able to capture video using another 
script, wich command is:

mencoder -quiet -msglevel all=-1 tv:// -tv 


-oac mp3lame -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf 
pp=lb/ha/va/dr,hqdn3d,harddup -srate 48000 -af lavcresample=48000 
keyint=18:vstrict=0:acodec=libmp3lame:aspect=16/9 -lameopts br=64 
30000/1001 -o $newdir/$MOVIE.mpg&
Using this script, the videos are saved ok, with sound and at 30 fps.

The second problem is that the flv videos wich are saved, have a 
variable fps (frames per second) and they are all like if they were 
time-lapse kind (they play very fast).
You can see one of these videos here (size: 230 KBytes):
I wish to have them playing normally, as I intend to have a home page 
with some player to see them (flv or mpeg).
I want, if possible, to have something like seen at:

My motion.conf is (I removed all comments and stuff not used, so it's 
not large):

# motion.conf
daemon on
process_id_file /var/run/motion/
setup_mode off
v4l2_palette 8
norm 1
rotate 0
framerate 100
minimum_frame_time 0
auto_brightness off
brightness 0
contrast 0
saturation 0
hue 0
roundrobin_frames 1
roundrobin_skip 1
switchfilter off
threshold_tune off
noise_level 32
noise_tune on
despeckle EedDl
smart_mask_speed 0
lightswitch 0
minimum_motion_frames 2
pre_capture 0
post_capture 10
gap 60
max_mpeg_time 0
output_all off
output_motion off
quality 75
ppm off
ffmpeg_timelapse_mode hourly
ffmpeg_bps 500000
ffmpeg_variable_bitrate 0
ffmpeg_video_codec flv
ffmpeg_deinterlace on
text_event %Y%m%d%H%M%S
target_dir /var/www/capture
webcam_quality 50
webcam_motion off
webcam_maxrate 10
webcam_localhost off
webcam_limit 0
control_port 8080
control_localhost off
control_html_output on
quiet on
thread /usr/local/etc/thread1.conf
thread /usr/local/etc/thread2.conf
thread /usr/local/etc/thread3.conf

My thread1.conf (the other 2 are the same, just changing the 

# /usr/local/etc/thread1.conf
videodevice /dev/video0
input 3
width 320
height 240
threshold 1500
locate off
text_left CAMERA 1
text_right %Y-%m-%d\n%T
text_changes off
text_double off
output_normal best
ffmpeg_cap_new on
ffmpeg_timelapse 1
snapshot_interval 60
snapshot_filename %d/snapshots/%H/cam1/%H%M%S-%v-snapshot
jpeg_filename %d/pictures/%H/cam1/%H%M%S-%v
movie_filename %d/movies/%H/cam1/%H%M%S-%v
timelapse_filename %d/time_lapse/%H/cam1/%H-timelapse
on_picture_save /sbin/ "%f type%n"
webcam_port 8081

To know:

- I use a cheap pico 2000 like capture board.
- The input of channell 1 of this board is also connected to the input 
of another capture board, to use the audio/video capture script I 
mention above.
- My computer is a dual Athlon II processor 2.8 GHz with 3 GBytes of 
memory and a sata hard drive with 300 GBytes.

I compiled the motion's recomended ffmpeg wich is in the motion's 

Thanks to all for helping.



Return on Information:
Google Enterprise Search pays you back
Get the facts.
Motion-user mailing list



Return on Information:
Google Enterprise Search pays you back
Get the facts.
Motion-user mailing list
Return on Information:
Google Enterprise Search pays you back
Get the facts.
Motion-user mailing list


Return on Information:
Google Enterprise Search pays you back
Get the facts.
Motion-user mailing list