[LUG.ro] mplayer con XVideo Motion Compensation

Janus lugro@lugro.org.ar
Sat, 8 Sep 2007 14:21:14 -0300


Buenas, el tema es el siguiente. Tengo una placa nvidia FX5500 con los
drivers propietarios, y leí por allí que el XVideo Motion Compensation
hace que al reproducir un video labure la placa y no el CPU. Por lo
tanto, quiero tratar de activarlo.
Lo primero que hice es poner en el archivo /etc/X11/XvMCConfig la
siguiente línea:
libXvMCNVIDIA_dynamic.so.1

cuando trato de ejecutar un video con xvmc, me tira este error:

$ mplayer -vo xvmc Journeyman.S01E01.Pilot.DVDSCR.XviD-SAiNTS.avi
MPlayer 2:1.0~rc1-0ubuntu9.1 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 44, Stepping: 2)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing Journeyman.S01E01.Pilot.DVDSCR.XviD-SAiNTS.avi.
AVI file format detected.
VIDEO:  [XVID]x352pp976 fps.9 kbps (117.4 kbyte/s)
Clip info:
 Software: Nandub v1.0rc2
vo_xvmc: X-Video extension 2.2
vo_xvmc: X-Video MotionCompensation Extension version 1.1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 640 x 352 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.

FATAL: Could not initialize video filters (-vf) or video output (-vo).

Exiting... (End of file)
---------------------------------------------

Noten en las líneas
vo_xvmc: X-Video extension 2.2
vo_xvmc: X-Video MotionCompensation Extension version 1.1
que el XvMC está levantando bien, traté con lo que dice ahí de agregar
-vf spp,scale y tira exactamente lo mismo. Por ahí encontré que había
que agregar -vc ffmpeg12mc, en ese caso tira esto:

$ mplayer -vo xvmc -vc ffmpeg12mc Journeyman.S01E01.Pilot.DVDSCR.XviD-SAiNTS.avi
MPlayer 2:1.0~rc1-0ubuntu9.1 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 44, Stepping: 2)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing Journeyman.S01E01.Pilot.DVDSCR.XviD-SAiNTS.avi.
AVI file format detected.
VIDEO:  [XVID]x352pp976 fps.9 kbps (117.4 kbyte/s)
Clip info:
 Software: Nandub v1.0rc2
vo_xvmc: X-Video extension 2.2
vo_xvmc: X-Video MotionCompensation Extension version 1.1
==========================================================================
Forced video codec: ffmpeg12mc
Cannot find codec matching selected -vo and video format 0x44495658.
Read DOCS/HTML/en/codecs.html!
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
Exiting... (Quit)
----------------------------------------------

y sólo escucho el audio... sin video. Noten en las líneas
Forced video codec: ffmpeg12mc
Cannot find codec matching selected -vo and video format 0x44495658.
que dice que hubo algún problema con el codec, entonces, como el video
que estaba tratando de reproducir es un xvid, lo tiré con -vc xvid,
pero hace lo mismo.

Probé con un MPEG2, y funca (horriblemente, intercala frames negros en
el medio, además, si giro el cubo en mi compiz-fusion, la peli queda
arriba en todo momento y no en la cara del cubo).
Esta fue la salida:

$ mplayer -vo xvmc -vc ffmpeg12mc LosSimpsons.mpg
MPlayer 2:1.0~rc1-0ubuntu9.1 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 44, Stepping: 2)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing LosSimpsons.mpg.
MPEG-PS file format detected.
VIDEO:  MPEG1x288  (aspect 8)000 fps6.4 kbps (159.6 kbyte/s)
vo_xvmc: X-Video extension 2.2
vo_xvmc: X-Video MotionCompensation Extension version 1.1
==========================================================================
Forced video codec: ffmpeg12mc
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[VD_FFMPEG] XVMC accelerated codec.
Selected video codec: [ffmpeg12mc] vfm: ffmpeg (FFmpeg MPEG-1/2 (XvMC))
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
==========================================================================
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
[VD_FFMPEG] XVMC-accelerated MPEG-2.
[VD_FFMPEG] Trying pixfmt=0.
VDec: vo config request - 352 x 288 (preferred colorspace: MPEG1/2
Motion Compensation and IDCT)
VDec: using MPEG1/2 Motion Compensation and IDCT as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [xvmc] 352x288 => 384x288 MPEG1/2 Motion Compensation and IDCT
vo_xvmc: Port 325 grabed
vo_xvmc: Found matching surface with id=54434449 on 325 port at 0 adapter
vo_xvmc: Allocated Direct Context
vo_xvmc: data_blocks allocated
vo_xvmc: mv_blocks allocated
vo_xvmc: Motion Compensation context allocated - 8 surfaces
vo_xvmc: idct=1 unsigned_intra=0
vo_xvmc: looking for OSD support
    Subpicture id 0x34344149
vo_xvmc: OSD support by additional frontend rendering
----------------------------

Lo de que quede por arriba del cubo, me suena a que el mplayer está
usando el xvmc, por lo tanto lo maneja la placa de video y el cubo no
¿habrá alguna forma de que el compiz use también XvMC?

Ideas?

Salu2
   Janus

PD: Como verán, no tengo la más puta idea sobre video

-- 
Alejandro Díaz-Caro
Homepage: http://www.fceia.unr.edu.ar/~diazcaro
Weblog: http://computacioncuantica.blogspot.com
---
Decile NO a la Matriculación: http://noalamatricula.wordpress.com/about