VirtualBox

16 年 前 建立

16 年 前 結束

#3531 closed defect (worksforme)

Linux host mplayer does not work properly whille Windows XP Guest is running

回報者: Jim Heck 負責人:
元件: other 版本: VirtualBox 2.1.2
關鍵字: mplayer 副本: jsurf@…
Guest type: Windows Host type: Linux

描述

When I have a Windows XP guest OS booted and running under VirtualBox, I have been unable to use mplayer to playback various types of .avi files (mostly MPEG4s). Mplayer launches, but the video remains frozen on the first frame. If I shutdown the VM (which is running WinXP), I can play the video just fine (no reboot is necessary, it just works whenever the VM isn't running). I have verified this behavior over several weeks and across multiple reboots of both the host machine and the VM.

I am launching mplayer on the host sustem under MythTV using the following command line mplayer -fs -zoom -quiet -vo xv %s

The %s is expanded by MythTV to the filename I'm trying to watch

An interesting thing to note is that MythTV's playback of MPEG2 video (using its internal interfaces, not mplayer) work just fine with the Windows XP VM running.

Here is some more information on my system:

Host: Ubuntu 8.04 Hardy Heron

$ uname -a Linux heckmedia 2.6.24-23-generic #1 SMP Thu Nov 27 18:13:46 UTC 2008 x86_64 GNU/Linux

$ mplayer MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team CPU: Dual Core AMD Opteron(tm) Processor 170 (Family: 15, Model: 35, Stepping: 2) CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1 Compiled with runtime CPU detection.

Virtual Machine: Windows XP w/ SP2

附加檔案 (3)

mplayer_broke.log (277.1 KB ) - 16 年 前, 由 Jim Heck 新增
Mplayer strace output with VirtualBox running WindowsXP
mplayer_works.log.1 (193.8 KB ) - 16 年 前, 由 Jim Heck 新增
Mplayer strace output with VirtualBox image halted (part 1)
mplayer_works.log.2 (259.1 KB ) - 16 年 前, 由 Jim Heck 新增
Mplayer strace output with VirtualBox image halted (part 2)

下載所有附檔: .zip

更動歷史 (8)

comment:1 16 年 前Jim Heck 編輯

I upgraded to VirtualBox 2.1.4, and this behavior is still present.

I've also noticed stuttering of MPEG2 playback under MythTV after having run VirtualBox. This occurs even after the virtual machine is closed. There is little to no load on my system when this occurs. I have gotten it to resolve by fully closing the VirutalBox manager application. I'm not sure if this is related, but it seems suspicious.

16 年 前Jim Heck 編輯

附檔: 新增 mplayer_broke.log

Mplayer strace output with VirtualBox running WindowsXP

comment:2 16 年 前Jim Heck 編輯

I upgraded to VirtualBox 2.2.2, and the behavior is still present. Note I do not have 3D acceleration checked. I also verified that the bug occurs outside of MythTV, when just running the command

mplayer -fs -zoom -quiet -vo xv <filename>

With this bug, Virtualbox is virtually useless on a media PC for running Windows in the background. In the hopes of facilitating progress, I'm including two strace logs I obtained. using the above mplayer command. The first mplayer_broke.log was taken when VirtualBox is running. Mplayer starts, but freezes at the first video frame. The second mplayer_works.log was taken directly after stopping the virtual machine running WindowsXP. Here Mplayer starts and plays the video file correctly (does not freeze).

16 年 前Jim Heck 編輯

附檔: 新增 mplayer_works.log.1

Mplayer strace output with VirtualBox image halted (part 1)

16 年 前Jim Heck 編輯

附檔: 新增 mplayer_works.log.2

Mplayer strace output with VirtualBox image halted (part 2)

comment:3 16 年 前Frank Mehnert 編輯

All this sounds to me like mplayer is not able to write to the ALSA stream. If your VM has ALSA enabled, it will use the ALSA PCM_out channel and mplayer will block until the channel is released by VBox. Can you confirm that you are using ALSA for mplayer output and for VBox as well? An interesting test would be if mplayer runs in parallel to VBox if you pass the -nsound switch to mplayer.

回覆:  3 comment:4 16 年 前Jim Heck 編輯

Replying to frank:

All this sounds to me like mplayer is not able to write to the ALSA stream. If your VM has ALSA enabled, it will use the ALSA PCM_out channel and mplayer will block until the channel is released by VBox.

BINGO!!!!

I tried mplayer as you suggested with the -nosound option. This worked just fine, the video started playing instead of freezing. I then tried launching the VM with the NULL sound device instead of the ALSA device configured, and then I was able to play the video just fine and I had sound.

Thank you very much. I guess this begs the question of how to share the ALSA driver between the VM and other apps, like MPLAYER, but I'm happy currently with launching the VM with the NULL sound device so it can run in the background and I can still use the Media PC for what it was intended.

comment:5 16 年 前Frank Mehnert 編輯

狀態: newclosed
處理結果: worksforme

I suggest you to use the pulseaudio backend for both mplayer and VBox, this allows you to mix both audio sources.

注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette