FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 10-05-2012, 07:19 AM
"Walter Dnes"
 
Default Questions about recording webcam+mic on netbook

I'm getting really ambitious with my 3-year-old Acer netbook, now that
open source Poulsbo video support exists. After tweaking the kernel,
I've got the webcam+mic recording with the command...

ffmpeg -y -f alsa -i plughw:0,0 -f video4linux2 -i /dev/video0 -f avi -vcodec mpeg4 output.avi

mplayer plays the output file fine with the command...

mplayer -vo x11 output.avi

Any suggestions for better options? Would x264 be an improvement? Is
there a way for the video to be displayed on the screen as it's being
recorded? Should I be looking at a program other than ffmpeg? BTW,
here is output from "emerge -pv ffmpeg mplayer" in case anybody has
ideas for improvements in my USE flags...


[ebuild R ] media-video/ffmpeg-0.10.3 USE="X aac alsa bzip2 encode faac libv4l mmx mp3 oss ssse3 theora threads truetype v4l vorbis x264 zlib -3dnow -3dnowext -aacplus (-altivec) -amr -avx -bindist -cdio (-celt) -cpudetection -debug -dirac -doc -frei0r -gnutls -gsm -hardcoded-tables -ieee1394 -jack -jpeg2k -libass -mmxext -modplug (-neon) -network -openal -openssl -pic -pulseaudio -rtmp -schroedinger -sdl -speex -static-libs -test -vaapi -vdpau (-vis) -vpx -xvid" FFTOOLS="-aviocat -cws2fws -ffeval -graph2dot -ismindex -pktdumper -qt-faststart -trasher" 0 kB

[ebuild R ] media-video/mplayer-1.0_rc4_p20110322-r1 USE="X a52 alsa dts encode faac faad gif jpeg mmx mng mp3 opengl png real sse sse2 ssse3 theora truetype v4l vorbis win32codecs x264 xv -3dnow -3dnowext -aalib (-altivec) -amr (-aqua) -bidi -bindist -bl -bluray -bs2b -cddb -cdio -cdparanoia -cpudetection -custom-cpuopts -debug -dga -dirac -directfb -doc -dv -dvb -dvd -dvdnav -dxr3 -enca -fbcon -ftp -ggi -gsm -iconv -ipv6 -jack -joystick -jpeg2k -ladspa -libass -libcaca -libmpeg2 -lirc -live -lzo -mad -md5sum -mmxext -mpg123 -nas -network -nut -openal -osdmenu -oss -pnm -pulseaudio -pvr -quicktime -radio -rar -rtc -rtmp -samba -schroedinger -sdl -shm -speex -tga -toolame -tremor -twolame -unicode -vdpau -vidix -vpx -xanim -xinerama -xscreensaver -xvid -xvmc -zoran" VIDEO_CARDS="-mga -s3virge -tdfx -vesa" 0 kB

--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
 
Old 10-05-2012, 11:36 AM
Michael Mol
 
Default Questions about recording webcam+mic on netbook

On Oct 5, 2012 3:23 AM, "Walter Dnes" <waltdnes@waltdnes.org> wrote:

>

> * I'm getting really ambitious with my 3-year-old Acer netbook, now that

> open source Poulsbo video support exists. *After tweaking the kernel,

> I've got the webcam+mic recording with the command...


Check out 'uvcview'.
 
Old 10-05-2012, 05:11 PM
James
 
Default Questions about recording webcam+mic on netbook

Walter Dnes <waltdnes <at> waltdnes.org> writes:


> I'm getting really ambitious with my 3-year-old Acer netbook, now that
> open source Poulsbo video support exists. After tweaking the kernel,
> I've got the webcam+mic recording with the command...


zoneminder use to be in portage....
http://www.zoneminder.com/

I have not tried this overlay.
http://gpo.zugaina.org/www-misc/zoneminder/
 
Old 10-06-2012, 09:03 AM
"Walter Dnes"
 
Default Questions about recording webcam+mic on netbook

On Fri, Oct 05, 2012 at 07:36:16AM -0400, Michael Mol wrote
> On Oct 5, 2012 3:23 AM, "Walter Dnes" <waltdnes@waltdnes.org> wrote:
> >
> > I'm getting really ambitious with my 3-year-old Acer netbook, now that
> > open source Poulsbo video support exists. After tweaking the kernel,
> > I've got the webcam+mic recording with the command...
>
> Check out 'uvcview'.

I assume you meant luvcview. It works for monitoring, but I can't
figure out how to record properly...

