S
S
SovGVD2012-04-03 10:39:35
linux
SovGVD, 2012-04-03 10:39:35

How to write and watch webcam video at the same time in Linux?

Here I got a problem - I need to simultaneously show the video from the webcam (in full screen) and write it to the disk (picture 320x240 from 15 to 30 fps). In this case, the display time is critical, i.e. there should be no delays or they should be insignificant.
It would seem that VLC is perfect, but he stubbornly refuses to show real-time video, although he removed caching (but I vaguely remember that somewhere else there is either caching or a delay), so I didn’t even try to add recording. But mplayer shows quite quickly, but cannot write at the same time.
How would I do this in ubuntu (11.10, ARM architecture (Toshiba AC100))? Moreover and to push in a script.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
SovGVD, 2012-04-06
@SovGVD

solution to the problem (suddenly someone will also come in handy) - use gstreamer
here is such a simple command in the console
gst-launch-0.10 --eos-on-shutdown v4l2src device=/dev/video1 ! video/x-raw-yuv,width=360,height=288,framerate=25/1,norm=NTSC ! tee name=my_videosink ! videorate ! jpegenc ! avimux ! filesink location=video.avi my_videosink. ! queue ! ffmpegcolorspace ! ximagesink
that takes video from an analog source (easycap60), shows a picture from it and encodes MotionJPEG
unfortunately above 360x288 the video is very slow, but 320x240 is also suitable for my tasks more than =)

U
ur3ckr, 2012-04-03
@ur3ckr

Strange, for the sake of interest, I launched VLC under Debian on my Asus P81IJ laptop - I chose streaming, recording to a file and displaying it in full screen - everything shows without brakes + writes the file.

K
KOLANICH, 2012-04-06
@KOLANICH

you can write a small program using opencv

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question