В драйвере openchrome существует поддержка аппаратного декодирования MPEG2. Патч для mplayer'а я брал отсюда: http://wiki.openchrome.org/pipermail/openchrome-users/2007-November/003728.html Проверял на VIA EPIA SP8000: mplayer-1.0-alt35.25029.1 ffmpeg-11006-alt1 xorg-x11-drv-openchrome-0.2.900-alt0.svn420 xorg-x11-server-1.4-alt8 Патч разделил на 2 части: для mplayer и для ffmpeg. Обе части патча и diff'ы на spec'и прилагаются (собирать mplayer с внутренней ffmpeg даже не пробовал). Steps to Reproduce: 1. Запустить X с драйвером openchrome (например, на VIA EPIA SP) 2. mplayer -vo xvmc -vc ffmpeg12mc any_MPEG2_video.mpg Actual Results: Не показывает видео с сообщениями: Cannot find codec 'mpegvideo_xvmc' in libavcodec... VDecoder init failed :( Cannot find codec matching selected -vo and video format 0x10000002. Expected Results: Показывает видео с небольшим использованием CPU (5..20% на VIA EPIA SP8000): [VD_FFMPEG] XVMC accelerated codec. Selected video codec: [ffmpeg12mc] vfm: ffmpeg (FFmpeg MPEG-1/2 (XvMC)) ... [VD_FFMPEG] XVMC-VLD-accelerated MPEG-2. [VD_FFMPEG] Trying pixfmt=0. VDec: vo config request - 720 x 576 (preferred colorspace: MPEG1/2 Motion Compensation and VLD) VDec: using MPEG1/2 Motion Compensation and VLD as output csp (no 0) Movie-Aspect is 1,78:1 - prescaling to correct movie aspect. VO: [xvmc] 720x576 => 1024x576 MPEG1/2 Motion Compensation and VLD vo_xvmc: Port 68 grabed vo_xvmc: Found matching surface with id=32315659 on 68 port at 0 adapter vo_xvmc: Allocated Direct Context vo_xvmc: Motion Compensation context allocated - 8 surfaces vo_xvmc: idct=0 unsigned_intra=0 vo_xvmc: looking for OSD support Subpicture id 0x34344149 vo_xvmc: OSD support by backend rendering (fast) vo_xvmc: Please send feedback to confirm that it works,otherwise send bugreport!
Created attachment 2275 [details] "mplayer" part of openchrome XvMC VLD patch
Created attachment 2276 [details] mplayer spec patch for openchrome XvMC VLD
Created attachment 2277 [details] Revert VLD changes
Created attachment 2278 [details] "ffmpeg" part of openchrome XvMC VLD patch
Created attachment 2279 [details] ffmpeg spec patch for openchrome XvMC VLD
(In reply to comment #0) > В драйвере openchrome существует поддержка аппаратного декодирования MPEG2. Существующая в mplayer поддержка не работает? Если нет - попробуйте ffmpeg из Daedalus - в этой сборке эта поддержка тоже включена.
mplayer-1.0-alt35.25029.1 из Sisyphus ffmpeg-0.5.0-alt0.11004.1 из Daedalus Не работает: [VD_FFMPEG] XVMC accelerated codec. Selected video codec: [ffmpeg12mc] vfm: ffmpeg (FFmpeg MPEG-1/2 (XvMC)) ... [VD_FFMPEG] XVMC-accelerated MPEG-2. [VD_FFMPEG] Trying pixfmt=0. VDec: vo config request - 720 x 576 (preferred colorspace: MPEG1/2 Motion Compensation and IDCT) Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] The selected video_out device is incompatible with this codec. Try appending the scale filter to your filter list, e.g. -vf spp,scale instead of -vf spp. [VD_FFMPEG] Trying pixfmt=1. VDec: vo config request - 720 x 576 (preferred colorspace: MPEG1/2 Motion Compensation) Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] The selected video_out device is incompatible with this codec. Try appending the scale filter to your filter list, e.g. -vf spp,scale instead of -vf spp. [VD_FFMPEG] Trying pixfmt=2. VDec: vo config request - 720 x 576 (preferred colorspace: MPEG1/2 Motion Compensation and VLD) VDec: using MPEG1/2 Motion Compensation and VLD as output csp (no 0) Movie-Aspect is 1,78:1 - prescaling to correct movie aspect. VO: [xvmc] 720x576 => 1024x576 MPEG1/2 Motion Compensation and VLD vo_xvmc: Port 68 grabed vo_xvmc: Found matching surface with id=32315659 on 68 port at 0 adapter vo_xvmc: Allocated Direct Context vo_xvmc: Motion Compensation context allocated - 8 surfaces vo_xvmc: idct=0 unsigned_intra=0 vo_xvmc: looking for OSD support Subpicture id 0x34344149 vo_xvmc: OSD support by backend rendering (fast) vo_xvmc: Please send feedback to confirm that it works,otherwise send bugreport! MPlayer interrupted by signal 11 in module: decode_video - MPlayer crashed by bad usage of CPU/FPU/RAM. Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash. - MPlayer crashed. This shouldn't happen. It can be a bug in the MPlayer code _or_ in your drivers _or_ in your gcc version. If you think it's MPlayer's fault, please read DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and won't help unless you provide this information when reporting a possible bug.
Похоже, здесь достаточно старая версия патча: > mplayer-1.0-alt35.25029.1 из Sisyphus > ffmpeg-0.5.0-alt0.11004.1 из Daedalus Вот "новая и новейшая история": http://wiki.openchrome.org/pipermail/openchrome-users/2007-July/003365.html http://wiki.openchrome.org/pipermail/openchrome-users/2007-August/003453.html http://wiki.openchrome.org/pipermail/openchrome-users/2007-October/003649.html http://wiki.openchrome.org/pipermail/openchrome-users/2007-November/003728.html
Для нового mplayer-1.0-alt35.25487.1 можно использовать тот же самый XvMC VLD патч. Новый патч на spec прикрепил. Проверено: работает на VIA EPIA SP8000 (с ffmpeg-11199-alt3 из Сизифа).
Created attachment 2335 [details] Spec патч для mplayer-1.0-alt35.25487.1
Created attachment 2338 [details] Spec патч для mplayer-1.0-alt35.25498.1 Опять-таки работает с прежним XvMC VLD патчем.
(In reply to comment #11) Посмотрите на mplayer+ffmpeg в Daedalus. В Сизиф не выкладывал, потому как ffmpeg там слишком старый для текущего Mplayer.
> (In reply to comment #11) mplayer-1.0-alt35.25844.1 из Daedalus ffmpeg-0.5.0-alt0.11604.1 из Daedalus Не работает. либо так: 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 Could not open codec. VDecoder init failed :( Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough VDec: vo config request - 720 x 480 (preferred colorspace: Mpeg PES) Trying filter chain: 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 vo The selected video_out device is incompatible with this codec. Try appending the scale filter to your filter list, e.g. -vf spp,scale instead of -vf spp. VDecoder init failed :( Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2)) ... VDec: vo config request - 720 x 480 (preferred colorspace: Planar YV12) Trying filter chain: 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 vo The selected video_out device is incompatible with this codec. Try appending the scale filter to your filter list, e.g. -vf spp,scale instead of -vf spp. FATAL: Could not initialize video filters (-vf) or video output (-vo). либо так: 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 Could not open codec. VDecoder init failed :( Cannot find codec matching selected -vo and video format 0x10000002. ... Video: no video
Патч на последних сборках не проверял, почти наверняка надо будет что-то менять. Пока не готова новая версия патча, предложил убрать его и из ffmpeg (#13453).
в mplayer патч тоже выкинут. сейчас даже файлов нет, которые патчились. -vo xvmc в спеке включен, интересно работает, нет.