VLC 1.1.0 direct access to OSS and ALSA only captures noise

*nix specific usage questions
marc0
Blank Cone
Blank Cone
Posts: 11
Joined: 12 Jun 2009 12:12

VLC 1.1.0 direct access to OSS and ALSA only captures noise

Postby marc0 » 30 Jun 2009 11:30

Dear all,

I am trying to use the feature of direct oss and alsa access for encoding audio from the gnome desktop (for example, from a streaming inside firefox, playing perfectly in my headphones).
I have an Ubuntu 9.04 server machine and I have compiled ffmpeg and vlc from scratch, with most features enabled (and execution from root).

Code: Select all

root@AsusStreamer:/usr/local/vlc# uname -a Linux AsusStreamer 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC 2009 i686 GNU/Linux root@AsusStreamer:/usr/local/vlc# root@AsusStreamer:/usr/local/vlc# vlc --version VLC media player 1.1.0-git Goldeneye VLC version 1.1.0-git Goldeneye (1.0.0-rc1-744-gfa134b7)
Both alsa and oss modules have been successfully compiled (sorry for the output in Italian):

Code: Select all

root@AsusStreamer:/usr/local/vlc# vlc --list | grep alsa VLC media player 1.1.0-git Goldeneye alsa Uscita audio ALSA access_alsa Ingresso acquisizione audio ALSA root@AsusStreamer:/usr/local/vlc# vlc --list | grep oss VLC media player 1.1.0-git Goldeneye oss Uscita audio UNIX OSS access_oss Ingresso OSS
and i try to encode audio to an mp3 file with the following command (the same for oss://):

Code: Select all

./cvlc -vvv alsa:// --sout '#transcode{acodec=mp3,ab=128,channels=2}:duplicate{dst=std{access=file,mux=raw,dst='/root/test.mp3'}'
According with the output from vlc, everything seems to be ok, and the mp3 file is correctly created.
However, it only contains background noise.
I have tried to act on the Realtek ALC883 (OSS Mixer) and HDA ATI SB (ALSA Mixer), putting all volumes at the maximum, but the noise just plays louder...

Thank you in advance for any help,
best,
Marco

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Re: VLC 1.1.0 direct access to OSS and ALSA only captures noise

Postby xtophe » 30 Jun 2009 14:40

I think it's more a ALSA/OSS conf problem than a VLC problem.

By default ALSA will only have input device set as input. like microphone or line in. and depending of your distyro or your settings you need to make sure that they are not mute.


To record the output of other apps, you'll need to do some alsa plumbery and pipe the nornal output into some kind of virtual input. no idea howto do that. Alsa wiki or forum could have some pointer. Also looking for asoundrc or asoundconf could help

hth,
Xtophe

marc0
Blank Cone
Blank Cone
Posts: 11
Joined: 12 Jun 2009 12:12

Re: VLC 1.1.0 direct access to OSS and ALSA only captures noise

Postby marc0 » 14 Jul 2009 12:02

Thank you xtophe,

after many many attempts, it seems that the only solution is an hardware loop between the line out and the mic in (sigh!).
The software alternative could be something like this:

Code: Select all

arecord -f S16_LE -r48000 -c2 -D hw:0 -F0 --period-size=1024 -B0 --buffer-size=4096 | aplay -D hw:0 -
but, having only one sound card, the resource is then busy for vlc, so there is nothing to do.

Best,
Marco

morphemass
Blank Cone
Blank Cone
Posts: 20
Joined: 12 Nov 2008 21:38

Re: VLC 1.1.0 direct access to OSS and ALSA only captures noise

Postby morphemass » 14 Jul 2009 13:30

I'm having HUGE problems with VLCs new audio recording architecture so I have no idea if this will work but....why not set up pulseaudio to stream your speakers audio via RTP (I *think* its RTP, not at a linux box to look at it atm) and then use VLC (or any other recording application that can access the stream) to record the audio from that stream. Sorry, REALLY vague on detail here but that should work in theory......

BTW did you mean 1.1.0? I ALSO had an issue with version 1.0.0.1 where I had to use the syntax "vlc alsa://hw:0,0" to get my line in input.....be warned though, now I have the line-in input working vlc seems to always want to play it!


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 4 guests