1) It outputs a raw stream file (named "stream.raw") which mplayer can't
figure out how to play.

2) How do I get it to record audio too?

I wouldn't mind transcoding the raw output, if I could get sound in
there. ffmpeg can record mpeg4 video plus mp3 sound. The video has
blocky artifacts when there's motion on the screen. I tried ffmpeg with
x264 codec, but the cpu is simply not up to it. I used cpufreq-utils to
push both cores to their max speed (1.3 ghz) but it didn't help.

--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
 
Old 10-06-2012, 11:48 AM
Michael Mol
 
Default Questions about recording webcam+mic on netbook

On Sat, Oct 6, 2012 at 5:03 AM, Walter Dnes <waltdnes@waltdnes.org> wrote:
> On Fri, Oct 05, 2012 at 07:36:16AM -0400, Michael Mol wrote
>> On Oct 5, 2012 3:23 AM, "Walter Dnes" <waltdnes@waltdnes.org> wrote:
>> >
>> > I'm getting really ambitious with my 3-year-old Acer netbook, now that
>> > open source Poulsbo video support exists. After tweaking the kernel,
>> > I've got the webcam+mic recording with the command...
>>
>> Check out 'uvcview'.
>
> I assume you meant luvcview. It works for monitoring, but I can't
> figure out how to record properly...

Actually, it looks like the one I'm accustomed to is
media-video/guvcview. I haven't played with media-video/luvcview

>
> 1) It outputs a raw stream file (named "stream.raw") which mplayer can't
> figure out how to play.
>
> 2) How do I get it to record audio too?
>
> I wouldn't mind transcoding the raw output, if I could get sound in
> there. ffmpeg can record mpeg4 video plus mp3 sound. The video has
> blocky artifacts when there's motion on the screen. I tried ffmpeg with
> x264 codec, but the cpu is simply not up to it. I used cpufreq-utils to
> push both cores to their max speed (1.3 ghz) but it didn't help.

When I last used guvcview, it muxed both audio and video into an
appropriate container format for me, but it was all very configurable.
I do recall I went with MJPEG for a video codec.[1]

I realize you're not fond of GNOME, but guvcview doesn't require
pulling in all of gnome. Though looking at it now, it may require
pulseaudio.

I haven't tried luvcview, sorry.

[1] This video was recorded with guvcview, and then uploaded as-is.
http://www.youtube.com/watch?v=kul0eGILCI4

--
:wq
 
Old 10-09-2012, 07:47 AM
"Walter Dnes"
 
Default Questions about recording webcam+mic on netbook

On Sat, Oct 06, 2012 at 07:48:50AM -0400, Michael Mol wrote

> When I last used guvcview, it muxed both audio and video into an
> appropriate container format for me, but it was all very configurable.
> I do recall I went with MJPEG for a video codec.[1]
>
> I realize you're not fond of GNOME, but guvcview doesn't require
> pulling in all of gnome. Though looking at it now, it may require
> pulseaudio.
>
> I haven't tried luvcview, sorry.
>
> [1] This video was recorded with guvcview, and then uploaded as-is.
> http://www.youtube.com/watch?v=kul0eGILCI4

I eventually did it "the unix way", stringing together a couple of
programs. The following is one long line...

ffmpeg -y -f alsa -i plughw:0,0 -f video4linux2 -i /dev/video0 -f avi -vcodec mpeg4 /dev/stdout | tee output.avi | mplayer -cache 32 -


ffmpeg encodes the streams from webcam+microphone, and spits it out to
stdout, which is piped to the "tee" program. "tee" sends out 2
duplicate streams...
1) to diskfile output.avi
2) to stdout, which is piped to mplayer, which displays a copy of the
stream onscreen

There's approximately a 1-second lag, but that's OK. The terminal
from which the command is launched produces warnings each time the cache
is emptied, but it works. Remember that this is an early Intel Atom Z520
which is rather weak. There is finally an open source kernel driver for
the Intel/Poulsbo GPU, but it has no acceleration. The fact that it
works acceptably is a minor miracle. The only mplayer video option that
works properly is the barebones "x11" option. All others except the
"fbdev2" either produce no video, or output in "seconds per frame",
rather than "frames per second" <G>. fbdev2 may be a bit faster than
x11, but it has its own issues...

1) Since it bangs away directly at the framebuffer, you need higher
permissions; i.e. either root or setuid.

2) It slaps the output in the upper left corner of the screen,
overwriting X, because it writes directly to framebuffer.

--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
 

Thread Tools




All times are GMT. The time now is 08:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org