LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1805|回复: 7

[已解决]mplayer 播放视频死机的问题

[复制链接]
发表于 2009-4-28 22:06:27 | 显示全部楼层 |阅读模式
半个月前执行过 emerge -uDN world 后出现问题,mplayer 播放任何视频都会立刻死机。

mplayer 和 内核 我都换了好几个版本试过,都一样。

相关信息:
mplayer 版本:1.0_rc2_p20090322
系统信息:Linux gentoo 2.6.25-gentoo-r9 #1 SMP Fri Nov 14 13:59:11 CST 2008 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux
xorg-x11版本:7.4

mplayer的use:

  1. X a52 aac alsa amrnb amrwb ass cddb cdio dira
  2. c doc dts dv dvd dvdnav enca encode esd faac faad gif iconv jpeg kernel_linux live mad mmx mp2 mp3 nemesi network
  3. opengl png quicktime rar real rtc schroedinger sdl speex theora tremor truetype unicode vorbis win32codecs x264
  4. xscreensaver xv xvid
复制代码


从终端打开mplayer 时的输出:

  1. MPlayer 29040-4.1.2 (C) 2000-2009 MPlayer Team
  2. CPU vendor name: GenuineIntel  max cpuid level: 2
  3. CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (Family: 15, Model: 2, Stepping: 9)
  4. extended cpuid-level: 4
  5. Detected cache-line size is 64 bytes
  6. Testing OS support for SSE... yes.
  7. Tests of OS support for SSE passed.
  8. CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSSE3: 0
  9. 编译时针对 x86 CPU 扩展指令集优化: MMX MMX2 SSE SSE2 CMOV
  10. get_path('codecs.conf') -> '/home/gentoo/.mplayer/codecs.conf'
  11. 读取 /home/gentoo/.mplayer/codecs.conf: 打不开 '/home/gentoo/.mplayer/codecs.conf': No such file or directory
  12. 读取 /etc/mplayer/codecs.conf: 打不开 '/etc/mplayer/codecs.conf': No such file or directory
  13. 使用内建默认的 codecs.conf 文件。
  14. Configuration: --cc=i686-pc-linux-gnu-gcc --host-cc=i686-pc-linux-gnu-gcc --prefix=/usr --confdir=/etc/mplayer --datadir=/usr/share/mplayer --libdir=/usr/lib --enable-menu --enable-network --disable-fribidi --disable-ftp --disable-inet6 --disable-lirc --disable-lircc --disable-smb --disable-joystick --disable-cdparanoia --charset=UTF-8 --disable-tv-bsdbt848 --disable-ivtv --disable-tv --disable-tv-v4l1 --disable-tv-v4l2 --disable-radio --disable-radio-v4l2 --disable-radio-bsdbt848 --disable-dvb --disable-dvbhead --disable-tv-teletext --disable-v4l2 --disable-pvr --disable-liba52 --disable-liblzo --disable-mng --disable-musepack --disable-pnm --disable-tga --disable-xanim --realcodecsdir=/opt/RealPlayer/codecs --disable-directfb --disable-ggi --disable-md5sum --disable-xinerama --disable-aa --disable-dga1 --disable-dga2 --disable-fbdev --disable-caca --disable-vesa --disable-vdpau --disable-vidix --disable-vidix-pcidb --disable-zr --disable-dxr3 --disable-gui --disable-xvmc --disable-3dfx --disable-tdfxvid --disable-tdfxfb --disable-arts --disable-jack --disable-ladspa --disable-nas --disable-openal --disable-pulse --disable-ossaudio --enable-debug=3 --disable-altivec
  15. 命令行: 'ploneintro.avi' '-loop' '0' '-msglevel' 'all=6'
  16. init_freetype
  17. Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
  18. get_path('fonts') -> '/home/gentoo/.mplayer/fonts'
  19. Using nanosleep() timing
  20. get_path('input.conf') -> '/home/gentoo/.mplayer/input.conf'
  21. Can't open input config file /home/gentoo/.mplayer/input.conf: No such file or directory
  22. Can't open input config file /etc/mplayer/input.conf: No such file or directory
  23. Falling back on default (hardcoded) input config
  24. get_path('ploneintro.avi.conf') -> '/home/gentoo/.mplayer/ploneintro.avi.conf'

  25. 正在播放 ploneintro.avi。
  26. get_path('sub/') -> '/home/gentoo/.mplayer/sub/'
  27. [file] File size is 25332742 bytes
  28. STREAM: [file] ploneintro.avi
  29. STREAM: Description: File
  30. STREAM: Author: Albeu
  31. STREAM: Comment: based on the code from ??? (probably Arpi)
  32. LAVF_check: AVI format
  33. 检测到 AVI 文件格式。
  34. list_end=0x146
  35. ======= AVI Header =======
  36. us/frame: 35001  (fps=28.571)
  37. max bytes/sec: 0
  38. padding: 0
  39. MainAVIHeader.dwFlags: (16) HAS_INDEX
  40. frames  total: 19014   initial: 0
  41. streams: 2
  42. Suggested BufferSize: 0
  43. Size:  640 x 480
  44. ==========================
  45. list_end=0xD4
  46. ==> 找到视频流: 0
  47. [aviheader] 找到视频流,-vid 0
  48. ====== STREAM Header =====
  49. Type: vids   FCC: DIVX (58564944)
  50. Flags: 0
  51. Priority: 0   Language: 0
  52. InitialFrames: 0
  53. Rate: 28571/1000 = 28.571
  54. Start: 0   Len: 19014
  55. Suggested BufferSize: 120936
  56. Quality -1
  57. Sample size: 0
  58. ==========================
  59. 找到 'bih', 40 字节的 40
  60. ======= VIDEO Format ======
  61.   biSize 40
  62.   biWidth 640
  63.   biHeight 480
  64.   biPlanes 1
  65.   biBitCount 24
  66.   biCompression 808802372='DX50'
  67.   biSizeImage 921600
  68. ===========================
  69. 为 MPEG4 视频重新生成关键帧表。
  70. list_end=0x146
  71. ==> 找到音频流: 1
  72. [aviheader] 找到音频流,-aid 1
  73. ====== STREAM Header =====
  74. Type: auds   FCC:  (0)
  75. Flags: 0
  76. Priority: 0   Language: 0
  77. InitialFrames: 1
  78. Rate: 8000/1 = 8000.000
  79. Start: 0   Len: 5322960
  80. Suggested BufferSize: 4000
  81. Quality -1
  82. Sample size: 1
  83. ==========================
  84. 找到 'wf', 30 字节的 18
  85. ======= WAVE Format =======
  86. Format Tag: 85 (0x55)
  87. Channels: 1
  88. Samplerate: 44100
  89. avg byte/sec: 8000
  90. Block align: 1
  91. bits/sample: 0
  92. cbSize: 12
  93. mp3.wID=1
  94. mp3.fdwFlags=0x0
  95. mp3.nBlockSize=419
  96. mp3.nFramesPerBlock=1
  97. mp3.nCodecDelay=1393
  98. ==========================================================================
  99. list_end=0x179444E
  100. 在 0x200C - 0x179444E 找到电影
  101. 正在读 INDEX 块, 38011 区块的 19014 帧 (fpos=24724566)。
  102. AVI index offset: 0x2008 (movi=0x200C idx0=0x4 idx1=0xFAC)
  103. Auto-selected AVI audio ID = 1
  104. Auto-selected AVI video ID = 0
  105. AVI: Searching for audio stream (id:1)
  106. AVI video size=19074489 (19014) audio size=5322960 (5322960)
  107. VIDEO:  [DX50]  640x480  24bpp  28.571 fps  229.3 kbps (28.0 kbyte/s)
  108. Auto-selected AVI audio ID = 1
  109. [V] 文件格式:3  fourcc:0x30355844  大小:640x480  帧速:28.571  帧时间:=0.0350
  110. get_path('sub/') -> '/home/gentoo/.mplayer/sub/'
  111. X11 opening display: :0.0
  112. vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
  113. vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0.0" => local display)
  114. [x11] Detected wm supports layers.
  115. [x11] Using workaround for Metacity bugs.
  116. [x11] Detected wm supports NetWM.
  117. [x11] Detected wm supports ABOVE state.
  118. [x11] Detected wm supports BELOW state.
  119. [x11] Detected wm supports FULLSCREEN state.
  120. [x11] Current fstype setting honours FULLSCREEN ABOVE BELOW X atoms
  121. [VO_XV] Using Xv Adapter #0 (Intel(R) Video Overlay)
  122. [xv common] Drawing colorkey manually.
  123. [xv common] Using colorkey from Xv (0x0101fe).
  124. [xv common] Maximum source image dimensions: 1920x1088
  125. ==========================================================================
  126. 打开视频解码器: [ffmpeg] FFmpeg's libavcodec codec family
  127. INFO: libavcodec init OK!
  128. 已选视频编解码器: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
  129. ==========================================================================
  130. ==========================================================================
  131. 打开音频解码器: [mp3lib] MPEG layer-2, layer-3
  132. dec_audio: 为输出缓冲分配 4608 + 65536 = 70144 字节。
  133. mp3lib: using SSE optimized decore!
  134. MP3lib: init layer2&3 finished, tables done
  135. MPEG 1.0, Layer III, 44100 Hz 64 kbit Single-Channel, BPF: 209
  136. Channels: 1, copyright: No, original: No, CRC: No, emphasis: 0
  137. AUDIO: 44100 Hz, 2 ch, s16le, 64.0 kbit/4.54% (ratio: 8000->176400)
  138. 已选音频编解码器: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
  139. ==========================================================================
  140. 为 44100Hz/2ch/s16le -> 0Hz/0ch/?? 建造音频过滤链...
  141. [libaf] Adding filter dummy
  142. [dummy] Was reinitialized: 44100Hz/2ch/s16le
  143. [dummy] Was reinitialized: 44100Hz/2ch/s16le
  144. 尝试每个已知的音频驱动……
  145. alsa-init: requested format: 44100 Hz, 2 channels, 9
  146. alsa-init: using ALSA 1.0.19
  147. alsa-init: setup for 1/2 channel(s)
  148. alsa-init: using device default
  149. alsa-init: pcm opened in blocking mode
  150. alsa-init: chunksize set to 1024
  151. alsa-init: fragcount=8
  152. alsa-init: got buffersize=32768
  153. alsa-init: got period size 1024
  154. alsa: 48000 Hz/2 channels/4 bpf/32768 bytes buffer/Signed 16 bit Little Endian
  155. AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
  156. AO: Description: ALSA-0.9.x-1.x audio output
  157. AO: Author: Alex Beregszaszi, Zsolt Barat <joy@streamminister.de>
  158. AO: Comment: under developement
  159. 为 44100Hz/2ch/s16le -> 48000Hz/2ch/s16le 建造音频过滤链...
  160. [dummy] Was reinitialized: 44100Hz/2ch/s16le
  161. [libaf] Adding filter lavcresample
  162. [dummy] Was reinitialized: 48000Hz/2ch/s16le
  163. [dummy] Was reinitialized: 48000Hz/2ch/s16le
  164. 开始播放...
  165. [libaf] Reallocating memory in module lavcresample, old len = 0, new len = 34974
  166. Increasing filtered audio buffer size from 0 to 34932
  167. [mpeg4 @ 0x8680980]Invalid and inefficient vfw-avi packed B frames detected
  168. [ffmpeg] aspect_ratio: 1.333333
  169. VDec: vo 配置请求 - 640 x 480 (色彩空间首选项: Planar YV12)
  170. Trying filter chain: vo
  171. VDec: 使用 Planar YV12 作为输出 csp (没有 0)
  172. 电影宽高比为 1.33:1 - 预放大到正确的电影宽高比。
  173. VO Config (640x480->640x480,flags=0,'MPlayer',0x32315659)
  174. VO: [xv] 640x480 => 640x480 Planar YV12
  175. VO: Description: X11/Xv
  176. VO: Author: Gerd Knorr <kraxel@goldbach.in-berlin.de> and others
  177. Xvideo image format: 0x32595559 (YUY2) packed
  178. Xvideo image format: 0x32315659 (YV12) planar
  179. Xvideo image format: 0x30323449 (I420) planar
  180. Xvideo image format: 0x59565955 (UYVY) packed
  181. Xvideo image format: 0x434d5658 (XVMC) planar
  182. using Xvideo port 89 for hw scaling
  183. *** [vo] Allocating (slices) mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
  184. A:   0.2 V:   0.0 A-V:  0.171 ct:  0.000   1/  1 ??% ??% ??,?% 0 0 [J Increasing filtered audio buffer size from 34932 to 34972
  185. XXX initial  v_pts=0.000  a_pos=4000 (0.500)
  186. *** [vo] Allocating (slices) mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
  187. Unicode font: 29057 glyphs.
  188. Unicode font: 29057 glyphs.
  189. A:   0.3 V:   0.0 A-V:  0.259 ct:  0.000   2/  2 ??% ??% ??,?% 1 0 [J X11 error: BadAlloc (insufficient resources for operation)
  190. Type: 0, display: 0x8b49ab8, resourceid: 2800006, serial: 61
  191. Error code: b, request code: 8f, minor code: 13
  192. A:   0.4 V:   0.1 A-V:  0.313 ct:  0.000   3/  3 ??% ??% ??,?% 2 0 [J A:   0.4 V:   0.1 A-V:  0.280 ct:  0.000   4/  4 ??% ??% ??,?% 3 0 [J A:   0.4 V:   0.1 A-V:  0.246 ct:  0.000   5/  5 ??% ??% ??,?% 4 0 [J A:   0.4 V:   0.2 A-V:  0.212 ct:  0.000   6/  6 ??% ??% ??,?% 4 0 [J A:   0.4 V:   0.2 A-V:  0.178 ct:  0.000   7/  7 ??% ??% ??,?% 5 0 [J A:   0.4 V:   0.2 A-V:  0.144 ct:  0.000   8/  8 ??% ??% ??,?% 6 0 [J A:   0.4 V:   0.3 A-V:  0.110 ct:  0.000   9/  9 ??% ??% ??,?% 6 0 [J A:   0.4 V:   0.3 A-V:  0.076 ct:  0.000  10/ 10 ??% ??% ??,?% 6 0 [J A:   0.4 V:   0.4 A-V:  0.042 ct:  0.000  11/ 11 ??% ??% ??,?% 6 0 [J A:   0.5 V:   0.4 A-V:  0.089 ct:  0.004  12/ 12 ??% ??% ??,?% 6 0 [J A:   0.5 V:   0.4 A-V:  0.056 ct:  0.003  13/ 13 ??% ??% ??,?% 6 0 [J A:   0.5 V:   0.5 A-V:  0.022 ct:  0.003  14/ 14 ??% ??% ??,?% 6 0 [J

  193. MPlayer 被 1 信号中断(位于 sleep_timer 模块)
  194. - MPlayer 崩溃了。这不应该发生。
  195.   这可能是 MPlayer 或者 你的驱动中 或者 你的 gcc 版本中的一个缺陷。
  196.   如你觉得这是 MPlayer 的问题,请阅读 DOCS/zh/bugreports.html
  197.   并遵循其中的指示去做。除非你在报告一个潜在的缺陷时候提供我们
  198.   所需要的信息,否则我们不能也不会帮助你。


复制代码


xorg-conf 内容:

  1. Section "ServerLayout"
  2.     Identifier     "X.org Configured"
  3.     Screen      0  "Screen0" 0 0
  4.     InputDevice    "Mouse0" "CorePointer"
  5.     InputDevice    "Keyboard0" "CoreKeyboard"
  6. EndSection

  7. Section "Files"
  8.     FontPath     "/usr/share/fonts/misc/"
  9.     FontPath     "/usr/share/fonts/TTF/"
  10.     FontPath     "/usr/share/fonts/OTF"
  11.     FontPath     "/usr/share/fonts/Type1/"
  12.     FontPath     "/usr/share/fonts/100dpi/"
  13.     FontPath     "/usr/share/fonts/75dpi/"
  14. EndSection

  15. Section "Module"
  16.     Load  "record"
  17.     Load  "glx"
  18.     Load  "dri"
  19.     Load  "xtrap"
  20.     Load  "extmod"
  21.     Load  "dbe"
  22.     Load  "freetype"
  23. EndSection

  24. Section "dri"
  25.   Mode 0666
  26. EndSection

  27. Section "Extensions"
  28.     Option  "Composite"  "Enable"
  29. EndSection

  30. Section "InputDevice"
  31.     Identifier  "Keyboard0"
  32.     Driver      "kbd"
  33. EndSection

  34. Section "InputDevice"
  35.     Identifier  "Mouse0"
  36.     Driver      "mouse"
  37.     Option        "Protocol" "auto"
  38.     Option        "Device" "/dev/input/mice"
  39.     Option        "ZAxisMapping" "4 5 6 7"
  40. EndSection

  41. Section "Monitor"
  42.     Identifier   "Monitor0"
  43.     VendorName   "Monitor Vendor"
  44.     ModelName    "Monitor Model"
  45. EndSection

  46. Section "Device"
  47.         ### Available Driver options are:-
  48.         ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
  49.         ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
  50.         ### [arg]: arg optional
  51.         #Option     "NoAccel"                # [<bool>]
  52.         #Option     "SWcursor"               # [<bool>]
  53.         #Option     "ColorKey"               # <i>
  54.         #Option     "CacheLines"             # <i>
  55.         #Option     "Dac6Bit"                # [<bool>]
  56.         #Option     "DRI"                    # [<bool>]
  57.         #Option     "NoDDC"                  # [<bool>]
  58.         #Option     "ShowCache"              # [<bool>]
  59.         #Option     "XvMCSurfaces"           # <i>
  60.         #Option     "PageFlip"               # [<bool>]
  61.     Identifier  "Card0"
  62.     Driver      "intel"
  63.     VendorName  "Unknown Vendor"
  64.     BoardName   "Unknown Board"
  65.     BusID       "PCI:0:2:0"
  66. EndSection

  67. Section "Screen"
  68.     Identifier "Screen0"
  69.     Device     "Card0"
  70.     Monitor    "Monitor0"
  71.     SubSection "Display"
  72.         Viewport   0 0
  73.         Depth     1
  74.     EndSubSection
  75.     SubSection "Display"
  76.         Viewport   0 0
  77.         Depth     4
  78.     EndSubSection
  79.     SubSection "Display"
  80.         Viewport   0 0
  81.         Depth     8
  82.     EndSubSection
  83.     SubSection "Display"
  84.         Viewport   0 0
  85.         Depth     15
  86.     EndSubSection
  87.     SubSection "Display"
  88.         Viewport   0 0
  89.         Depth     16
  90.     EndSubSection
  91.     SubSection "Display"
  92.         Viewport   0 0
  93.         Depth     24
  94.     EndSubSection
  95. EndSection
复制代码


请大家帮我分析一下是哪儿的问题,谢谢。
发表于 2009-5-6 10:03:30 | 显示全部楼层
intel的新驱动有问题。

xorg.conf里显卡段加上下面option
Option "AccelMethod" "EXA"
Option "MigrationHeuristic" "greedy"
Option "Tiling" "False"

另外MPlayer输出最好不要用xv,我选的gl,暂时没啥问题。

耐心等驱动更新。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-5-7 10:19:34 | 显示全部楼层
谢谢 rivr 的回复!

我按照你说的方法修改了配置文件,重启X后播放视频还是死机了。。

我现在正在重新编译 mplayer ,准备去掉 xv 的 USE 再试试。

另外,我在linux 上装了vmware , guest 系统为 xp,发现开启了 directdraw 加速后播放视频死机,禁用后则正常,视频可以正常播放,请问跟这个有关系吗?

我也估计和  xorg 的显卡配置有关,但对这个一点也不熟,所以只好求助了 ,谢谢!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-5-7 10:29:02 | 显示全部楼层
OK, 重新编译 mplayer 后已经可以播放,不再死机。

但还有个小问题,就是我让视频全屏的时候,画面并不会自动填充满整个屏幕,只在屏幕中间以原始分辨率显示,我试着注释掉


Option "MigrationHeuristic" "greedy"
Option "Tiling" "False"

但情况一样,请问这个是和mplayer 的 xv 有关吗??

谢谢!
回复 支持 反对

使用道具 举报

发表于 2009-5-7 10:42:25 | 显示全部楼层
Post by sandbird;1984367
OK, 重新编译 mplayer 后已经可以播放,不再死机。

但还有个小问题,就是我让视频全屏的时候,画面并不会自动填充满整个屏幕,只在屏幕中间以原始分辨率显示,我试着注释掉


Option "MigrationHeuristic" "greedy"
Option "Tiling" "False"

但情况一样,请问这个是和mplayer 的 xv 有关吗??

谢谢!


在 ~/.mplayer/config 中加入 zoom=yes 即可实现全屏了
驱动不能自动实现缩放就让 mplayer 来做缩放的工作
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-5-7 12:13:00 | 显示全部楼层
OK ,按兄台说的方法试了之后可以实现自动全屏。

播放视频的总是困扰了我N~~~~~~~~~久,到目前已经完美解决,非常感谢两位的帮助!
回复 支持 反对

使用道具 举报

发表于 2009-5-7 23:37:07 | 显示全部楼层
Post by yangfion171;1984372
在 ~/.mplayer/config 中加入 zoom=yes 即可实现全屏了
驱动不能自动实现缩放就让 mplayer 来做缩放的工作


俺这里怎么没有效果呢?

手动挺累的,因为纵向又不固定
mplayer -zoom -x 800 -y XXXX -vo fbdev2 foo.rm
回复 支持 反对

使用道具 举报

发表于 2010-4-3 14:52:48 | 显示全部楼层

我也碰到了类似问题 将video中由XV改成gl就好了

现在一切正常 mplayer真是好用阿
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表