Blog | Tech Blog | Secure Coding | Twitter | RSS Feed | Get Email Updates

Did you know that instead of installing special software to view your webcam video, you can simply use mplayer for the same purpose, and with a lot of fine control. e.g. try running the following command with your webcam attached to your computer.

CODE:
  1. mplayer -fps 15 tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0

And you can use mencoder to capture and encode video from your webcam:

CODE:
  1. mencoder tv:// -tv driver=v4l2:width=60:height=40:fps=60:device=/dev/video0 -nosound -ovc lavc -lavcopts vcodec=mjpeg -o test.avi

Have fun playing with the huge number of options available. You could even cat the test.avi file into a folder of your web server and have instant streaming video :-) .

© Shantanu Goel | Fun With Webcam In Linux

Custom Search
Liked this post? Get FREE Updates
Subscribe to RSS feed

Or
Enter Your E-mail ID below

Share and Enjoy:
  • Digg
  • del.icio.us
  • StumbleUpon
  • Facebook
  • Reddit
  • Print this article!

Related posts