Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 57 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       lavrec [options] filename(s)


       lavrec can be used to record video in MJPEG format (either
       quicktime,  movtar  or  AVI)  from  a  zoran video-capture
       device, such as the Miro/Pinnacle DC10(+), the Iomega  Buz
       or  Linux Media Labs' LML33, or from a generic video4linux
       device, such as the cheap Bt848 or  Bt878  based  TV-cards
       that are being sold in every computer shop around the cor­


       lavrec accepts the following options:

               The file to record to (*.avi, *.qt, *.movtar). Use
               a   %   to   record   to   multiple  files  (using
               file%02d.avi   will    record    to    file00.avi,
               file01.avi,  etc). You can also give more than one
               filename, which will have the  same  effect.  This
               will  avoid  problems  resulting  from filetype or
               filesystem size limits. AVI, for example, has a  2
               GB limit, as does ext2fs in 2.2.x kernels.

               By  default, lavrec will capture in a mode that is
               only suitable for recording  from  hardware  MJPEG
               devices.  Using  this  option will make lavrec use
               software-JPEG-encoding   (using   libjpeg)   which
               enables   MJPEG-video-capture  from  many  generic
               video4linux  devices  (such  as  Bt848/Bt878-based

       -f/--format [a|A|q|m]
               The  format  in which the video should be saved to
               the harddisk.
                 a - MJPEG AVI
                 A - MJPEG AVI with fields exchanged
                 q - Quicktime
                 m - Movtar
               By default, lavrec will look at the  extension  of
               the  first file (*.avi, *.qt, *.movtar) and choose
               a format based on that.
                a - (or every other letter) Autosense (default)

       -d/--decimation num
               Recording  decimation, either 1, 2 or 4. This will
               decimate the size of the recorded  video  horizon­
               tally  and vertically. To use different horizontal
               and vertical decimations,  use  two  numbers,  the
               first  one being the horizontal and the second one
               being the vertical (-d 12).  Note: this option can
               only be used during hardware recording.

       -g/--geometry WxH(+X+Y)
               For   hardware   recording:  An  X-style  geometry
               string, giving the  geometry  of  the  undecimated
               subframe to record. The default is the full frame,
               so   720x576/480+0+0   for   Buz/LML33-users   and
               640x480+0+0 or 768x576+0+0 for DC10(+)-users.  For
               software recording: The size of the  video  to  be
               captured.   Currently, width and height need to be
               a multiple of 16.  You  always  capture  the  full
               frame since most video4linux devices donīt support
               subframe capture.

       -q/--quality num
               Quality of the JPEG-video to be recorded (in  per­
               cent).  This  must  be a number between 0 and 100.
               Lower quality should generally  mean  lower  file­
               size,  higher quality will take more diskspace but
               will give more detailed perfectness in the result­
               ing recorded video. Default is 50%.

       -C/--channel LIST:CHAN
               Choose  the  channel to record from (xawtv-style).
               By default, lavrec will just use  the  current  TV

       -t/--time num
               Recording  time  in seconds. The default is unlim­
               ited. To stop capturing video while recording, use

               Single-frame capture mode. This means that one can
               capture individual frames from the capture device.

       -a/--audio-bitsize num
               Audio size in bits, either 0, 8 or 16 (default). 0
               means no audio.

       -r/--audio-bitrate num
               Audio sampling rate in Hz. This must be a sampling
               rate  which  is supported by the soundcard. Often-
               supported audio sampling rate  values  are  11025,
               22050 or 44100 (default).

               Capture  in stereo. By default, lavrec captures in

       -l/--audio-volume num
               Recording level. This must be a  value  between  0
               (no  sound) and 100 (loud recording). -1 (default)
               means to not touch the mixer settings at all.

               Mute sound output while  recording.  This  can  be
               useful when recording sound from the microphone to
               disable echos. This option is disabled by default.

       -R/--audio-source [l|m|c]
               Recording  source,  either (l)ine-in, (m)icrophone
               or (c)d-rom. The default is to record from line-in

               Use  the read() system call rather than the mmap()
               system call for audio recording. This may fix many
               audio recording problems.

       -c/--synchronization [0|1|2]
               Audio/video  synchronization  level  efforts.  (0)
               means no synchronization, (1)  means  that  lavrec
               will  replicate  frames for lost frames. (2) means
               that lavrec will replicate frames for lost  frames
               and do sync correction.  Default is 2.

       -n/--mjpeg-buffers num

       --file-flush num
               Flush the file to disk after every num frames cap­

       -v/--verbose num
               Verbosity level (0, 1 or 2). Default is 0.


       The following environment variables can be  recognized  by

               The video device. Default is /dev/video

               The audio device. Default is /dev/dsp

               The mixer device. Default is /dev/mixer


       Lavrec will output the current recording state. Typically,
       this looks like:
       0.06.14:22 int: 00040 lst:0  ins:0  del:0  ae:0  td1=0.014
       The  first  part is the time that has been spent recording
       (hours - minutes - seconds - frames).  int is the interval
       (in milliseconds) between two captured frames (this should
       be around 40 for PAL/SECAM and 33 for NTSC).  lst  is  the
       number  of  lost  frames.   ins  and del are the number of
       frames inserted and deleted for sync  correction.   ae  is
       the   number  of  audio  errors.   td1  and  td2  are  the
       audio/video time-difference (out-of-sync'ness).


       Okay, that's a lot of options. Now how  would  I  normally
       record video?  Let's assume you want to record at VCD res­
       olution (352x288) from PAL source.  You  might  want  some
       higher  quality  than default (80%). You use default audio
       options and record to an AVI file. That having said,  your
       recording command line would look like:

       From hardware MJPEG devices (S-video input)
               lavrec --format=a --input=P --quality=80 --decima­
               tion=2 /path/to/file.avi

       From normal video4linux devices


       This man page was written by Ronald Bultje.
       If  you have questions, remarks, problems or you just want
       to contact the developers, the main mailing list  for  the
       MJPEG-tools is:
       For more info, see our website at


       mjpegtools(1), lavplay(1)

MJPEG Linux Square       6 December 2001                lavrec(1)

An undefined database error occurred. SELECT distinct pages.pagepath,pages.pageid FROM pages, page2command WHERE pages.pageid = page2command.pageid AND commandid =

Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds