[OLD/CLOSED] PseudoTV Live - Set-Top box solution
For those with a SiliconDust HDHomeRun Prime - I used a powershell script written by user wtg on the silicondust forums that I slightly modified. this will work on windows 7 or 8 while running powershell as admin.

Code:
<#
.Synopsis
Creates .strm files that can be used by XBMC to view live TV using a Silicon Dust HDHomeRun.

.Parameter device
If unspecified the script discovers your device id automatically, which should be fine unless you
have multiple HDHomeRuns. If you do have multiple devices, supply the ID of the device you wish
to generate strm files for.

.Parameter tuner
(Optional, default = 0) Supply a different tuner number if desired.

.Parameter outputDir
(Optional, default = %TEMP%) Directory to write the .strm files to. Supply another directory name
if desired, or a period for the current directory.

.Parameter LineUpXML
(Optional, default = "%ProgramData%\SiliconDust\HDHomeRun\Digital*.xml") If you have both a
"Digital Cable.XML" and "Digital Antenna.XML" scan file because you're using the original HDHomeRun
with both cable and antenna inputs - or have at least run a GUI scan from both sources at some
point - you'll need to specify the filename. By the default the script grabs whichever file it finds
in the Silicon Dust program data directory.

.Parameter pad
(Optional) Zero-pad the channel numbers to the specified number of digits.

.Parameter scan
Specify this option if you want the process to generate the files by running a command-line scan
and processing the results. If unspecified the file is generated via the XML file in which the
HDHomeRun stores the last gui scan results. It's much slower to force a scan and the stream files
won't be named as meaningfully.

.Example
   .\gen_strms.ps1 -outputDir c:\temp

   Generate streams for tuner 0 and write the files to c:\temp.

.Example
   .\gen_strms.ps1 -tuner 1 -out c:\temp

   Generate streams for tuner 1 and write to c:\temp. Parms don't need to be spelled out completely.

.Example
   .\gen_strms.ps1 -out . -LineUpXML 'c:\ProgramData\SiliconDust\HDHomeRun\Digital Cable.xml'

   Generate streams for tuner 0 and write files to the current directory, using the Digital Cable.xml
   file.

.NOTES
   Date      Version  Comments
   --------  -------  -------------------------------------------------------
   10/22/12   1.0     Initial release
   11/08/12   1.1     Added ability to specify a scan file on the command line;
                      added error message if two XML scan files are found; added
                      tuner to the output file name; added support for padding
                      channel numbers; improved support for scan file.
#>
Param(
[string] $device    = 'FFFFFFFF',
[string] $tuner     = '0',
[string] $outputDir = "$env:temp",
[int]    $pad       = 1,
[string] $LineUpXML = "$env:ProgramData\SiliconDust\HDHomeRun\CableCard*.xml",
[switch] $scan      = $false,
[string] $ScanFile  = "")

# create a regex pattern to find invalid characters in a filename
$invalid_chars = "[{0}]" -f ([Regex]::Escape([System.IO.Path]::GetInvalidFileNameChars()-join''))
  
if ( $device -eq 'FFFFFFFF' ) {
   # discover the device id, or the last one reported if more than one
   & "$env:programfiles\silicondust\hdhomerun\hdhomerun_config.exe" discover | %{
      switch -regex ($_) {
         "device (\w+) found" { $device = $matches[1] }
      }
   }
   write-host "Creating streams for device id $device"
}    

