[MPlayer-users] How can I stop mplayer from buffering my audio?
Stefan Thomas
moon at justmoon.de
Thu Nov 8 18:02:49 CET 2007
How here is how I got it working:
#!/bin/sh
# Path to sox
SOX=/usr/bin/sox
# V-Box devices
VBOX_AUDIO=/dev/dsp2
VBOX_VIDEO=/dev/video1
# Your regular sound card in ALSA
ALSA_OUTPUT=hw:0,0
start-stop-daemon --start --quiet --exec $SOX -- -r 48000 -w -c 2 -t
ossdsp $VBOX_AUDIO -t alsa $ALSA_OUTPUT -q &
gmplayer tv:// -tv
driver=v4l2:width=720:height=404:normid=0:input=1:device=$VBOX_VIDEO:noaudio
-vf crop=672:368:26:18 -nolirc -fs $*
start-stop-daemon --stop --quiet --exec $SOX
More info here:
http://mcentral.de/wiki/index.php/XCM/VboxWii#Step_4:_Adding_sound.21
Stefan Thomas schrieb:
> Ok, makes sense, but if I just remove those options I get no sound at
> all, because mplayer no longer even considers initializing any audio
> whatsoever.
>
> While mplayer is running in this way however I can enter this on a
> different console and I'll hear sound:
>
> arecord -f dat -D hw:2,0 | aplay
>
> So the snd_usb_audio device is outputting. It's just not getting routed
> to my sound card. Do you think a custom .asoundrc could fix that? Should
> I be asking on the ALSA mailing list?
>
> Cheers!
>
> Stefan
>
>
> Rich Felker schrieb:
>> On Thu, Nov 08, 2007 at 04:54:57AM +0000, Stefan Thomas wrote:
>>> I'm using this command to capture a stream from my Wii and display it:
>>>
>>> mplayer tv:// -tv
>>> driver=v4l2:width=720:height=404:input=1:device=/dev/video1:forceaudio:alsa:audiorate=48000:adevice=hw.2,0:immediatemode=0
>>>
>>> -ao alsa -vf crop=672:368:26:18 -nolirc -fs
>>>
>>> Unfortunately I get about one second of latency, which for playing games
>>> is a big problem.
>> Get rid of the immediatemode=0 and forceaudio option, and all
>> audio-related options. In TV mode, the audio is supposed to be looped
>> thru physically, not captured and played back. Capture and playback
>> will necessarily give unacceptable latency for gaming use.
>>
>> Rich
More information about the MPlayer-users
mailing list