[MPlayer-users] Issue capturing w/ v4l2

rbtq7ol02 at sneakemail.com rbtq7ol02 at sneakemail.com
Mon Sep 1 02:02:11 CEST 2003


I'm having some issues with capturing with v4l2.  I suspect it's not setting the video format on the card correctly when it starts capture.  I first noticed the problem with mencoder, but it can be demonstrated easily enough with mplayer as well.  I built a fresh copy from CVS to make sure the problem wasn't already fixed.  The commands and output for three runs of mplayer appear at the end of this message.  The first and third runs use v4l2.  The second run uses v4l1, and the second and third run (and any following captures) are correct.  For now, it looks like this can be worked around by running mplayer w/ v4l1 and vo null at boot time (I've yet to make up a script for that).  I'm using Gentoo linux with kernel 2.6.0-test4-mm3.  The frames grabbed are at:
http://chshrcat.homelinux.net/~chshrcat/01c.png
http://chshrcat.homelinux.net/~chshrcat/02c.png
http://chshrcat.homelinux.net/~chshrcat/03c.png

I'll also take a look at the src, but I don't know mplayer internals or v4l at all, so it's unlikely at best that I can find the problem myself.

Thanks in advance for any help anyone can offer on this.

Andrew

====mplayer output follows====
mplayer-cvs -tv driver=v4l2:width=480:height=480:input=0:device=/dev/video0:norm=NTSC:chanlist=us-cable:channel=49:adevice=/dev/dsp1:fps=29.97:amode=1:outfmt=yuy2 tv:// -vo png -z 9 -frames 1
MPlayer dev-CVS-030831-19:20-3.3.1 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Athlon 4 PM Palomino/Athlon MP Multiprocessor/Athlon XP eXtreme Performance (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Reading config file /opt/mplayer-cvs//etc/mplayer.conf: No such file or directory
Reading config file /home/chshrcat/.mplayer/config
Reading /home/chshrcat/.mplayer/codecs.conf: Can't open '/home/chshrcat/.mplayer/codecs.conf': No such file or directory
Reading /opt/mplayer-cvs//etc/codecs.conf: 60 audio & 155 video codecs
font: can't open file: /home/chshrcat/.mplayer/font/font.desc
font: can't open file: /opt/mplayer-cvs//etc/font/font.desc
Failed to open /dev/rtc: Permission denied (mplayer should be setuid root or /dev/rtc should be readable by the user.)
Using usleep() timing
Can't open input config file /home/chshrcat/.mplayer/input.conf: No such file or directory
Input config file /opt/mplayer-cvs//etc/input.conf parsed: 52 binds

Playing tv://
TV 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 ;-)
Selected device: BT878(Jetway TV/Capture JW-TV)
 Tuner cap:
 Tuner rxs: MONO
 Capabilites:  video capture  video overlay  VBI capture device  tuner  read/write  streaming
 supported norms: 0 = PAL; 1 = NTSC; 2 = SECAM; 3 = PAL-Nc; 4 = PAL-M; 5 = PAL-N; 6 = NTSC-JP; 7 = PAL-60;
 inputs: 0 = Television; 1 = Composite1; 2 = S-Video; 3 = Composite3;
 Current input: 0
 Current format: YUYV
v4l2: current audio mode is : STEREO
Selected channel: 49 (freq: 373.250)
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 480 x 480 (preferred csp: Packed YUY2)
Could not find matching colorspace - retrying with -vop scale...
Opening video filter: [scale]
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 1 -> 1

SwScaler: BICUBIC scaler, from Packed YUY2 to BGR 24-bit using MMX2
VO: [png] 480x480 => 480x480 BGR 24-bit  [fs]
Selected video codec: [rawyuy2] vfm:raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...
V:   0.0    2   0%  0%  0.0% 0 0 0%
v4l2: 5 frames successfully processed, 24 frames dropped.

Exiting... (End of file)


mplayer-cvs -tv driver=v4l:width=480:height=480:input=0:device=/dev/video0:norm=NTSC:chanlist=us-cable:channel=49:adevice=/dev/dsp1:fps=29.97:amode=1:outfmt=yuy2 tv:// -vo png -z 9 -frames 1
MPlayer dev-CVS-030831-19:20-3.3.1 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Athlon 4 PM Palomino/Athlon MP Multiprocessor/Athlon XP eXtreme Performance (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Reading config file /opt/mplayer-cvs//etc/mplayer.conf: No such file or directory
Reading config file /home/chshrcat/.mplayer/config
Reading /home/chshrcat/.mplayer/codecs.conf: Can't open '/home/chshrcat/.mplayer/codecs.conf': No such file or directory
Reading /opt/mplayer-cvs//etc/codecs.conf: 60 audio & 155 video codecs
font: can't open file: /home/chshrcat/.mplayer/font/font.desc
font: can't open file: /opt/mplayer-cvs//etc/font/font.desc
Failed to open /dev/rtc: Permission denied (mplayer should be setuid root or /dev/rtc should be readable by the user.)
Using usleep() timing
Can't open input config file /home/chshrcat/.mplayer/input.conf: No such file or directory
Input config file /opt/mplayer-cvs//etc/input.conf parsed: 52 binds

Playing tv://
TV detected! ;-)
Selected driver: v4l
 name: Video 4 Linux input
 author: Alex Beregszaszi
 comment: under development
