Friday, May 13, 2011

test my ffmpeg webcam vlog script

for lubuntu 11.04
webcam test script. has auto renaming using the time function.
os: linux Lubuntu11.04 @ 5moy2011 uname -r 2.6.38-8-generic hardware: acer aspire one [aod255e] webcam video driver: video4linux2 audio drivers: alsa for the mic.
#################################### note the low bitrate and frame rate, netbook settings are kind of slow so keep the bitrate, codecs and frame rate low so that the netbook keeps up with ffmpeg. press Q to stop ffmpeg.
#!/bin/bash
#
# test auto vlog1 [ naming] script and capture byant.
##############################
##ffmpeg -r 15 -b 800k -s 640x400 -f video4linux2 -i /dev/video0  \
## -vcodec msmpeg4v2 -f alsa -ac 2 -vol 512 -i hw:0,0 vlog111div3-vol512_alsa.avi
##
###############################

DIR=/home/"user"/vlog



  ffmpeg -r 15 -b 800k -s 640x400 -f video4linux2 -i /dev/video0  \
-vcodec msmpeg4v2 -f alsa -ac 2 -vol 512 -i hw:0,0  vv1temp-out-lowercase.avi &&
  

 sleep 2

 for old in `ls   ~/vlog/*.avi` ; do today=~/vlog/`date +%F+Hour%H+Min%M+Sec%S`.AVI  ;  mv     $old $today; done


lubuntu mods below. ########################################## sound works , video works , wifi and lan work. not bad for a 200$ netbook from walmart.
lsmod
Module                  Size  Used by
cryptd                 19801  0 
aes_i586               16956  3 
aes_generic            38023  1 aes_i586
parport_pc             32111  0 
ppdev                  12849  0 
snd_hda_codec_realtek   255820  1 
joydev                 17322  0 
snd_hda_intel          24140  6 
snd_hda_codec          90901  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep              13274  1 snd_hda_codec
snd_pcm                80244  4 snd_hda_intel,snd_hda_codec
snd_seq_midi           13132  0 
arc4                   12473  2 
snd_rawmidi            25269  1 snd_seq_midi
snd_seq_midi_event     14475  1 snd_seq_midi
i915                  450944  2 
snd_seq                51291  2 snd_seq_midi,snd_seq_midi_event
brcm80211             690428  0 
snd_timer              28659  4 snd_pcm,snd_seq
snd_seq_device         14110  3 snd_seq_midi,snd_rawmidi,snd_seq
sparse_keymap          13666  0 
mac80211              257001  1 brcm80211
uvcvideo               66851  0 
drm_kms_helper         40745  1 i915
cfg80211              156212  2 brcm80211,mac80211
videodev               75143  1 uvcvideo
psmouse                73312  0 
drm                   180037  3 i915,drm_kms_helper
snd                    55295  17 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
serio_raw              12990  0 
soundcore              12600  1 snd
snd_page_alloc         14073  2 snd_hda_intel,snd_pcm
i2c_algo_bit           13184  1 i915
video                  18951  1 i915
lp                     13349  0 
parport                36746  3 parport_pc,ppdev,lp
usbhid                 41704  0 
hid                    77084  1 usbhid
ahci                   21591  2 
libahci                25548  1 ahci
atl1c                  36237  0 
#########################################
/********************** *** debian lenny old ** *********************/ and now for debian lenny mepis8/debian/lenny
debian lenny webcam scrypt. uname -r 2.6.26
#!/bin/bash
#
# test auto vlog1 [ naming] script and capture byant.
##############################
## lubuntu settingd BAK#
##ffmpeg -r 15 -b 800k -s 640x400 -f video4linux2 -i /dev/video0  \
## -vcodec msmpeg4v2 -f alsa -ac 2 -vol 512 -i hw:0,0 vlog111div3-vol512_alsa.avi
##
###############################

DIR=/home/"user name"/vlog1



 nice -n 19 ./ffmpeg-svn -f oss -i /dev/dsp -acodec mp3 -ac 2 -vol 512 \
  -f video4linux  -s 640x480 -r 30000/1001  -i /dev/video0  \
 -f avi -vcodec msmpeg4 -qmin 4 -qmax 7 -b 800 \
 vv1temp-out-lowercase.avi &&
  

 sleep 2

 for old in `ls   ~/vlog1/*.avi` ; do today=~/vlog1/`date +%F+Hour%H+Min%M+Sec%S`.AVI  ;  mv     $old $today; done

ok.

No comments: