I have an IP camera foscam, I am trying to setup a software on my server that can continuously record video and audio. Which software should I use?


Both VLC and avconv work splendidly.

Try this:

avconv -i 'http://IP:PORT/videostream.asf?user=x&pwd=x&resolution=32' -t 3600 -c:a libmp3lame out.avi

..to record one hour video. You can use this in a small shell script to rotate hourly video files over time. Under Ubuntu, make sure you install ubuntu-restricted-extras for the proper codecs.

  • I don't see avconv available for Fedora 20, but swap 'ffmpeg' and your answer is splendid. Thanks! – Greg Sheremeta May 1 '14 at 4:33
  • I get a 404 when trying access the videostream.asf url. Any idea what firmware versions support this? – Steve Robbins Aug 22 '15 at 5:42

I had good results with Foscams using Zoneminder. FYI, it uses quite a bit of resources.


Under Linux I have found GStreamer incredibly powerful in the work I have been recently doing. It has a variety of plug-ins that can be used to capture, manipulate, transcode, etc. It is included in the package management repositories of all major Linux distributions I have encountered, although it may come as a series of different packages (Good, Bad Ugly) due to licensing issues.

It is a little daunting to use at first, when using it from the command line it operates on a pipeline basis similar to the console itself. For example the following pipeline would capture video from a webcam and save it as a H264 encoded MKV file.

gst-launch v4l2src ! x264enc ! matroskamux ! filesink location=webcam.mkv

Now clearly the pipelines vary depending on your exact circumstance, but some general rules ring true - such as you always need at-least one source and sink and generally if you have encoded a video you will also want to mux it.

Edit: I should also note that it has a C SDK for those who wish to use it as part of a C/C++ application as I have.


My Foscam camera can record video/audio itself and send it to an FTP server, provided it has an SD card inserted. It uses the ASF format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.