[MPlayer-users] Optimize video output from tv card
Michael
auslands-kv at gmx.de
Tue Aug 25 13:50:42 CEST 2009
Hi
I want to output external video from a tv encoder card (USB) to the screen.
It works, but it uses too much CPU power. If the stream is played back at
25fps it uses 100% CPU. With 15fps it is about 50%.
When I instead use a webcam, I can reach 25fps with about 50% only. So I
guess it is somehow the internal processing. Is there a way to optimize it?
This is the output from mplayer from the tv card (15fps), and below is the
output from the webcam (25fps).
Thanks,
Michael
TV Card (15fps, 50% CPU):
MPlayer 1.0rc2-4.3.2-DFSG-free (C) 2000-2007 MPlayer Team
CPU: Geode(TM) Integrated Processor by AMD PCS (Family: 5, Model: 10,
Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled with runtime CPU detection.
get_path('codecs.conf') -> '/home/omni/.mplayer/codecs.conf'
Reading /home/omni/.mplayer/codecs.conf: Can't open
'/home/omni/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: Can't open '/etc/mplayer/codecs.conf': No
such file or directory
Using built-in default codecs.conf.
Configuration: --prefix=/usr --confdir=/etc/mplayer --
datadir=/usr/share/mplayer --codecsdir=/usr/lib/codecs --enable-xvmc --
enable-sdl --enable-ossaudio --enable-lirc --enable-gui --enable-freetype --
enable-menu --enable-largefiles --disable-bitmap-font --disable-ggi --
disable-xvid --language=all --disable-xmms --disable-arts --disable-aa --
disable-mad --disable-libdv --enable-libavutil_so --enable-libavcodec_so --
enable-libavformat_so --enable-libpostproc_so --disable-faad-internal --
enable-faad-external --target=i586-linux --enable-win32dll --enable-real --
enable-xanim --enable-runtime-cpudetection --disable-libdvdcss-internal --
enable-dvdread --disable-mencoder --enable-debug --enable-tv-v4l2 --enable-
xmga --enable-mga --enable-3dfx --enable-tdfxfb --enable-fbdev
CommandLine: '-vo' 'fbdev' 'tv://' '-tv' 'driver=v4l2:device=/dev/video0' '-
vf' 'crop=640:420' '-fps' '15' '-v'
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/omni/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/home/omni/.mplayer/input.conf'
Can't open input config file /home/omni/.mplayer/input.conf: No such file or
directory
Can't open input config file /etc/mplayer/input.conf: No such file or
directory
Falling back on default (hardcoded) input config
Setting up LIRC support...
get_path('.conf') -> '/home/omni/.mplayer/.conf'
Playing tv://.
get_path('sub/') -> '/home/omni/.mplayer/sub/'
STREAM: [tv] tv://
STREAM: Description: TV Input
STREAM: Author: Benjamin Zores, Albeu
STREAM: Comment:
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 ;-)
Selected device: Pinnacle Dazzle DVC 90/100/101/
Capabilites: video capture audio read/write streaming
supported norms: 0 = NTSC; 1 = NTSC-M; 2 = NTSC-M-JP; 3 = NTSC-M-KR; 4 =
NTSC-443; 5 = PAL; 6 = PAL-BG; 7 = PAL-H; 8 = PAL-I; 9 = PAL-DK; 10 = PAL-M;
11 = PAL-N; 12 = PAL-Nc; 13 = PAL-60; 14 = SECAM; 15 = SECAM-B; 16 = SECAM-
G; 17 = SECAM-H; 18 = SECAM-DK; 19 = SECAM-L; 20 = SECAM-Lc;
inputs: 0 = Composite1; 1 = S-Video;
Current input: 0
Format YUYV (16 bits, 16bpp YUY2, 4:2:2, packed): Packed YUY2
Current format: YUYV
v4l2: set format: YVU420
v4l2: set format: YUV420
v4l2: set format: UYVY
v4l2: set format: YUYV
v4l2: set input: 0
Selected norm : pal
v4l2: set norm: PAL
==> Found video stream: 0
v4l2: get format: YUYV
v4l2: get fps: 25.000000
v4l2: get width: 640
v4l2: get height: 480
Using a ring buffer for maximum 2 frames, 1 MB total size.
v4l2: set Brightness: 128 [0, 255]
v4l2: set Hue: 0 [-128, 127]
v4l2: set Saturation: 64 [0, 127]
v4l2: set Contrast: 64 [0, 127]
[V] filefmt:9 fourcc:0x32595559 size:640x480 fps:25.00 ftime:=0.0400
get_path('sub/') -> '/home/omni/.mplayer/sub/'
using /dev/fb0
Opening video filter: [crop w=640 h=420]
Crop: 640 x 420, -1 ; -1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Packed YUY2)
Trying filter chain: crop vo
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale crop vo
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (640x480->640x480,flags=0,'MPlayer',0x32595559)
REQ: flags=0x403 req=0x0
REQ: flags=0x403 req=0x400
VO: [fbdev] 640x420 => 640x420 BGR 16-bit
VO: Description: Framebuffer Device
VO: Author: Szabolcs Berecz <szabi at inf.elte.hu>
var info:
xres: 640
yres: 480
xres_virtual: 640
yres_virtual: 480
xoffset: 0
yoffset: 0
bits_per_pixel: 16
grayscale: 0
red: 11 5 0
green: 5 6 0
blue: 0 5 0
transp: 0 0 0
nonstd: 0
fix info:
framebuffer size: 8388608 bytes
type: 0
type_aux: 0
visual: 2
line_length: 1280 bytes
fb_bpp: 16
fb_pixel_size: 2 bytes
other:
in_width: 640
in_height: 420
out_width: 640
out_height: 420
first_row: 0
last_row: 420
pixel per line: 640
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Audio: no sound
Freeing 0 unused audio chunks.
FPS forced to be 15.000 (ftime: 0.067).
Starting playback...
v4l2: going to capture
*** [scale] Exporting mp_image_t, 640x480x16bpp YUV packed, 614400 bytes
*** [crop] Allocating mp_image_t, 640x480x16bpp BGR packed, 614400 bytes
*** [vo] Exporting mp_image_t, 640x420x16bpp BGR packed, 537600 bytes
Unicode font: 4929 glyphs.
Webcam (25fps, 50% CPU):
MPlayer 1.0rc2-4.3.2-DFSG-free (C) 2000-2007 MPlayer Team
CPU: Geode(TM) Integrated Processor by AMD PCS (Family: 5, Model: 10,
Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled with runtime CPU detection.
get_path('codecs.conf') -> '/home/omni/.mplayer/codecs.conf'
Reading /home/omni/.mplayer/codecs.conf: Can't open
'/home/omni/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: Can't open '/etc/mplayer/codecs.conf': No
such file or directory
Using built-in default codecs.conf.
Configuration: --prefix=/usr --confdir=/etc/mplayer --
datadir=/usr/share/mplayer --codecsdir=/usr/lib/codecs --enable-xvmc --
enable-sdl --enable-ossaudio --enable-lirc --enable-gui --enable-freetype --
enable-menu --enable-largefiles --disable-bitmap-font --disable-ggi --
disable-xvid --language=all --disable-xmms --disable-arts --disable-aa --
disable-mad --disable-libdv --enable-libavutil_so --enable-libavcodec_so --
enable-libavformat_so --enable-libpostproc_so --disable-faad-internal --
enable-faad-external --target=i586-linux --enable-win32dll --enable-real --
enable-xanim --enable-runtime-cpudetection --disable-libdvdcss-internal --
enable-dvdread --disable-mencoder --enable-debug --enable-tv-v4l2 --enable-
xmga --enable-mga --enable-3dfx --enable-tdfxfb --enable-fbdev
CommandLine: '-vo' 'fbdev' 'tv://' '-tv' 'driver=v4l2:device=/dev/video0' '-
vf' 'crop=640:420' '-v'
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/omni/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/home/omni/.mplayer/input.conf'
Can't open input config file /home/omni/.mplayer/input.conf: No such file or
directory
Can't open input config file /etc/mplayer/input.conf: No such file or
directory
Falling back on default (hardcoded) input config
Setting up LIRC support...
get_path('.conf') -> '/home/omni/.mplayer/.conf'
Playing tv://.
get_path('sub/') -> '/home/omni/.mplayer/sub/'
STREAM: [tv] tv://
STREAM: Description: TV Input
STREAM: Author: Benjamin Zores, Albeu
STREAM: Comment:
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 ;-)
Selected device: UVC Camera (046d:0990)
Capabilites: video capture streaming
supported norms:
inputs: 0 = Camera 1;
Current input: 0
Format MJPEG ( 0 bits, MJPEG): Unknown 0x47504a4d
Format YUYV (16 bits, YUV 4:2:2 (YUYV)): Packed YUY2
Current format: MJPEG
v4l2: set format: YVU420
v4l2: set format: YUV420
v4l2: set format: UYVY
v4l2: set format: YUYV
v4l2: set input: 0
Selected norm : pal
==> Found video stream: 0
v4l2: get format: YUYV
v4l2: get fps: nan
v4l2: get width: 640
v4l2: get height: 480
Using a ring buffer for maximum 2 frames, 1 MB total size.
v4l2: set Brightness: 128 [0, 255]
v4l2: set Saturation: 32 [0, 255]
v4l2: set Contrast: 32 [0, 255]
[V] filefmt:9 fourcc:0x32595559 size:640x480 fps: nan ftime:= nan
get_path('sub/') -> '/home/omni/.mplayer/sub/'
using /dev/fb0
Opening video filter: [crop w=640 h=420]
Crop: 640 x 420, -1 ; -1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Packed YUY2)
Trying filter chain: crop vo
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale crop vo
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (640x480->640x480,flags=0,'MPlayer',0x32595559)
REQ: flags=0x403 req=0x0
REQ: flags=0x403 req=0x400
VO: [fbdev] 640x420 => 640x420 BGR 16-bit
VO: Description: Framebuffer Device
VO: Author: Szabolcs Berecz <szabi at inf.elte.hu>
var info:
xres: 640
yres: 480
xres_virtual: 640
yres_virtual: 480
xoffset: 0
yoffset: 0
bits_per_pixel: 16
grayscale: 0
red: 11 5 0
green: 5 6 0
blue: 0 5 0
transp: 0 0 0
nonstd: 0
fix info:
framebuffer size: 8388608 bytes
type: 0
type_aux: 0
visual: 2
line_length: 1280 bytes
fb_bpp: 16
fb_pixel_size: 2 bytes
other:
in_width: 640
in_height: 420
out_width: 640
out_height: 420
first_row: 0
last_row: 420
pixel per line: 640
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Audio: no sound
Freeing 0 unused audio chunks.
Starting playback...
v4l2: going to capture
*** [scale] Exporting mp_image_t, 640x480x16bpp YUV packed, 614400 bytes
*** [crop] Allocating mp_image_t, 640x480x16bpp BGR packed, 614400 bytes
*** [vo] Exporting mp_image_t, 640x420x16bpp BGR packed, 537600 bytes
Unicode font: 4929 glyphs.
More information about the MPlayer-users
mailing list