if ( $scan -or $ScanFile -gt '' ) {
   if ( $scan ) {
      write-host "Starting scan - this can take a while..."      
      $scan_data = & "$env:programfiles\silicondust\hdhomerun\hdhomerun_config.exe" $device scan $tuner
   } else {
      Write-Host "Reading scan file $ScanFile..."
      $scan_data = get-content $ScanFile
   }
   $scan_data | % {
      switch -regex ( $_ ) {
         "SCANNING.*:(?<chan>\d+)"  {  $chan = $matches.chan
                                       write-verbose "Processing physical channel $chan"
                                       break
                                    }
         "PROGRAM (?<PID>\d+): (?<prog>\d*\.*\d*)\s*(?<chan_name>.*)"  {
                                       $ProgID    = $matches.PID
                                       $prog      = $matches.prog
                                       $chan_name = $matches.chan_name
                                       if ( $chan_name -eq "" ) { $chan_name = 'Blank' }
                                       if ( $chan_name -match "(\(encrypted\)|\(control\)|\(no data\))" ) {
                                          write-verbose "Channel $chan_name, program $prog is encrypted or has no data"
                                          break
                                       }
                                       # write the data to the file.
                                       if ( $chan -match '[.]' ) {
                                          # The guide number has a period in it and thus shouldn't be padded
                                          $number = $chan
                                       } else {
                                          $number = ("{0:d$pad}" -f [int]$chan)
                                       }
                                       $file = "$number-$ProgID ($tuner)-$chan_name.strm"
                                       $file = Join-Path $OutputDir ([Regex]::Replace($file, $invalid_chars, ''))
                                       write-host "Writing stream file $file."
                                       "hdhomerun://$device-$tuner/tuner$tuner`?channel=auto:$chan&program=$ProgID" `
                                       | out-file -FilePath $file -encoding "ASCII"
                                    }
      }
   }
} else {  
   # Verify path to GUI listing file.
   switch ( ([array](dir $LineUpXML)).count ) {
      1          {
                    write-output "Loading HDHomeRun's lineup file from last GUI scan..."
                    $xml = [xml](get-content $LineUpXML)
                 }
      {$_ -gt 1} {  throw "More than 1 file exists matching $LineUpXML. Use -LineUpXML option to specify while file to use." }
      default    {  throw "ERROR: Cannot find HDHomeRun's GUI's lineup file $LineUpXML. " }
   }
   Write-Output "Number of channels found: " $xml.LineUp.Program.Count
   $xml.LineUp.Program | %{
      if ($_.Enabled -eq 'true') {
         if ( $_.GuideNumber -match '[.]' ) {
            # The guide number has a period in it and thus shouldn't be padded
            $number = $_.GuideNumber
         } else {
            $number = ("{0:d$pad}" -f [int]$_.GuideNumber)
         }
         $file = "$number ($tuner)-" + $_.Name + '.strm'
         $file = Join-Path $OutputDir ([Regex]::Replace($file, $invalid_chars, ''))
         write-host "Writing stream file $file."
         "hdhomerun://$device-$tuner/tuner$tuner`?channel=$($_.Modulation):$($_.Frequency)&program=$($_.ProgramNumber)" `
         | out-file -FilePath $file -encoding "ASCII"  
      }
   }
}


Messages In This Thread
RE: [FORK] - by jcaa6479 - 2013-07-16, 23:25
Re: RE: - by bry - 2013-07-19, 08:42
Audio Muting Consistently ? - by gjwAudio - 2013-08-18, 08:25
PTVL Anomalies... - by gjwAudio - 2013-08-25, 01:15
Help Find The BAD Channel... - by gjwAudio - 2013-08-27, 02:12
RE: - by DLWhittet - 2013-10-13, 02:48
Problems with Pseudo TV Live - by media-mogul - 2013-11-07, 22:45
Setup wifi cam stream - by rebelmaveric19 - 2013-12-12, 00:54
Black Screen - by Antisthenes - 2014-03-03, 02:06
RE: [FORK] - by Lunatixz - 2014-03-25, 18:21
Re: RE: - by Lunatixz - 2014-04-26, 17:10
RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - by bry - 2014-05-12, 21:10
Update breaks autostart? - by grumpygamer - 2014-07-12, 11:48
Re: RE: Update breaks autostart? - by bry - 2014-07-12, 13:44
PseudoTV Live + HDHomerun Tutorial - by bry - 2014-07-25, 23:17
RE: [FORK] - by tromy - 2014-09-22, 19:14
Custom Live Channel - by GavinCampbell - 2014-11-01, 18:20
Options menu? - by Pendragon445 - 2014-11-02, 20:23
Prevent Stop Button - by GavinCampbell - 2014-11-13, 22:45
RE: [FORK] - by herpkektop - 2015-02-11, 11:22
RE: [FORK] - by herpkektop - 2015-02-11, 17:55
PseudoTv issue - by adamp237 - 2015-03-02, 03:41
No Guide - Android Arm - by MoRbIdBoY - 2015-03-14, 20:26
Chanel Issues - by BlueKalel - 2015-05-03, 07:23
RE: donation - by gkithes - 2015-06-11, 02:27
RE: donation - by bornagainpenguin - 2015-06-11, 03:55
Channel Sharing Feature Freezing - by RORO-RR - 2015-07-11, 18:48
Logout Mark Read Team Forum Stats Members Help
[OLD/CLOSED] PseudoTV Live - Set-Top box solution45