DVPiper

Home  /   Misc  /   DVPiper


DVPiper
DVPiper allows recording, displaying, and manipulation of transport streams from digital capture devices. Currently DVPiper supports ATSC, DVB-C, DVB-S, DVB-T, and QAM digital cable.

In particular it allows simultaneous multiple recording of any channel on the same frequency multiplex with one device. Through the same principle, any channel can also be displayed and manipulated using any application that reads from stdin, for example, saving the stream as MPEG-PS using ffmpeg, mencoder, or VLC.

DVPiper also has built-in HTTP and UDP streaming for direct streaming to a network/LAN. Input to the HTTP/UDP streamer can be the transport stream itself, or the output of another program launched by DVPiper, for example the output from ffmpeg whose input is the transport stream.

DVPiper can also be used to extract Electronic Program Guide (EPG) from the transport stream. The EPG will be saved in XMLTV format. For multi-language EPG you can choose the maximum number of languages to save, in order of priority.

Currently supported EPG formats include ATSC EIT, DVB EIT, FreeSat/FreeView EPG, and Dish Network extended EPG.

Before you can use DVPiper you will need to install the Streamer Directshow filter first by double-clicking on install.bat (in Windows Vista and above, right-click and choose "Run as administrator"). The Streamer Directshow filter was created for DVPiper and receives data from a BDA Directshow device.

Minimum requirement: Windows XP SP2
Recommended: Windows Vista or above
For Windows Server, before you can use DVPiper you would need to first add BDA support.

For recording and previewing channels with DVPiper using a web interface see here

Download DVPiper version 1.69 here (Changes)
DVPiper Syntax
Usage: DVPiper [options]

