[MPlayer-users] Can't get mplayer -tv to play back audio input

Christian Jaeger chrjae at gmail.com
Sat Nov 2 20:30:57 CET 2013


Thanks.

With some more time sunk into this, I've figured out how to make it play
sounds (I'm on a different computer with different video (now webcam) and
sound, so it's not hw related even):

mplayer -tv
'device=/dev/video0:driver=v4l2:alsa:adevice=hw.0,0:forceaudio:immediatemode=0'
tv://

*Both* forceaudio and immediatemode=0 is necessary. And the correct way to
give the device. (Insert cursing here.)

*But*, it doesn't play it properly, seems there's a sample rate mismatch
beween recording and playing.

Next attempt:

mplayer -tv
'device=/dev/video0:driver=v4l2:alsa:adevice=hw.0,0:forceaudio:immediatemode=0:audiorate=48000'
-srate 48000 tv://

Still not right.

 -srate 4000

shows that the -srate argument does have an effect, but it seems to be yet
on another level? Well not totally sure, will have to connect proper audio
instead of loopback effects.

Christian.



2013/11/2 Andy Furniss <adf.lists at gmail.com>

> Christian Jaeger wrote:
>
>> I'm trying to play (and later on record, using mencoder (?)) video from a
>> USB frame grabber device. The following shows video, but not audio. Why?
>>
>>    mplayer -tv 'device=/dev/video0:driver=v4l2:alsa:adevice=hw.0,0' -vf
>> kerndeint tv://
>>
>> I've connected my audio to the builtin audio, hw:0,0, and can confirm that
>>
>>    arecord -r 48000 -D hw:0,0 -f S16_LE -c 2|aplay
>>
>> plays back the audio. So, what's missing for mplayer?
>>
>> IIRC mplayer shows a line that says "no audio".
>>
>
> It would be best if you could post the complete output of mplayer -v ....
>
> FWIW years ago using mencoder this worked -
>
> audiorate=48000:alsa:adevice=hw.0
>
> Of course it's also worth running alsamixer to set levels/unmute if needed.
>
>


More information about the MPlayer-users mailing list