8.3. Stream with VLS

Note

You need the CVS version of VLS. When you compile it, you must do a ./bootstrap and ./configure --enable-v4l --with-ffmpeg=PATH (where PATH is the absolute path to the directory where you compiled ffmpeg, and not the relative path !) .

There is no command line interface for this input for the moment, so you will have to use the configuration file .

Here is a typical configuration file vls.cfgto run VLS with a v4l device :


# vls.cfg (VLS configuration file)
# Example of the VideoLAN HOWTO for the Video for Linux input

BEGIN "Inputs"

  webcam       = "v4l"

END

BEGIN "webcam"

  # V4L device
  Device        = "/dev/video"

  # Channel Source : Webcam is often "0"
  #                  TV Card, may be Tuner(0), Composite(1), Svideo(2)
  Channel       = "0"

  # Norm: PAL=0, NTSC=1, SECAM=2
  Norm          = "0"

  # Frequency of the channel in Mhz, multiplied by 16 (tuner cards only)
  Frequency     = "7668"

  # Size possibilities: can be either:
  # - empty string : default size
  # - width x height
  # - subQCIF(128x96), QSIF(160x120), QCIF(176x144), SIF(320x240),
  #   CIF(352x288), VGA (640x480)
  Size          = ""

  # DeInterlace: "0" = no ; "1" = yes
  DeInterlace   = "0"

  # Video compression format: "mpeg1" or "mpeg4"
  Compression   = "mpeg4"

  # Video bitrate (approx.) in kbps
  Bitrate       = "500"

  # Quality: "1.0" (good) to "31.0" (bad)
  Quality       = "1.0"

  # Sound device
  AudioDevice   = "/dev/dsp"

  # Audio compression format: "mp2", "mp3" or "ogg"
  AudioCompression = "mp2"

  # Audio bitrate in kpbs
  AudioBitrate  = "64"

  # Audio frequency ("16000", "22050", "24000", "32000", "44100" or "48000")
  AudioFreq     = "16000"

  # Audio channel: "1" = mono ; "2" = stereo
  AudioChannel  = "2"

END

BEGIN "Channels"

  channel1       = "network"

END

BEGIN "channel1"

  # Unicast or multicast IP address
  DstHost = "192.168.0.42"

  # Destination port
  DstPort = "1234"

  # If it's a multicast IP address, uncomment the line below
  #Type    = "multicast"

  # If it's a multicast IP address, set the "Time To Live" below
  #TTL     = "12"

END

BEGIN "LaunchOnStartUp"

  command1 = "start video channel1 webcam"

END

Once you have adapted the configuration file above, run VLS :


% vls -vv -f vls.cfg
Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout