[MPlayer-users] mencoder cannot record from webcam video stream. result in floating point exception

wt at teksavvy.com wt at teksavvy.com
Thu Apr 15 20:45:00 CEST 2010


I can see video image using the 'luvcview' program.  This indicates that
the webcam hardware is working.
I can use mplayer to display the webcam image.  But when I try to use
mencoder to record the webcam stream, it causes a floating point exception.
Any help is greatly appreciated
Thanks in advance.


My system spec:
   opensuse 11.2 32bit with KDE
   Creative webcam NX Pro (usb webcam)

$ uname -a
Linux myhostname 2.6.31.12-0.2-default #1 SMP 2010-03-16 21:25:39 +0100
i686 i686 i386 GNU/Linux

$ lsusb
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 041e:401e Creative Technology, Ltd Webcam NX Pro
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 046d:c016 Logitech, Inc. M-UV69a/HP M-UV96
Optical Wheel Mouse

# lspci
00:00.0 Host bridge: Intel Corporation 82845 845 [Brookdale] Chipset
Host Bridge (rev 04)
00:01.0 PCI bridge: Intel Corporation 82845 845 [Brookdale] Chipset AGP
Bridge (rev 04)
00:1d.0 USB Controller: Intel Corporation 82801CA/CAM USB Controller #1
(rev 02)
00:1d.1 USB Controller: Intel Corporation 82801CA/CAM USB Controller #2
(rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 42)
00:1f.0 ISA bridge: Intel Corporation 82801CAM ISA Bridge (LPC) (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 Controller
(rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801CA/CAM AC'97
Audio Controller (rev 02)
00:1f.6 Modem: Intel Corporation 82801CA/CAM AC'97 Modem Controller (rev 02)
01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 420
Go] (rev a3)
02:08.0 Ethernet controller: Intel Corporation 82801CAM (ICH3) PRO/100
VE (LOM) Ethernet Controller (rev 42)
02:0b.0 CardBus bridge: Toshiba America Info Systems ToPIC100 PCI to
Cardbus Bridge with ZV Support (rev 32)
02:0b.1 CardBus bridge: Toshiba America Info Systems ToPIC100 PCI to
Cardbus Bridge with ZV Support (rev 32)
02:0d.0 System peripheral: Toshiba America Info Systems SD TypA
Controller (rev 03)


>>>luvcview is working ok.  I can see the video stream.


$ luvcview -v /dev/video0 -i 25  -s 640x480
luvcview version 0.2.1
 interval: 25 fps
 size width: 640 height: 480
Video driver: x11
A window manager is available
video /dev/video0

Stop asked
 Clean Up done Quit


>>>Mplayer is able to display the webcam stream with this command


$ mplayer tv:// -tv
driver=v4l2:device=/dev/video0:fps=10:width=640:height=480 -vf scale=640:480
MPlayer SVN-r30725-4.4 (C) 2000-2010 MPlayer Team

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski at zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl,
VIDIOC_G_PARM was used instead.
Selected device: USB Camera (041e:401e)
 Capabilites:  video capture  read/write  streaming
 supported norms:
 inputs: 0 = zc3xx;
 Current input: 0
 Current format: unknown (0x4745504a)
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: Cannot get fps
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
Opening video filter: [scale w=640 h=480]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
==========================================================================
Audio: no sound
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x8ac4400]using unscaled yuv422p -> yuyv422 special converter
VO: [xv] 640x480 => 640x480 Packed YUY2
v4l2: ioctl set mute failed: Invalid argument
v4l2: 54 frames successfully processed, -14 frames dropped.

Exiting... (Quit)


>>>When I try to record the webcam video stream, mencoder exits with a
floating point exception.


$ mencoder -v tv:// -tv
driver=v4l2:device=/dev/video0:width=640:height=480:amode=0:forceaudio:audiorate=32000
-ovc lavc -lavcopts vcodec=mpeg4:acodec=libmp3lame:aspect=4/3:gray
-ffourcc DX50 -oac mp3lame -lameopts
vol=10:mode=3:preset=standard:highpassfreq=0:lowpassfreq=17500 -o
myvid-yyyymmdd-00.avi
MEncoder SVN-r30725-4.4 (C) 2000-2010 MPlayer Team
Configuration: --prefix=/usr/local/bin/mplayer20100224
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
STREAM: [tv] tv://
STREAM: Description: TV Input
STREAM: Author: Benjamin Zores, Albeu
STREAM: Comment:
success: format: 9  data: 0x0 - 0x0
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski at zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl,
VIDIOC_G_PARM was used instead.
Selected device: USB Camera (041e:401e)
 Capabilites:  video capture  read/write  streaming
 supported norms:
 inputs: 0 = zc3xx;
 Current input: 0
 Format unknown (0x4745504a) ( 0 bits, JPEG): Unknown 0x4745504a
 Current format: unknown (0x4745504a)
v4l2: set format: YVU420
v4l2: set input: 0
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
Selected norm : pal
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
v4l2: set width: 640
v4l2: set height: 480
Selected input hasn't got a tuner!
==> Found video stream: 0
v4l2: get format: unknown (0x4745504a)
v4l2: Cannot get fps
v4l2: get width: 640
v4l2: get height: 480
ioctl dsp getfmt: 0
Supported formats: 5b1f9
ioctl dsp setfmt: 0
ioctl dsp stereo: 0 (req: 1)
ioctl dsp speed: 0
ioctl dsp trigger: 0
trigger: 1
ioctl dsp trigger: 0
ioctl dsp getblocksize: 0
blocksize: 4096
Audio block size too low, setting to 16384!
v4l2: set audio samplerate: 32000
v4l2: get audio format: 9
==> Found audio stream: 0
v4l2: get audio samplerate: 32000
v4l2: get audio samplesize: 2
v4l2: get audio channels: 2
  TV audio: 2 channels, 16 bits, 32000 Hz
Audio capture - buffer 1063 blocks of 16384 bytes, skew average from 16
meas.
Floating point exception


More information about the MPlayer-users mailing list