You need to set up your webcam as Video on Demand instead of broadcast. I'm using Windows so:
Here's how I did mine (I'm using the HTTPd interface):
Code: Select all
vlc.exe --ttl 12 -vvv --color -I http --rtsp-host 0.0.0.0:554
and used the following VLM commands:
Code: Select all
new cam vod enabled
setup cam input "dshow://"
setup cam output #transcode{vcodec=mp4v,vb=230,fps=24,width=160,acodec=mp4a,ab=32,channels=1,samplerate=32000}
setup cam option dshow-vdev="QuickCam Pro"
Set dshow-vdev to whatever your camera id is. You might also need to replace the transcode options for your phone.
Using these settings, VLC will only start my cam when I connect to it from my phone (rtsp://xxx.xxx.xxx.xxx:554/cam) which I think is exactly what you're looking for. Hope that helps and good luck.