=================================================================
 WARNING: YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!!
 As the V4L1 compatibility layer is broken, this may not work.
 If you encounter any problems, use driver=v4l2 instead.
 Bugreports on driver=v4l with v4l2 drivers will be ignored.
=================================================================
Selected device: BT878(Jetway TV/Capture JW-TV)
 Capabilites: capture tuner overlay clipping scales
 Device type: 171
 Supported sizes: 48x32 => 924x576
 Inputs: 4
  0: Television: tuner audio tv camera  (tuner:1, norm:pal)
  1: Composite1: audio camera  (tuner:0, norm:pal)
  2: S-Video: audio camera  (tuner:0, norm:pal)
  3: Composite3: audio camera  (tuner:0, norm:pal)
Audio mode setup warning!
Requested mode was stereo, but v4l still reports mono.
You may need "forcechan" option to force stereo/mono audio recording.
Audio mode setup warning!
Requested mode was stereo, but v4l still reports mono.
You may need "forcechan" option to force stereo/mono audio recording.
Audio mode setup warning!
Requested mode was stereo, but v4l still reports mono.
You may need "forcechan" option to force stereo/mono audio recording.
Using input 'Television'
Selected channel: 49 (freq: 373.250)
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 480 x 480 (preferred csp: Packed YUY2)
Could not find matching colorspace - retrying with -vop scale...
Opening video filter: [scale]
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 1 -> 1

SwScaler: BICUBIC scaler, from Packed YUY2 to BGR 24-bit using MMX2
VO: [png] 480x480 => 480x480 BGR 24-bit  [fs]
Selected video codec: [rawyuy2] vfm:raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...
V:   0.0    2   0%  0%  0.0% 0 0 0%

Exiting... (End of file)


mplayer-cvs -tv driver=v4l:width=480:height=480:input=0:device=/dev/video0:norm=NTSC:chanlist=us-cable:channel=49:adevice=/dev/dsp1:fps=29.97:amode=1:outfmt=yuy2 tv:// -vo png -z 9 -frames 1
MPlayer dev-CVS-030831-19:20-3.3.1 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Athlon 4 PM Palomino/Athlon MP Multiprocessor/Athlon XP eXtreme Performance (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Reading config file /opt/mplayer-cvs//etc/mplayer.conf: No such file or directory
Reading config file /home/chshrcat/.mplayer/config
Reading /home/chshrcat/.mplayer/codecs.conf: Can't open '/home/chshrcat/.mplayer/codecs.conf': No such file or directory
Reading /opt/mplayer-cvs//etc/codecs.conf: 60 audio & 155 video codecs
font: can't open file: /home/chshrcat/.mplayer/font/font.desc
font: can't open file: /opt/mplayer-cvs//etc/font/font.desc
Failed to open /dev/rtc: Permission denied (mplayer should be setuid root or /dev/rtc should be readable by the user.)
Using usleep() timing
Can't open input config file /home/chshrcat/.mplayer/input.conf: No such file or directory
Input config file /opt/mplayer-cvs//etc/input.conf parsed: 52 binds

Playing tv://
TV detected! ;-)
Selected driver: v4l
 name: Video 4 Linux input
 author: Alex Beregszaszi
 comment: under development
=================================================================
 WARNING: YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!!
 As the V4L1 compatibility layer is broken, this may not work.
 If you encounter any problems, use driver=v4l2 instead.
 Bugreports on driver=v4l with v4l2 drivers will be ignored.
=================================================================
Selected device: BT878(Jetway TV/Capture JW-TV)
 Capabilites: capture tuner overlay clipping scales
 Device type: 171
 Supported sizes: 48x32 => 924x576
 Inputs: 4
  0: Television: tuner audio tv camera  (tuner:1, norm:pal)
  1: Composite1: audio camera  (tuner:0, norm:pal)
  2: S-Video: audio camera  (tuner:0, norm:pal)
  3: Composite3: audio camera  (tuner:0, norm:pal)
Audio mode setup warning!
Requested mode was stereo, but v4l still reports mono.
You may need "forcechan" option to force stereo/mono audio recording.
Audio mode setup warning!
Requested mode was stereo, but v4l still reports mono.
You may need "forcechan" option to force stereo/mono audio recording.
Audio mode setup warning!
Requested mode was stereo, but v4l still reports mono.
You may need "forcechan" option to force stereo/mono audio recording.
Using input 'Television'
Selected channel: 49 (freq: 373.250)
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 480 x 480 (preferred csp: Packed YUY2)
Could not find matching colorspace - retrying with -vop scale...
Opening video filter: [scale]
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 1 -> 1

SwScaler: BICUBIC scaler, from Packed YUY2 to BGR 24-bit using MMX2
VO: [png] 480x480 => 480x480 BGR 24-bit  [fs]
Selected video codec: [rawyuy2] vfm:raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...
V:   0.0    2   0%  0%  0.0% 0 0 0%

Exiting... (End of file)



More information about the MPlayer-users mailing list