apl 09.04.2010 19:30
Есть вопрос! — Помогите снять картинку с камеры из консоли?
Озадачился я сохранением картинки с домашней камеры чтоб по http можно было смотреть не сильно загружая канал... Пробовал разное...ffmpeg -i /dev/video0 -vcodec mjpeg -vframes 1 picture.jpg
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 13 2009 22:15:16, gcc: 4.4.1
/dev/video0: Unknown format
configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 13 2009 22:15:16, gcc: 4.4.1
/dev/video0: Unknown format
vgrabbj -d /dev/video0 -o jpg -f 1.jpg
Unable to set supported video-palette
Fatal Error (non-daemon), exiting...
There was no map allocated to be freed...
Fatal Error (non-daemon), exiting...
There was no map allocated to be freed...
camgrab
No supported palette found.
ffmpeg -t 1 -f video4linux2 -s 320x240 -r 30 -i /dev/video0 -f jpg 1.jpg
...
<3>Capabilities: 5000001
The V4L2 driver changed the video from 320x240 to 640x480
Cannot find a proper format.
/dev/video0: I/O error occurred
Usually that means that input file is truncated and/or corrupted.
sudo apt-get install xfce4-screenshooter
Настраивается пакет zoneminder (1.24.1-1ubuntu2) ...
Starting ZoneMinder: Insecure directory in $ENV{PATH} while running with -T switch at /usr/bin/zmpkg.pl line 258.
failure
invoke-rc.d: initscript zoneminder, action "start" failed.
dpkg: не удалось обработать параметр zoneminder (--configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 255
zoneminder тоже не ставится... хз что ему нужно... тоже выдает ошибку 255
ffmpeg -t 1 -f video4linux -s 320x240 -r 30 -i /dev/video0 1.jpg
а вот так он пишет jpeg с шумом вместо картинки...
Камера в /dev/video0, проверено и работает в cheese. Братцы... помогите!
1. Задаёт вопросы в специальном блоге.
2. Не забываем про теги.
3. Ставим кат!
2. Не забываем про теги.
3. Ставим кат!
Надеюсь что правильно исправил пост...
попробовал еще поставить motion, но он пишет
попробовал еще поставить motion, но он пишет
<0> Processing thread 0 - config file /etc/motion/motion.conf
<0> Motion 3.2.11 Started
<0> ffmpeg LIBAVCODEC_BUILD 3412992 LIBAVFORMAT_BUILD 3415808
<0> Thread 1 is from /etc/motion/motion.conf
<1> Thread 1 started
<0> motion-httpd/3.2.11 running, accepting connections
<0> motion-httpd: waiting for data on port TCP 8080
<1> cap.driver: "pac7311"
<1> cap.card: "USB Camera (093a:2622)"
<1> cap.bus_info: "usb-0000:00:1d.0-2"
<1> cap.capabilities=0x05000001
<1> - VIDEO_CAPTURE
<1> - READWRITE
<1> - STREAMING
<1> Supported palettes:
<1> 0: PJPG (PJPG)
<1> Unable to find a compatible palette format.
<1> Using VIDEO_PALETTE_YUV420P palette
<1> Using V4L1
<1> Resizing pre_capture buffer to 1 items
<1> Started stream webcam server in port 8081
<1> sync error in proc 20087:
Segmentation fault
<0> Motion 3.2.11 Started
<0> ffmpeg LIBAVCODEC_BUILD 3412992 LIBAVFORMAT_BUILD 3415808
<0> Thread 1 is from /etc/motion/motion.conf
<1> Thread 1 started
<0> motion-httpd/3.2.11 running, accepting connections
<0> motion-httpd: waiting for data on port TCP 8080
<1> cap.driver: "pac7311"
<1> cap.card: "USB Camera (093a:2622)"
<1> cap.bus_info: "usb-0000:00:1d.0-2"
<1> cap.capabilities=0x05000001
<1> - VIDEO_CAPTURE
<1> - READWRITE
<1> - STREAMING
<1> Supported palettes:
<1> 0: PJPG (PJPG)
<1> Unable to find a compatible palette format.
<1> Using VIDEO_PALETTE_YUV420P palette
<1> Using V4L1
<1> Resizing pre_capture buffer to 1 items
<1> Started stream webcam server in port 8081
<1> sync error in proc 20087:
Segmentation fault
motion, вообще-то, лучше всего для этой задачи. Странно, что он сегфолтится. перекомпилируй его, что ли?
Что-нить вроде
Идет?
ffmpeg -f video4linux2 -s 320x240 -r 30 -i /dev/video0 -f avi raw.avi
Идет?
ffmpeg -f video4linux2 -s 320x240 -r 30 -i /dev/video0 -f avi raw.avi
нет :( не идет
Пробовал... ./configure требовал кучу пакетов. поставил, но при make 255 ошибка
нет :( не идет
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 13 2009 22:15:16, gcc: 4.4.1
<3>Capabilities: 5000001
The V4L2 driver changed the video from 320x240 to 640x480
Cannot find a proper format.
/dev/video0: I/O error occurred
Usually that means that input file is truncated and/or corrupted.
configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 13 2009 22:15:16, gcc: 4.4.1
<3>Capabilities: 5000001
The V4L2 driver changed the video from 320x240 to 640x480
Cannot find a proper format.
/dev/video0: I/O error occurred
Usually that means that input file is truncated and/or corrupted.
motion, вообще-то, лучше всего для этой задачи. Странно, что он сегфолтится. перекомпилируй его, что ли?
Пробовал... ./configure требовал кучу пакетов. поставил, но при make 255 ошибка
mjpeg-streamer
mjpeg-streamer такого в репах не нашел, есть только streamer, но streamer выдает
$streamer -c /dev/video0 -o foobar00.jpeg
files / video: JPEG (JFIF) / audio: none
no way to get: 320x240 JPEG (JFIF)
movie writer initialisation failed
ЧЯНТД?
$streamer -c /dev/video0 -o foobar00.jpeg
files / video: JPEG (JFIF) / audio: none
no way to get: 320x240 JPEG (JFIF)
movie writer initialisation failed
ЧЯНТД?
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so ffmpeg -f video4linux2 -s 320x240 -r 30 -i /dev/video0 -f avi -v 9 raw.avi
По сабжу, к сожалению, помочь не могу.