Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
VLC webcam streaming lacks audio [RESOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
kitsunenokenja
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2004
Posts: 131

PostPosted: Tue Sep 22, 2009 9:10 pm    Post subject: VLC webcam streaming lacks audio [RESOLVED] Reply with quote

I've been working on this for about three days, looking for information I need to know to figure out what the problem is. What I'm trying to do is use VLC to offer an audio/video feed of my mic and webcam as the quality this way is at the best it can be instead of relying on whatever Flash inherently uses. I already solved the first problem (I was using old-style device names like /dev/dsp1 instead of a proper ALSA name like hw:2,0 which I use now, and this works correctly.)

I can view the camera with VLC locally with the audio device specified and I can see just fine and the audio is outputted so I know the mic is being used. For some reason, when I try to use VLC with streaming, the result never has sound. I tried switching between H.264/MP3 and MP4 to see if the codec had something to do with it in the transcoding, but apparently not. To simplify testing I replaced streaming as RTP server with stream to a file, and when I play the file back mplayer reports it has no audio track at all.

Verbose output of VLC during the stream initialization didn't show anything unusual to me (unless I missed something) but most importantly it did list it was using the hw:2,0 ALSA device as expected so it's not a misconfiguration with that regard. (By the way, this is VLC 1.0.1.)

I've looked on these forums, VLC's forums, and in general on the net for info about this problem, which seems to spring up here and there but I can't find a solution or at least understand what the problem is.

Not sure what output or other info might be helpful to figure out this issue but I can post what need be if asked. If someone can help me figure out how to fix this, that'd be great. I'd really like to permanently abandon using Flash's inherent tool since the video quality is rubbish.
_________________
ProtonMail - Free encrypted e-mail from Switzerland
Let's Encrypt - Free SSL cert organisation


Last edited by kitsunenokenja on Sun Sep 27, 2009 9:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5910

PostPosted: Wed Sep 23, 2009 4:03 am    Post subject: Reply with quote

have you loaded snd-audio-usb?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
kitsunenokenja
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2004
Posts: 131

PostPosted: Sun Sep 27, 2009 9:40 pm    Post subject: Reply with quote

Apparently I wasn't really doing anything wrong. VLC 1.0.2 was available and I built it, and sure enough my problem went away. Yes, I did have the USB Audio module built and loaded into the kernel; that is how I was able to unmute the microphone and determine the ALSA device ordered pair for it.

The only minor issue is randomly VLC will claim the ALSA device cannot be opened (or, more rarely, the video device cannot be opened) but simply retrying a few times gets around this. I don't understand why it makes these claims when they're not true. I literally do nothing special in between attempts, it simply works properly with persistence.

Tips for anyone who encountered the same problem: go to VLC 1.0.2+ and make sure you are specifying the ALSA device in the proper format. VLC expects it as alsa://hw:X,Y where X,Y specify the audio device you want to use.
_________________
ProtonMail - Free encrypted e-mail from Switzerland
Let's Encrypt - Free SSL cert organisation
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum