Recently I managed to activate my webcam and see what is happening in my room over the internet. Here are the steps, in case I need them in the future:
- Dynamic DNS:
- Use a Dynamic DNS service to access the computer, in case the IP Adress changes.
- Update the IP with a script that runs over cron.
- Have a script in cron to connect to the internet in case the connection is down.
- Find out which microphone I want to use (I can use e.g. Audacity to find out which microphones are available). Note this to put it below in :input-slave=alsa://<here>
- Run the ssh deamon with /etc/init.d/sshd start
- [Check about Firewall?]
After these preparation steps, I go to the remote computer and:
- Access the computer with ssh over the dynamic DNS address.
- Stream video and audio to the internet with a command like
cvlc
v4l2:///dev/video0
:input-slave=alsa://hw:1,0
--sout '#transcode{vcodec=mp1v,
acodec=mpga,
ab=128,
vb=1024}:standard{access=http,
mux=mpeg1,
dst=:1234}'
(put it all in 1 line) - Start VLC on the remote computer and watch the stream like <dynamic dns address>:1234 (or any other port that I have put in dst above)