Options:
  -fast               Faster ready time, but may not be as reliable for some
                      devices
  -tuning [value]     Tuning method: 1, 2. Choose one that works best with your
                      device and broadcast
                      1 is the default tuning method,
                      2 is a faster tuning method
  -listdevice         List all available devices
  -listdevicexml      List all available devices in XML format
  -devicenum [value]  Use a specific device's index. The first device is 1
  -devicename [value] Use a specific device's friendly name, or
  -devicename2 [val]  Use a specific device's display name
                      Partial match is accepted
  -type [value]       Device type: ATSC, DVB-C, DVB-S, DVB-T, QAM
                      QAM is US QAM digital cable. For hybrid devices set
                      modulation for faster channel change
                      If type is not set DVPiper will try to determine the type
                      but may take a few seconds with some devices
  -np [value]         Set network provider: standard, generic
                      Default is auto-select
  -recname [value]    Use a specific receiver component friendly name, or
  -recname2 [value]   Use a specific receiver component display name
                      Partial match is accepted
                      Use -recname or -recname2 to manually specify the
                      components to connect to the device
                      Use repeatedly to specify multiple components
  -frequency [value]  Carrier frequency in kHz. E.g. 571500
  -modulation [value] Modulation: 16QAM, 32QAM, 80QAM, 96QAM, 112QAM, 128QAM,
                      160QAM, 192QAM, 224QAM, 256QAM, 320QAM, 384QAM, 448QAM,
                      512QAM, 640QAM, 768QAM, 896QAM, 1024QAM, QPSK, BPSK,
                      OQPSK, 8VSB, 16VSB, 8PSK, 16APSK, 32APSK, NBC_QPSK,
                      NBC_8PSK, DIRECTV, ISDBT_TMCC, ISDBS_TMCC
                      For DVB-S2 try 8VSB. Also try the other modulations
                      Note: this may not need to be set
  -symbolrate [value] Symbol rate in kbauds. E.g. 27500
  -fec [value]        FEC: 1/2, 2/3, 3/4, 3/5, 4/5, 5/6, 5/11, 7/8,
                      1/4, 1/3, 2/5, 6/7, 8/9, 9/10
                      Note: this usually does not need to be set
  -phychannel [value] Physical channel number
                      Note: use the actual frequency instead with -frequency
  -bandwidth [value]  DVB-T bandwidth in MHz. E.g. 7
  -polar [value]      DVB-S polarization: V, H, L, R
  -osc1 [value]       DVB-S LNB oscillator 1 frequency in kHz
  -osc2 [value]       DVB-S LNB oscillator 2 frequency in kHz.
  -lnbswitch [value]  DVB-S LNB switch frequency in kHz
                      For standard LNB, use -osc1
                      E.g. -osc1 5150000
                      For band-stacked polarization LNB, use
                      -osc1 for LNB H/L oscillator frequency
                      -osc2 for LNB V/R oscillator frequency
                      E.g. -osc1 10750000 -osc2 10100000
                      For universal dual-band LNB, use
                      -osc1 for LNB low-band oscillator frequency
                      -osc2 for LNB high-band oscillator frequency
                      -lnbswitch for LNB switch frequency
                      E.g. -osc1 9750000 -osc2 10600000 -lnbswitch 11700000
  -longitude [value]  DVB-S satellite longitude in degrees. E.g. 105.5
  -dirlongitude [val] DVB-S satellite longitude direction: WEST, EAST
  -azimuth [value]    DVB-S azimuth in degrees
  -elevation [value]  DVB-S elevation in degrees
  -inputrange [value] DVB-S input range as string for DiSEqC, etc
  -diseqc [value]     DVB-S DiSEqC command in hex. E.g. -diseqc 2a03facc
                      For DiSEqC motor, try the command e0316bnn, where:
                      e0 : Command from Master, No reply required, First
                           transmission
                      31 : Polar / Azimuth Positioner
                      6b : Drive Motor to Satellite Position nn
                      nn : The position in hexadecimal
                      For further information, refer to DiSEqC bus functional
                      specification
  -diseqcwait [val]   DVB-S DiSEqC max wait time in millisecond
                      Default value is 60000ms (60 seconds)
  -pilot [value]      DVB-S2 pilot: ON, OFF
                      Note: this usually does not need to be set
  -roll-off [value]   DVB-S2 roll-off: 0.2, 0.25, 0.35
                      Note: this usually does not need to be set
  -postdelay [value]  Delay accepting user input after a change in demodulator
                      setting. This delay is necessary for some tuners to
                      ensure the stream is from the new demodulator setting
                      Value is in millisecond. Default is 0ms (no delay)
  -charset [value]    Set the default character set for channel list and EPG:
                      AUTO (apply known character set fixes - for EPG only),
                      ISO8859-1 (West European),
                      ISO8859-2 (Central and East European),
                      ISO8859-3 (South European),
                      ISO8859-4 (North European),
                      ISO8859-5 (Cyrillic),
                      ISO8859-6 (Arabic),
                      ISO8859-7 (Greek),
                      ISO8859-8 (Hebrew),
                      ISO8859-9 (Turkish),
                      ISO8859-10 (Nordic),
                      ISO8859-11 (Thai),
                      ISO8859-13 (Baltic),
                      ISO8859-14 (Celtic),
                      ISO8859-15 (West European, updated including Euro sign),
                      OEM437 (original PC character set)
                      E.g. -charset ISO8859-2
                      For ATSC, this option changes the uncompressed Unicode
                      character set in the range [0, 255] to the specified
                      character set
                      For DVB, this option changes the default DVB character
                      set to the specified character set
                      This only needs to be set for broadcasters that don't
                      follow the standard, examples include a German EPG that
                      needs to be set to ISO8859-1, a Greek EPG that needs to
                      be set to ISO8859-7, a Polish EPG that needs to be set
                      to AUTO, and a US EPG that needs to be set to OEM437
  -changecontinue     When recording using progid(.) and the set of PIDs
                      change, the recording is normally stopped. Use this
                      option to continue recording on change in PIDs
                      Note that if recording to file, the resulting file may
                      not be played fully on some media players
  -pidall             Record all PIDs of a given program ID in progid(.)
                      Normally only elementary stream PIDs are included
  -signalstart        Show signal statistic on start
  -signalexit         Show signal statistic on exit
  -emptyexit          Exit when there is no more active recording
  -errorexit          DVPiper will apply more stringent error checks
                      and exits on failure of these checks
  -checktimeout [val] Time-out period for data and flow checks in millisecond
                      Default value is 10000ms (10 seconds)
  -minclean [value]   DVPiper will check clean data percentage and exits
                      when it falls below the stated value. E.g. 0.05
  -minflow [value]    DVPiper will check device data flow (in byte) and exits
                      when it is below the value in the time-out period.
                      E.g. 1000000 for minimum 1MB in the time-out period
  -noflowcheck        Disable flow checks
  -forceexit          Force exit method. Use if you have problem exiting
  -log [filename]     Save log messages to a file
                      If the file exists it will be appended. If it cannot be
                      written to a new similar filename will be chosen.
                      E.g. log.txt changed to log-2.txt
  -priority [value]   Set priority of DVPiper
                      Possible values are (low,below,normal,above,high)
                      Default value is high
  -childprio [value]  Set priority of programs to be launched by DVPiper
                      Possible values are (low,below,normal,above,high)
                      Default value is above
  -buffer [value]     Suggestion on memory buffer allocation in bytes
                      Generally higher value results in higher memory usage
                      Default is automatic
  -scanmaxtime [val]  Maximum channel scan time in millisecond
                      Default is 60000ms (60 seconds)
  -provmaxtime [val]  Maximum provider scan time in millisecond
                      Default is 60000ms (60 seconds)
  -udpmaxmsg [value]  Maximum message body size for UDP streaming
                      Default is 1316 bytes
  -udpmttl [value]    Multi-cast TTL for UDP streaming
  -udpsockbuffer [n]  UDP socket send buffer. Default is 65536
  -httptimeout1 [val] Time to wait for the first connection to HTTP server
                      If no client connects, recording is stopped
                      Value in millisecond. Default is 60000ms (60 seconds)
                      Set to -1 to wait indefinitely
  -httptimeout2 [val] Time to wait for 2nd and subsequent connections
                      Value in millisecond. Default is 0ms, this means only 1
                      client can connect; once this client disconnects the
                      recording is stopped
                      Set to -1 to wait indefinitely
  -httpmaxclient [n]  Maximum number of concurrent clients that can connect to
                      the HTTP server at each active port. Default is 1
                      If set to > 1 also set -httptimeout2 to -1 or > 0
                      Set to -1 for no limit
  -httpsockbuffer [n] HTTP socket send buffer. Default is 65536
  -httpheader [...]   HTTP response header
                      Use \r\n for CRLF (new line), \\ for \
                      E.g. "HTTP/1.0 200 OK\r\nContent-Type: video/mp2t"
                      Default is
                      HTTP/1.0 200 OK
                      Content-Type: application/octet-stream
                      Cache-Control: no-cache
  -epg [...]          Get Electronic Program Guide (EPG) and save to a file in
                      XMLTV format. DVPiper will exit once EPG scan finishes
                      E.g. -epg "C:\Temp\epg.xml"
                      Command in the form of epg(...) is also accepted
                      E.g. -epg "epg('C:\Temp\epg.xml')"
                      See -helpcommand for details of epg(...)
  -epgmintime [val]   Minimum EPG scan time in millisecond
                      Default is 30000ms (30 seconds)
  -epgmaxtime [val]   Maximum EPG scan time in millisecond
                      Default is 300000ms (300 seconds)
  -epgprogress        Print EPG scan progress
  -epgactual          Collect only EPG for the actual transport stream.
                      Some broadcasters transmit EPG for other frequencies as
                      well, these are all collected by default
  -codepage [val]     Set code page for input/output
                      If not set then input/output format will be according to
                      the active console code page. Enter code page number, or
                      UTF-8 for UTF-8 code page,
                      console for system's default console OEM code page,
                      windows for system's Windows ANSI code page
  -codepagein [val]   Set input code page
  -codepageout [val]  Set output code page
  -utf8console        Set code page to UTF-8 for input/output
                      This is equivalent to using -codepage UTF-8
  -windowscodepage    Set code page to system's Windows ANSI code page.
                      This is equivalent to using -codepage windows
                      By default DVPiper will use the active console code page,
                      but if DVPiper is being run by a program that uses the
                      Windows code page then use this option
  -command [command]  Initial commands to execute upon starting
                      Type help within DVPiper for available commands
                      Enclose command within quotes "..."
                      Use two quotes "" for quote within the enclosure
                      Use -command repeatedly for multiple commands
  -help               Show this help message
  -helpcommand        Show commands available from within DVPiper
  -helpall            Show all help

