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.

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.

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

Download DVPiper version 1.49 here
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. The first device is 1
  -devicename [value] Use a specific device friendly name, or
  -devicename2 [val]  Use a specific device 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
  -genericnp          Use generic/universal network provider
                      May work better for some hybrid devices
  -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
  -lowosc [value]     DVB-S LNB low oscillator frequency in kHz
  -highosc [value]    DVB-S LNB high oscillator frequency in kHz
  -lnbswitch [value]  DVB-S LNB switch frequency in kHz
  -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
  -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
  -charset            Set the default character set for channel list and EPG:
                      AUTO (apply known character set fixes - for EPG only),
                      DVB (default DVB character set),
                      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)
                      Default is DVB, the default DVB character set
                      This only needs to be set for broadcasters that don't
                      follow the DVB 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, and a Polish EPG that
                      needs to be set to AUTO
  -changecontinue     Do not stop a recording on change in PIDs
                      Not recommended as resulting file may not be playable
  -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 called 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
  -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 canceled
                      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.
                      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
  -epg [filename]     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:
DVPiper.exe -type DVB-T -frequency 200500 -bandwidth 7

DVPiper.exe -type DVB-T -frequency 200500 -bandwidth 7 -command signal

DVPiper.exe -type DVB-T -frequency 200500 -bandwidth 7 -epg "C:\a1.xml"

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

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

DVPiper.exe -type DVB-S -frequency 3000500 -symbolrate 25000 -lowosc 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
  getrate          Show current data flow in bytes per second from device
  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 channel change
  channel(...)     Change channel. Previous values will be used if not set
                   E.g. channel(frequency(4000000),polar(H),diseqc(e0316b01))
                   changecontinue(YES or NO), buffer(.), and epgchar(.) can
                   also be used
  listprogram      Scan stream and list all programs found
  listprogramxml   Scan stream and list all programs found in XML format
  listprogram(id)  Scan stream for a certain Program ID and show details
  provider         Scan and list frequency information in XML format - only
                   for DVB-x systems and only for broadcasters that publish
                   channels' frequencies
  provider(f)      Scan and save frequency information to a file in XML format
  providerdec(f)   Same as provider(f) except filename is in UTF-8 URL form
  lookup(h,s)      Lookup host and service/port information
                   The first result shown is used for HTTP/UDP streaming
                   E.g. lookup(aa.com,rtsp)  lookup(aa.com)  lookup(,ftp)
  epg(...)         Get Electronic Program Guide (EPG) and save to a file in
                   XMLTV format. For more complete control use record(...)
                   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)
                   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
  epgdec(...)      Same as epg(...) except filename is in UTF-8 URL form
  run(...)         Run an external program. Type helprun for instruction
  rundec(...)      Same as run(...) except first argument is in UTF-8 URL form
  record(...)      Record transport stream. Type helprecord for instruction
  count            Show number of active recordings
  list             List details of all active recordings
  list(RID)        Show details of a particular recording
  stop             Stop all recordings
  stop(RID)        Stop a particular recording
  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 -priority
      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)
        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(.)) stdout of
        the launched program is used for HTTP stream serving
        timeout1(.), timeout2(.), maxclient(.), and sockbuffer(.) are optional
        (default values are inherited from -httptimeout1, -httptimeout2, 
        -httpmaxclient, and -httpsockbuffer 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('%%28dog%%29.log') for stdout('(dog).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(...) but first argument (program to be
    launched) is encoded in UTF-8 URL form (use for non-English filename)
    E.g. rundec('%%28dog%%29.exe') for run('(dog).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('%%28dog%%29' for file('(dog)')
        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('%%28dog%%29.exe') for prog('(dog).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
        epg(...) Get Electronic Program Guide (EPG) and save to a file in
          XMLTV format. See helpcommand for details.
          Use excludepid(.) to exclude unnecessary PIDs
          E.g. record(rid(1),excludepid(8191),send(epg('C:\Temp\epg.xml')))

        Enclose each argument within quotes '...'
        Use two quotes '' for quote within the enclosure
        Keywords within the arguments:
          $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 record only the video, audio, and subtitles use
        the keyword 'vas' e.g. progid(135,vas)
        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 the 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)
        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(PMT_PID,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), PMT_PID 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
      buffer(n) Buffer size suggestion e.g. buffer(8000000)
      priority(.) Priority of recording
        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