# VLC with webcamd



## fernandel (Jul 2, 2018)

Hi!

I did install multimedia/webcamd and it works. I like tu use it in multimedi/vlc. It works video but not sound. I have FreeBSD on iMac.
I have cammera /dev/video0 but audio device don't give any option. 
`cat /dev/sndstat[/pmd] shows:
[code]Installed devices:
pcm0: <ATI R6xx (HDMI)> (play)
pcm1: <Cirrus Logic CS4206 (Analog 6ch/2.0)> (play/rec) default
pcm2: <Cirrus Logic CS4206 (Rear Analog Line-in)> (rec)
pcm3: <Cirrus Logic CS4206 (Rear Digital)> (play/rec)
No devices installed from userspace.[/code]
But whatevr I put I got an error:
[code]
Your input can't be opened:
VLC is unable to open the MRL 'alsa://dev/pcm1'. Check the log for details.[/code]
[COLOR=#000000]I don't find any log.[/COLOR]

[COLOR=#000000]Thank you.[/COLOR]`


----------



## Phishfry (Jul 2, 2018)

VLC carries alot of baggage. How does multimedia/mplayer act with the device?



fernandel said:


> VLC is unable to open the MRL 'alsa://dev/pcm1'


Looks like VLC is trying to use alsa.


----------



## fernandel (Jul 2, 2018)

Phishfry said:


> VLC carries alot of baggage. How does multimedia/mplayer act with the device?
> 
> 
> Looks like VLC is trying to use alsa.


I didn't use Mplayer long time and I do not if it has an option for webcam. I saw a new multimedia/webcamoidbut it use Pulseaudio and I do not want it to install.


----------



## Phishfry (Jul 2, 2018)

I have more experience with mplayer and IP Cameras than webcams.
That said mplayer takes every stream I have thrown at it.
VLC in comparison seemed very picky.
I have very little experience with the audio subsystem.
From my tvtuner experience your webcamd device node should have an accompanying audio node.
pcm1 is the playback device, but the mic in the webcamera should have its own node, right?
You did try pcm2 with VLC? That would more likely have the mic audio stream.


----------



## fernandel (Jul 2, 2018)

Phishfry said:


> You did try pcm2 with VLC? That would more likely have the mic audio stream.


Yes, I did try all  and I am using /dev/mixer1 and audio on VLC pick up pcm1:virtual:dsp1.vpo

Do you think that is a problem ''hal" which I don't using and it is not installed?

Thank you.
BTW: I also try to setup audio on VLC for SNDIO but it doesn't work either..


----------



## Phishfry (Jul 3, 2018)

There is a "HAL=on" default setting for the webcamd port options. I am not sure what the effects are.


----------



## Phishfry (Jul 3, 2018)

Did you add the /boot/loader.conf settings for `cuse`?
That will require a reboot or manual service start.

Can you post the onscreen text during a "hot-plug' of the usb device.


----------



## fernandel (Jul 3, 2018)

Phishfry said:


> Did you add the /boot/loader.conf settings for `cuse`?
> That will require a reboot or manual service start.
> 
> Can you post the onscreen text during a "hot-plug' of the usb device.


Yes, I have everything and it works but not audio in VLC for webcam. I will give a try to multimedia/mplayer which I used  long time but for listening music I am still using audio/aqualung.


> less /var/log/messages | grep ugen
> kernel: ugen3.1: <Intel EHCI root HUB> at usbus3
> kernel: ugen0.1: <Intel UHCI root HUB> at usbus0
> kernel: ugen1.1: <Intel EHCI root HUB> at usbus1
> ...


And there is also:
Webcamd is alredy running on ugen3.3.0
Attached to ugen1.4[0]

And on camera is build in the iMac and the microphone the same. Both works with uTox because I am using it.

Thanks


----------



## Phishfry (Jul 3, 2018)

Sorry, You can't hotplug a built-in camera can you!!! Didn't realize what you had.
So is the microphone audio analog over the mic inputs or USB audio over the iSight?


----------



## fernandel (Jul 3, 2018)

Phishfry said:


> Sorry, You can't hotplug a built-in camera can you!!! Didn't realize what you had.
> So is the microphone audio analog over the mic inputs or USB audio over the iSight?


"It also has a built-in iSight video camera and built-in stereo speakers underneath the 27" glossy 16:9 _LED-backlit_ TFT Active Matrix LCD (2560x1440 native) display "with IPS technology"."
https://everymac.com/systems/apple/imac/specs/imac-core-i7-2.8-27-inch-aluminum-late-2009-specs.html
Above is a link on ine which is a little ugraded but I have on just FreeBSD .


----------



## fernandel (Jul 4, 2018)

I did try with multimedia/mplayer and camera works but not sound. I will play a little more .

BTW: Which video setings do you use, please? I tried "VDPAU with X" and doesn't show me video, just sound and I choose open gl.


----------



## fernandel (Jul 5, 2018)

Today I tried my webcam with multimedia/mencoder and I have sound too :

```
mencoder tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0:forceaudio:adevice=/dev/dsp1 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi
```
I need to find how to use with multimedia/mplayer


----------



## Phishfry (Jul 5, 2018)

fernandel said:


> Which video setings do you use, please? I tried "VDPAU with X" and doesn't show me video, just sound and I choose open gl.


I use graphics/xv for video playback on mplayer.


----------



## fernandel (Jul 6, 2018)

I am searching still on the Internet but I didn't find anything. I try also with mulltimedi/mpv which I like more and more but I can just start webcam but I do not know how to save as mp4 or whatever format. I am working .


----------



## Phishfry (Jul 6, 2018)

xv is also in the list for mplayer . Did you try it? Preferences>Video driver. No dependencies and very small. Weird license though.
I know it's a graphics program, but it works very well, better than OpenGL.


----------



## fernandel (Jul 6, 2018)

Phishfry said:


> xv is also in the list for mplayer . Did you try it? Preferences>Video driver. No dependencies and very small. Weird license though.
> I know it's a graphics program, but it works very well, better than OpenGL.



Yes, I have and works very good. I did try also on "mpv" and  it complain that is too old and use "gpu" which works very good too.


----------



## tobik@ (Jul 7, 2018)

Phishfry said:


> xv is also in the list for mplayer . Did you try it? Preferences>Video driver. No dependencies and very small. Weird license though.
> I know it's a graphics program, but it works very well, better than OpenGL.


xv (the mplayer/mpv backend based on X11's Xv extension) and graphics/xv (an image viewer) are not related in any way.


----------

