[MPlayer-users] v4l2 play/record lock up

Jordan lx_xero at comcast.net
Thu Feb 19 00:27:05 CET 2004


I had been using kernel 2.6.1 and mplayer 1.0_pre3 using the old v4l1 playback
method. This stopped working once I updated 2.6.2 (and now 2.6.3), so I
switched to the v4l2 method, and that's where problems started. Sometimes, it
works fine, but every once in a while it will lock up completely. I can't kill
the process and trying to freezes up the terminal. I can't run ps without it
freezing either. Trying to shutdown/reboot freezes as well. Other then that the
computer continues to work fine, so it's not a complete lockup.

I used this command to play:

mplayer -v tv://73 -tv driver=v4l2:width=640:height=480 \
-tv normid=1:device=/dev/video0:chanlist=us-cable \
-vop pp=tn/lb,crop=628:480:6:0

I press q to quit, and then it will either close properly, or freeze. It seems
to happen spontaneously but if I keep running it and pressing q after a one
second interval the problem always happens within 10 tries. Here's the output
of a frozen instance (in verbose mode):

MPlayer dev-CVS-040218-00:00-3.3.3 (C) 2000-2004 MPlayer Team
 
CPU: Intel Pentium 4/Xeon/Celeron Foster 2406 MHz (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
 
Reading config file /usr/share/mplayer/mplayer.conf
Reading config file /home/xero/.mplayer/config
Reading /home/xero/.mplayer/codecs.conf: Can't open '/home/xero/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 63 audio & 169 video codecs
CommandLine: '-v' 'tv://73' '-tv' 'driver=v4l2:width=640:height=480' '-tv' 'normid=1:device=/dev/video0:chanlist=us-cable' '-vop' 'pp=tn/lb,crop=628:480:6:0'
init_freetype
get_path('font/font.desc') -> '/home/xero/.mplayer/font/font.desc'
font: can't open file: /home/xero/.mplayer/font/font.desc
Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Failed to open /dev/rtc: Permission denied (mplayer should be setuid root or /dev/rtc should be readable by the user.)
Using usleep() timing
get_path('input.conf') -> '/home/xero/.mplayer/input.conf'
Can't open input config file /home/xero/.mplayer/input.conf: No such file or directory
Parsing input config file /usr/share/mplayer/input.conf
Input config file /usr/share/mplayer/input.conf parsed: 53 binds
Setting up LIRC support...
get_path('73.conf') -> '/home/xero/.mplayer/73.conf'
 
Playing tv://73.
STREAM: [null] tv://73
STREAM: Description: Null stream
STREAM: Author: Albeu
STREAM: Comment:
CACHE_PRE_INIT: 0 [0] 0  pre:0  eof:0
Cache fill:  0.00% (0 bytes)    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 video (Hauppauge (bt878))
 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
 Format GREY   ( 8 bits, 8 bpp, gray): Planar Y800
 Format HI240  ( 8 bits, 8 bpp, dithered color): Unknown
 Format RGB555 (16 bits, 15 bpp RGB, le): RGB 15-bit
 Format RGB555X (16 bits, 15 bpp RGB, be): Unknown
 Format RGB565 (16 bits, 16 bpp RGB, le): RGB 16-bit
 Format RGB565X (16 bits, 16 bpp RGB, be): Unknown
 Format BGR24  (24 bits, 24 bpp RGB, le): BGR 24-bit
 Format BGR32  (32 bits, 32 bpp RGB, le): BGR 32-bit
 Format RGB32  (32 bits, 32 bpp RGB, be): RGB 32-bit
 Format YUYV   (16 bits, 4:2:2, packed, YUYV): Packed YUY2
 Format YUYV   (16 bits, 4:2:2, packed, YUYV): Packed YUY2
 Format UYVY   (16 bits, 4:2:2, packed, UYVY): Packed UYVY
 Format YUV422P (16 bits, 4:2:2, planar, Y-Cb-Cr): Planar 422P
 Format YUV420 (12 bits, 4:2:0, planar, Y-Cb-Cr): Planar I420
 Format YVU420 (12 bits, 4:2:0, planar, Y-Cr-Cb): Planar YV12
 Format YUV411P (16 bits, 4:1:1, planar, Y-Cb-Cr): Planar 411P
 Format YUV410 ( 9 bits, 4:1:0, planar, Y-Cb-Cr): Planar IF09
 Format YVU410 ( 9 bits, 4:1:0, planar, Y-Cr-Cb): Planar YVU9
 Current format: YUV420
v4l2: current audio mode is : MONO
v4l2: set Volume: 65535 [0, 65535]
v4l2: set format: YUV420
v4l2: set input: 0
Selected norm id: 1
v4l2: set norm: NTSC
v4l2: set width: 640
v4l2: set height: 480
Selected channel list: us-cable (including 133 channels)
Requested channel: 73
Selected channel: 73 (freq: 517.250)
Current frequency: 8276 (517.250)
Current frequency: 8276 (517.250)
==> Found video stream: 0
v4l2: get format: YUV420
v4l2: get fps: 29.000000
v4l2: get width: 640
v4l2: get height: 480
Using a ring buffer for maximum 2 frames, 0 MB total size.
v4l2: set Brightness: 32768 [0, 65535]
v4l2: set Hue: 32768 [0, 65535]
v4l2: set Saturation: 32768 [0, 65535]
v4l2: set Contrast: 32768 [0, 65535]
[V] filefmt:9  fourcc:0x32315659  size:640x480  fps:29.00  ftime:=0.0345get_path('sub/') -> '/home/xero/.mplayer/sub/'
get_path('default.sub') -> '/home/xero/.mplayer/default.sub'
X11 opening display: :0.0
vo: X11 color mask:  FFFF  (R:F800 G:7E0 B:1F)
vo: X11 running at 1600x1200 with depth 16 and 16 bpp (":0.0" => local display)
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Current fstype setting honours FULLSCREEN BELOW X atoms
Opening video filter: [pp=tn/lb]
[vo] query(Planar YV12) -> 3
Opening video filter: [crop w=628 h=480 x=6 y=0]
Crop: 628 x 480, 6 ; 0
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred csp: Planar YV12)
[PP] Using external postprocessing filter, max q = 6.
Trying filter chain: crop pp vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (640x480->640x480,flags=0,'MPlayer',0x32315659)
REQ: flags=0xC37  req=0x400
REQ: flags=0x437  req=0x0
VO: [xv] 628x480 => 628x480 Planar YV12
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel at goldbach.in-berlin.de> and others
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 102 for hw scaling
[xv] dx: 0 dy: 0 dw: 628 dh: 480
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
Audio: no sound
Freeing 0 unused audio chunks
Starting playback...
v4l2: going to capture
*** [crop] Exporting mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
*** [pp] Exporting mp_image_t, 628x480x12bpp YUV planar, 452160 bytes
*** [vo] Allocating mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
[xv] dx: 0 dy: 0 dw: 628 dh: 480
uninit video: raw%  0%  0.0% 0 0 0%
DEMUXER: freeing demuxer at 0x85bc6c0
v4l2: ioctl dequeue buffer failed: Invalid argument, idx = 0
 
at this point I pressed ctrl-c which returns this:
 
MPlayer interrupted by signal 2 in module: enable_cache
vo: x11 uninit called but X11 not inited..

and it stays that way unless I do a ctrl-z to escape, but at this point the
process has already locked up the computer. I notice this problem using 2.6.1,
2.6.2, and 2.6.3. Mplayer-1.0_pre3 and a cvs snapshot both have this problem.
Only the V4L1 compatibility mode worked properly in 2.6.1 and so this didn't
bother me until I upgraded. As it says not to report bugs concerning the V4L1
compatibility mode, I'm not. Mplayer is the only v4l2 program causing this.
I've tried tvtime, xawdecode, ffmpeg, xawtv, none of which cause this lockup.

Any help is appreciated.




More information about the MPlayer-users mailing list