VirtualBox

Opened 15 years ago

Closed 15 years ago

#3531 closed defect (worksforme)

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

Reported by: Jim Heck Owned by:
Component: other Version: VirtualBox 2.1.2
Keywords: mplayer Cc: jsurf@…
Guest type: Windows Host type: Linux

Description

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

Attachments (3)

mplayer_broke.log (277.1 KB ) - added by Jim Heck 15 years ago.
Mplayer strace output with VirtualBox running WindowsXP
mplayer_works.log.1 (193.8 KB ) - added by Jim Heck 15 years ago.
Mplayer strace output with VirtualBox image halted (part 1)
mplayer_works.log.2 (259.1 KB ) - added by Jim Heck 15 years ago.
Mplayer strace output with VirtualBox image halted (part 2)

Download all attachments as: .zip

Change History (8)

comment:1 by Jim Heck, 15 years ago

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.

by Jim Heck, 15 years ago

Attachment: mplayer_broke.log added

Mplayer strace output with VirtualBox running WindowsXP

comment:2 by Jim Heck, 15 years ago

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).

by Jim Heck, 15 years ago

Attachment: mplayer_works.log.1 added

Mplayer strace output with VirtualBox image halted (part 1)

by Jim Heck, 15 years ago

Attachment: mplayer_works.log.2 added

Mplayer strace output with VirtualBox image halted (part 2)

comment:3 by Frank Mehnert, 15 years ago

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.

in reply to:  3 comment:4 by Jim Heck, 15 years ago

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 by Frank Mehnert, 15 years ago

Resolution: worksforme
Status: newclosed

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

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use