Examples:
Simple start-up for a DVB-T tuner:
DVPiper.exe -type DVB-T -frequency 200500 -bandwidth 7

Start and run a 'signal' command:
DVPiper.exe -type DVB-T -frequency 200500 -bandwidth 7 -command signal

Simple way to get EPG:
DVPiper.exe -type DVB-T -frequency 200500 -bandwidth 7 -epg "C:\a1.xml"

Run channel scan and exit when finished:
DVPiper.exe -type DVB-T -frequency 200500 -bandwidth 7
     -command scan("C:\a2.xml") -emptyexit

Start and run a 'record' command:
DVPiper.exe -type DVB-T -frequency 200500 -bandwidth 7
     -command "record(rid(123),send(file('C:\a1.ts')))"

Another 'record' command:
DVPiper.exe -type DVB-T -frequency 200500 -bandwidth 7
     -command "record(rid(123),send(prog('""C:\test.exe"" -o b.ts')))"
     -command sleep(5000) -command exit

Example start-up for a DVB-S tuner:
DVPiper.exe -type DVB-S -frequency 3000500 -symbolrate 25000 -osc1 5150000
     -polar H

From within DVPiper the following commands are available (or use the option
"-command [command]" to use from the command line):

Available commands:
  stat             Show statistics
  statfq           Show statistics since last change in demodulator setting
  getrate          Show current data flow in bytes per second from device
  pids(n)          Scan for PIDs for n millisecond and list all PIDs found
  signal           Show signal strength, quality, and frequency locked status
  sleep(n)         Sleep for n millisecond
  diseqc(...)      DiSEqC command in hex. E.g. diseqc(e0316b01)
  fqbw(f,bw)       DVB-T change frequency (in kHz) and bandwidth (in MHz).
                   Bandwidth is optional and inherited from -bandwidth or the
                   last bandwidth change
                   For a complete set of options use demod(...) instead
  demod(...)       Change demodulator setting. Options include frequency(.),
                   modulation(.), symbolrate(.), fec(.), phychannel(.),
                   bandwidth(.), polar(.), osc1(.), osc2(.), lnbswitch(.),
                   longitude(.), dirlongitude(.), azimuth(.), elevation(.),
                   inputrange(.), diseqc(.), diseqcwait(.), pilot(.),
                   roll-off(.), changecontinue(YES or NO), pidall(YES or NO),
                   buffer(.), charset(.), postdelay(.)
                   Previous values will be used if not set
                   E.g. demod(frequency(4000000),polar(H),diseqc(e0316b01))
  scan(...)        Scan and list all programs found in XML format
                   To specify an ID to stop a running scan use rid(id)
                   To specify a complete scan that include other channels not
                   in the actual transport stream use the keyword 'complete'
                   Note: these other channels will not have any PID details
                   To list only channels in the last PAT scanned use the
                   keyword 'strict'
                   To output the XML result to a file use file(.)
                   E.g. scan(rid(123),strict,file('C:\Temp\scan.xml'))
                   For filename in UTF-8 URL form use filedec(.) (use for
                   non-English filename)
                   E.g. filedec('ABC%23.xml') for file('ABC#.xml')
                   To write the read stream to a file (for debugging purposes)
                   use tsfile(filename)
                   E.g. scan(tsfile(C:\Temp\scan.ts))
                   For filename in UTF-8 URL form use tsfiledec(.) (use for
                   non-English filename)
                   E.g. tsfiledec('ABC%23.ts') for tsfile('ABC#.ts')
  provider(...)    Scan and list frequency information in XML format - only
                   for DVB-C, DVB-S, and DVB-T systems and only for
                   broadcasters that publish channels' frequencies
                   To specify an ID to stop a running scan use rid(id)
                   To output the XML result to a file use file(.)
                   E.g. provider(rid(123),file('C:\Temp\scan.xml'))
                   For filename in UTF-8 URL form use filedec(.) (use for
                   non-English filename)
                   E.g. filedec('ABC%23.xml') for file('ABC#.xml')
                   To write the read stream to a file (for debugging purposes)
                   use tsfile(filename)
                   E.g. provider(tsfile(C:\Temp\provider.ts))
                   For filename in UTF-8 URL form use tsfiledec(.) (use for
                   non-English filename)
                   E.g. tsfiledec('ABC%23.ts') for tsfile('ABC#.ts')
  lookup(h,s)      Lookup host and service/port information
                   Results shown include both IPv4 and IPv6 (if applicable)
                   The first result shown is used for HTTP/UDP streaming
                   E.g. lookup(aa.com,rtsp)  lookup(aa.com)  lookup(,rtsp)
  epg(...)         Get Electronic Program Guide (EPG) and save to a file in
                   XMLTV format
                   To specify an ID to stop a running EPG scan use rid(id)
                   E.g. epg('C:\Temp\epg.xml',rid(123))
                   To collect only EPG for the actual transport stream use the
                   keyword 'actual'. To collect all EPG use the keyword 'all'
                   Default is all EPG unless -epgactual is used
                   E.g. epg('C:\Temp\epg.xml',actual)
                   E.g. epg('C:\Temp\epg.xml',rid(123),actual)
                   For multi-language EPG, to save only a subset according to
                   priority use language(max,lang1,lang2,...) where max is the
                   maximum number of languages to save and lang is a 2-letter
                   or 3-letter ISO-639 language code
                   E.g. epg('C:\Temp\epg.xml',language(2,eng,fra,deu,ell))
                   will save max 2 languages according to priority. Language
                   not in the list will not be saved unless the listed
                   languages do not exist in the EPG or less than max
                   To write the read stream to a file (for debugging purposes)
                   use tsfile(filename)
                   E.g. epg('C:\Temp\epg.xml',tsfile(C:\Temp\epg.ts))
                   For filename in UTF-8 URL form use tsfiledec(.) (use for
                   non-English filename)
                   E.g. tsfiledec('ABC%23.ts') for tsfile('ABC#.ts')
  epgdec(...)      Same as epg(...) except filename is in UTF-8 URL form (use
                   for non-English filename)
                   E.g. epgdec('ABC%23.xml') for epg('ABC#.xml')
  run(...)         Run an external program. Type helprun for instruction
  rundec(...)      Same as run(...) except first argument (program to be
                   launched) is encoded in UTF-8 URL form (use for non-English
                   name)
                   E.g. rundec('ABC%23.exe') for run('ABC#.exe')
  record(...)      Record transport stream. Type helprecord for instruction
  count            Show total number of active recordings and scans
  list             List details of all active recordings and scans
  list(RID)        Show details of a particular recording or scan
  stop             Stop all recordings and scans
  stop(RID)        Stop a particular recording or scan
  help             Show available commands
  helprun          Show help on run(...)
  helprecord       Show help on record(...)
  helpall          Show all help
  exit             Exit DVPiper

  run(...)         Run an external program
    E.g. run('"b1.exe" -op')
    optional arguments:
      For priority possible values are (low,below,normal,above,high)
        Default is inherited from -childprio
      To allow user interaction with the launched program when
        DVPiper is installed as a service or as part of a service
        use the keyword 'interact'
      E.g. run('"b1.exe"',high)  run('"b1.exe"',interact)
        run('"b1.exe"',high,interact)
      stdout(.) save stdout of the launched program to a file
        E.g. run('"b1.exe"',stdout('C:\Temp\b1.log'))
      stderr(.) save stderr of the launched program to a file
      stdall(.) save both stdout and stderr to the same file
      prog(...) send stdout of the launched program to stdin of another
        program. prog(...) has the same syntax as run(...) including
        priority, stdout(.), stderr(.), stdall(.), except that the
        interact option is inherited from the parent
        Use nested prog(...) to pipe to multiple programs
        E.g. run('"b1.exe"',prog('"b2.exe"',prog('"b3.exe"')))
          This will send output of b1 to b2 and output of b2 to b3
      udp(hostname,port,maxmsg(.),mttl(.),sockbuffer(.)) stdout of the
        launched program is streamed via UDP.
        maxmsg(.), mttl(.), and sockbuffer(.) are optional (default values are
        inherited from -udpmaxmsg, -udpmttl, and -udpsockbuffer respectively)
        Note that if 'hostname' lookup produces multiple results (both IPv4
        and IPv6), the first result is used. E.g. lookup(localhost) on a
        system that supports both IPv4 and IPv6 (e.g. Windows 7) will produce
        ::1 and 127.0.0.1 (IPv6 and IPv4 respectively). If ::1 is the first
        result it will be used so the receiving application needs to be IPv6
        aware, otherwise explicitly use 127.0.0.1 instead of localhost
        E.g. run('"b1.exe"',udp(aa.com,9000)) stream to aa.com, port 9000
        E.g. run('"b1.exe"',udp(192.168.2.100,9000))
        udp(...) can also be used inside another prog(...)
        E.g. run('"b1.exe"',prog('"b2.exe"',udp(aa.com,9000)))
        Input to udp(...) should be a transport stream (TS)
      http(port,timeout1(.),timeout2(.),maxclient(.),sockbuffer(.),header(.))
        stdout of the launched program is used for HTTP stream serving.
        timeout1(.), timeout2(.), maxclient(.), sockbuffer(.), and header(.)
        are optional (default values are inherited from -httptimeout1,
        -httptimeout2, -httpmaxclient, -httpsockbuffer, and -httpheader
        respectively)
        E.g. run('"b1.exe"',http(9000)) listen to port 9000 for connection
        http(...) can also be used inside another prog(...)
        E.g. run('"b1.exe"',prog('"b2.exe"',http(9000)))
        Input to http(...) should be a transport stream (TS)
      stdoutdec(.) same as stdout(.) except the filename is encoded in
        UTF-8 URL form (use for non-English filename)
        E.g. stdoutdec('ABC%23.log') for stdout('ABC#.log')
      stderrdec(.) same as stderr(.) except filename is in UTF-8 URL form
      stdalldec(.) same as stdall(.) except filename is in UTF-8 URL form
      progdec(...) same as prog(...) but first argument is in UTF-8 URL form

    Enclose each argument within quotes '...'
    Use two quotes '' for quote within the enclosure

    The run command can also be used inside send(...) - see helprecord

  rundec(...)      Same as run(...) except first argument (program to be
    launched) is encoded in UTF-8 URL form (use for non-English name)
    E.g. rundec('ABC%23.exe') for run('ABC#.exe')

  record(...)      Record transport stream
    E.g. record(rid(12),progid(15),send(file('a1.ts'),prog('"b1.exe" -op')))

    Required arguments:
      rid(id) Recording ID
        This is to identify the recording. E.g. rid('one')
      send(...) Where to send the transport stream
        file(.) Ordinarily the transport stream will be saved to a file
          E.g. file('a1.ts') to save the stream to a1.ts
        filedec(.) indicates save stream to a file, but the filename
          is encoded in UTF-8 URL form (use for non-English filename)
          E.g. filedec('ABC%23.ts' for file('ABC#.ts')
        prog(...) indicates send stream to stdin of a program
          prog(...) command has the same syntax as run(...) - see helprun
          E.g. prog('"b1.exe" -op') will launch b1.exe and send the stream
            to stdin of b1.exe
          Use nested prog(...) to pipe to multiple programs
          E.g. prog('"b1.exe"',prog('"b2.exe"',prog('"b3.exe"')))
            This will send output of b1 to b2 and output of b2 to b3
        progdec(...) same as prog(...) but first argument (program to be
          launched) is in UTF-8 URL form (use for non-English filename)
          E.g. progdec('ABC%23.exe') for prog('ABC#.exe')
        run(...) same as run(...) outside record(...) as described in helprun
          except DVPiper keeps track of the launched program and will stop the
          recording if the launched program exits
        rundec(...) same as run(...) but first argument is in UTF-8 URL form
        udp(hostname,port,maxmsg(.),mttl(.),sockbuffer(.)) UDP streaming
          E.g. udp(aa.com,9000). See helprun for details
        http(port,timeout1(.),timeout2(.),maxclient(.),sockbuffer(.)) HTTP
          stream serving. E.g. http(9000). See helprun for details

        Enclose each argument within quotes '...'
        Use two quotes '' for quote within the enclosure
        Keywords within the arguments when using progid(.):
          $pmt          replace with the PMT PID
          $ttxsub       replace with the teletext PID
          $ttxpagesub   replace with the teletext subtitle page
          If a keyword exists for an argument but value cannot be found
            it will not be executed but other arguments are unaffected
        send(...) can have more than one argument
          E.g. send(file('a1.ts'),prog('"b1.exe")) this will ensure that the
          same data is written to both arguments at the same time period
          However if one slows/pauses/stops/fails the others will be affected
          For most purposes multiple record(...) is a better option

    Optional arguments:
      progid(n) Record all PIDs for a Program ID e.g. progid(135)
        To match Transport Stream ID (as well as Program ID) use tsid(TSID)
        E.g. progid(135,tsid(1))
        To record only the video, audio, and subtitles use the keyword 'vas'
        To record only elementary stream PIDs use the keyword 'pides'
        To record all associated PIDs use the keyword 'pidall'
        E.g. progid(135,pidall)
        Default is elementary stream PIDs unless -pidall is used
        Note that 'pides' and 'pidall' are mutually exclusive, use only one
        To continue recording on change in PIDs use the keyword
        'changecontinue'
        To stop recording on change in PIDs use the keyword 'changestop'
        E.g. progid(135,changecontinue)
        Default is to stop on change in PIDs unless -changecontinue is used
        Note that 'changecontinue' and 'changestop' are mutually exclusive, use
        only one
        To exclude or include more PIDs use exclude(...) or include(...)
        E.g. progid(135,exclude(5,78),include(33,99))
        include(...) also recognizes the keyword 'pcr' to include the PCR PID
        E.g. To exclude video PID 88 but keep PCR PID 88 (same PID) use
          progid(135,exclude(88),include(pcr))
      pid(...) Record only given PIDs e.g. pid(1,2,5)
        To include only PCR PIDs when video, etc have same PIDs use pcr(.)
        E.g. pid(1,2,5,pcr(7,8))
      excludepid(...) Exclude the given PIDs and record the rest
        E.g. excludepid(1,2,5)
      Note that progid(n), pid(...), and excludepid(...) are mutually
        exclusive, use only one of them
      buildpat(ProgID,PMT_PID) When recording with progid(n) or pid(...),
        this option rebuilds PAT to contain only the specified Program ID and
        corresponding PMT PID.
        This is necessary for some media players.
        When used with progid(n), ProgID and PMT_PID can be omitted
      patchpmt(ProgID,pt(PID1,Type1),pt(PID2,Type2),...)
        When recording with progid(n) or pid(...), this option sets the Type of
        each PID in the PMT
        When used with progid(n), ProgID can be omitted
        E.g. patchpmt(9,pt(7,1)) sets PID 7 to type 1 in PMT 9
        This can be used to correct video or audio type that is set to a wrong
        type, making them unplayable on some media players
        Conversely, when a video or audio is excluded from the recording, its
        type can be set to 0 so that media players don't try to play the
        non-existent video or audio
      buffer(n) Buffer size suggestion e.g. buffer(8000000)
      priority(.) Set priority of programs to be launched
        Possible values are (low,below,normal,above,high)
        Default is inherited from -childprio



Examples:
In each of the following examples, the first line shows the command from within DVPiper.
The second line shows how the command should be modified for use with the -command option. This is necessary as Windows treats spaces and " as special characters.


To save the full TS (all the channels/programs) to C:\Temp\a1.ts:
record(rid(1237),send(file('C:\Temp\a1.ts')))

-command "record(rid(1237),send(file('C:\Temp\a1.ts')))"
If there are no spaces in the command (like in this case), then it is not necessary to enclose the command within "..."


To save program ID 135 as a TS to C:\Temp\a1.ts:
record(rid(1237),progid(135),send(file('C:\Temp\a1.ts')))

-command "record(rid(1237),progid(135),send(file('C:\Temp\a1.ts')))"


To save only the video, audio, and subtitles of program ID 135 as a TS to C:\Temp\a1.ts:
record(rid(1237),progid(135,vas),send('C:\Temp\a1.ts'))

-command "record(rid(1237),progid(135,vas),send(file('C:\Temp\a1.ts')))"


To save as a TS to C:\Temp\a1.ts, and rebuild the PAT to contain only Program ID 135 (this is necessary for some media players)
record(rid(1237),progid(135),buildpat,send(file('C:\Temp\a1.ts')))

-command "record(rid(1237),progid(135),buildpat,send(file('C:\Temp\a1.ts')))"


To save PID {5, 7, 8} as a TS to C:\Temp\a1.ts, and rebuild the PAT to contain only Program ID 55 with PMT PID 8:
record(rid(1237),pid(5,7,8),buildpat(55,8),send(file('C:\Temp\a1.ts')))

-command "record(rid(1237),pid(5,7,8),buildpat(55,8),send(file('C:\Temp\a1.ts')))"


To save PID {5, 7, 8} as a TS to C:\Temp\a1.ts, and change PMT 8 so that PID 5 has type 1, and PID 7 has type 3:
record(rid(1237),pid(5,7,8),patchpmt(8,pt(5,1),pt(7,3)),send(file('C:\Temp\a1.ts')))

-command "record(rid(1237),pid(5,7,8),patchpmt(8,pt(5,1),pt(7,3)),send(file('C:\Temp\a1.ts')))"


To UDP stream to localhost, port 1234:
record(rid(1237),progid(135),buildpat,send(udp(localhost,1234)))

-command "record(rid(1237),progid(135),buildpat,send(udp(localhost,1234)))"


For UDP streaming, max message size and multi-cast TTL can also be specified (optional):
record(rid(1237),progid(135),buildpat,send(udp(destination,1234,maxmsg(3000),mttl(2))))

-command "record(rid(1237),progid(135),buildpat,send(udp(destination,1234,maxmsg(3000),mttl(2))))"


For HTTP streaming (for one client):

record(rid(1237),progid(135),buildpat,send(http(1234)))

-command "record(rid(1237),progid(135),buildpat,send(http(1234)))"


For HTTP streaming using VLC, use a command like the following (note that VLC 0.8.6i was used; other versions may use a different syntax):
record(rid(123),progid(135),buildpat,send(prog('"C:\Program Files\VideoLAN\VLC\vlc.exe" -I rc --rc-quiet - --sout #standard{access=http,mux=ts,dst=:1234} vlc://quit')))

-command "record(rid(123),progid(135),buildpat,send(prog('""C:\Program Files\VideoLAN\VLC\vlc.exe"" -I rc --rc-quiet - --sout #standard{access=http,mux=ts,dst=:1234} vlc://quit')))"


To watch the whole TS with VLC, use a command like the following (note that VLC 0.8.6i was used; other versions may use a different syntax):
record(rid(123),send(prog('"C:\Program Files\VideoLAN\VLC\vlc.exe" - vlc://quit')))

-command "record(rid(123),send(prog('""C:\Program Files\VideoLAN\VLC\vlc.exe"" - vlc://quit')))"


To watch program ID 135 with VLC, use a command like the following (note that VLC 0.8.6i was used; other versions may use a different syntax):
record(rid(123),progid(135),buildpat,send(prog('"C:\Program Files\VideoLAN\VLC\vlc.exe" - vlc://quit')))

-command "record(rid(123),progid(135),buildpat,send(prog('""C:\Program Files\VideoLAN\VLC\vlc.exe"" - vlc://quit')))"


To save as an MPEG-PS using ffmpeg (note that ffmpeg rev 10475 was used):
record(rid(1238),progid(135),buildpat,send(prog('"C:\ffmpeg\ffmpeg.exe" -i - -vcodec copy -acodec copy -f dvd -y "C:\Temp\a1.mpg"')))

-command "record(rid(1238),progid(135),buildpat,send(prog('""C:\ffmpeg\ffmpeg.exe"" -i - -vcodec copy -acodec copy -f dvd -y ""C:\Temp\a1.mpg""')))"


To save as an MPEG-PS using VLC (note that VLC 0.8.6i was used; other versions may use a different syntax):
record(rid(1238),progid(135),buildpat,send(prog('"C:\Program Files\VideoLAN\VLC\vlc.exe" -I rc --rc-quiet - --sout #standard{access=file,mux=ps,dst="C:\Temp\a2.mpg"} vlc://quit')))

-command "record(rid(1238),progid(135),buildpat,send(prog('""C:\Program Files\VideoLAN\VLC\vlc.exe"" -I rc --rc-quiet - --sout #standard{access=file,mux=ps,dst=""C:\Temp\a2.mpg""} vlc://quit')))"


To save as an MPEG-PS using mencoder (note that mencoder rev 29355 was used):
record(rid(1238),progid(135),buildpat,send(prog('"C:\mplayer\mencoder.exe" file://- -ovc copy -oac copy -of mpeg -o "C:\Temp\a3.mpg"')))

-command "record(rid(1238),progid(135),buildpat,send(prog('""C:\mplayer\mencoder.exe"" file://- -ovc copy -oac copy -of mpeg -o ""C:\Temp\a3.mpg""')))"


You can also pipe two or more programs (output of first program is sent to input of second program, and so on), using nested prog(...) in the following form:
prog('"b1.exe"',prog('"b2.exe"',prog('"b3.exe"')))

To pipe the output of ffmpeg to VLC:
record(rid(1238),progid(135),buildpat,send(prog('"C:\ffmpeg\ffmpeg.exe" -i - -vcodec copy -acodec copy -f dvd -'),prog('"C:\Program Files\VideoLAN\VLC\vlc.exe" - vlc://quit')))

-command "record(rid(1238),progid(135),buildpat,send(prog('""C:\ffmpeg\ffmpeg.exe""" -i - -vcodec copy -acodec copy -f dvd -'),prog('""C:\Program Files\VideoLAN\VLC\vlc.exe"" - vlc://quit')))""


To save the stderr of the launched program, for logging purposes:
record(rid(1238),progid(135),buildpat,send(prog('"C:\ffmpeg\ffmpeg.exe" -i - -vcodec copy -acodec copy -f dvd -y "C:\Temp\a1.mpg"',stderr('C:\Temp\a1.log'))))

-command "record(rid(1238),progid(135),buildpat,send(prog('""C:\ffmpeg\ffmpeg.exe"" -i - -vcodec copy -acodec copy -f dvd -y ""C:\Temp\a1.mpg""',stderr('C:\Temp\a1.log'))))"

spot an error, suggestions? email me