\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{xcolor}

\usepackage{geometry}
 \geometry{
 a4paper,
 total={170mm,257mm},
 left=20mm,
 top=20mm,
 }

\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=cyan,
    pdftitle={skyscraper8 Manual},
    pdfpagemode=FullScreen,
    }


\author{Fey}
\title{skyscraper8 \\ A hobbyist project to learn about MPEG-II}
\date{October 2025}

\NewDocumentCommand{\codeword}{v}{%
\texttt{\textcolor{blue}{#1}}%
}

\begin{document}

\maketitle

Hello! Thanks for your interest in skyscraper8, a program I'm writing to learn about satellite and Cable TV technology, mainly for fun - as a hobby, not out of professionalism.

\section{An explanation of what skyscraper8 is}
Consider a compression format like Pavlov's 7Z, Roshal's RAR, Katz' ZIP, or a container format like GNU TAR. These formats are designed to store one or multiple files in a larger container file and optionally compress these.

Now consider a program like 7-zip, WinRAR, or WinZIP. These archiving programs are designed to extract files out of containers mentioned above and many other file container formats.

Next, introduce the MPEG-2 Transport Stream\footnote{ISO/IEC 13818-1, ITU-T Recommendation H.222.0}. (hereinafter referred to as "TS") This is a data structure designed to carry video, audio and additional other accompanying data in real-time and for storage. Such additional data may be IP packets, an EPG, an interactive application like a game to play during commercial breaks, receiver system software updates or album art on a radio channel. A broadcaster's imagination is the only real limit here.

As you can probably imagine, most of these things I named exist in a filesystem based structure on a computer. Therefore, since the receivers designed to make use of this data have to extract it from a TS, a standard computer should be able to do so as well. However, there are not many applications out there that can actually do this. \\ 
A video playback application like VLC or MPC-HC treat a TS as video file, not an archive, and will play it back - rightfully so. \\ 
An archiving program like WinRAR also assumes a TS is a video file and isn't even wrong about that. But that means it wouldn't know how to extract contained files from it.

This is the niche gap skyscraper8 intents to cover: Extracting files transmitted along in a TS.

\section{How to get TS into skyscraper8}
skyscraper8 is a command-line operated tool. A graphical user interface is planned, but not yet fully developed. \\
This means that you have to use the command-line interpreter of your operating system to use skyscraper8. On Windows, both cmd.exe and PowerShell are known to work well.

\subsection{Using a StreamReader compatible tuner}
\textbf{This is the preferred way} and applies to tuners like the popular TBS5927 or TBS6903x. 
\\You can use any StreamReader.dll hosting application like CrazyScan or VMA Stream Reader that is capable of streaming to TCP and have skyscraper8 read that stream.
\\Use your hosting application and start a TCP stream like you normally would. Then call skyscraper8 from a command line:
\begin{verbatim}
.\skyscraper8.exe cscan tcp://127.0.0.1:6969
\end{verbatim}

\subsection{Using a BDA compatible tuner}
Use TSDuck's \codeword{tsp} and use the \codeword{dvb} input plugin and the \codeword{ip} output plugin.
\\ TODO: Talk about TSDuck here.

\subsection{Using a video4linux compatible tuner}
See the paragraph about BDA tuners. The same applies to video4linux compatible tuners. TSDuck's \codeword{tsp} can be used on Windows and Linux in the same way.

\subsection{Using a SAT\textgreater IP capable tuner}
This feature is intended for SAT\textgreater IP server devices like the Digital Devices Octopus NET or the Kathrein EXIP 418. If you're using a PCI/PCIe tuner card or an USB Tuner with your PC, these passages about SAT\textgreater IP do not apply to you.

To use skyscraper8 with a SAT\textgreater IP device, open up a shell and use the following command scheme:

\begin{verbatim}
.\skyscraper8.exe satip IP_ADDRESS DISEQC POLARITY FREQUENCY SYSTEM SYMBOL_RATE
\end{verbatim}

Replace these variables as follows:
\\
\begin{tabular}{llp{5cm}}
\hline 
IP\_ADDRESS & \parbox{13.5cm}{The IP address (for example 172.20.20.122) of your SAT\textgreater IP server, or "auto" for autodetection of a SAT\textgreater IP server.} \\
\hline 
DISEQC & \parbox{13.5cm}{The DiSEqC 1.0 Port you want to use. Say "1" here for A/A, "2" for B/A, "3" for A/B, 4 for B/B} \\ 
\hline 
POLARITY & \parbox{13.5cm}{Either "H" or "V". The SAT\textgreater IP specification also allows "L" and "R", but this is not yet implemented in skyscraper8.} \\ 
\hline 
FREQUENCY & \parbox{13.5cm}{The frequency you want to tune to in MHz. (for example 12226)} \\ 
\hline 
SYSTEM & \parbox{13.5cm}{SYSTEM is either "S" or "S2". The SAT\textgreater IP specification  does not consider S2X, but in my testings, an S2X capable device like the Octopus NET also accepts "S2" here for S2X transponders. } \\ 
\hline 
SYMBOL\_RATE  & \parbox{13.5cm}{The symbol rate of the transponder you want to tune to in Ks. (for example 27500)} \\ 
\hline 
\end{tabular}\\

So a valid command would be for example:

\begin{verbatim}
.\skyscraper8.exe satip 172.20.20.122 2 V 12226 S2 27500
\end{verbatim}
to tune to the Hotbird DVB-NIP demo transponder, assuming Hotbird is at DiSEqC B/A. \\

If you don't know your SAT\textgreater IP server address, the following command would accomplish the same: 
\begin{verbatim}
.\skyscraper8.exe satip auto 2 V 12226 S2 27500"
\end{verbatim}

If your SAT\textgreater IP server features a STiD135 chipset, you can also catch GS/GSE with it.

\subsection{Using prerecorded TS files}
This is probably the simplest way to get a TS into skyscraper8. Just run the skyscraper8.exe from the commandline passing the path to your TS file as an argument.
For example:
\begin{verbatim}
.\skyscraper8.exe C:\Videos\capture.ts
\end{verbatim}

If you have a folder containing multiple TS files, you can also pass a directory path as an argument:
\begin{verbatim}
.\skyscraper8.exe C:\Videos\Blindscans\
\end{verbatim}
This will cause skyscraper8 to process ALL ts files in the specified directory. Note that this will also check subdirectories.

Extracted files will be written to the directory the command-line interpreter has been cd'ed to.

If you are using Microsoft Windows, you can also Drag’n’Drop a TS file onto the skyscraper8.exe. The extracted data will be placed into the same directory the TS is in.

\section{What skyscraper8 can not do}
\begin{itemize}
	\item Watch TV or Listen to Radio. Extracting files and playing back audio/video are two very different things, and skyscraper8 is not designed to do the latter. If this is something you're looking for, you probably want something like ProgDVB or DVBViewer.
	\item Descramble encrypted channels. This is illegal in most, if not all, jurisdictions, and I want nothing to with that.
	\item Circumvent copy protections. TS contained on Blu-Ray disc are usually scrambled using AACS. Although not too difficult, bypassing it is also a complicated legal matter, which is why I prefer not doing it.
	\item Descramble encrypted DOCSIS\footnote{Data-Over-Cable Service Interface Specifications} Traffic. While skyscraper8 does understand DOCSIS traffic and is perfectly capable of sniffing packets from it using tuners like the TBS-6281 SE, it will drop any scrambled packets - meaning those that have the DOCSIS privacy extension enabled.
	\item Do a professional grade analysis of a TS. There are many intricacies in broadcasting systems which are out of scope for a simple file extractor developed by a mere hobbyist. If you're looking for a professional grade analyzing tool, I'd recommend you to check out the tools included in VMA Video Analyzer, Dektec's StreamXpert, GkWare's StreamGuru, or the \codeword{analyze} plugin of TSDuck.
	\item Handle MPEG-DASH streams. Currently, there are two known video formats used in DVB-NIP: HLS and MPEG-DASH. While skyscraper8 is able to extract segments of both types from a TS, I do not know of an easy way to playback MPEG-DASH formatted streams. HLS on the other hand is trivial.
\end{itemize}

\section{How skyscraper8 was made}
skyscraper8 is developed in the C\# programming language, using Microsoft Visual Studio 2022. Therefore it requires a Microsoft .NET runtime, which is included in Microsoft Windows and freely available for most Linux distributions and Apple's macOS.

The .NET assembly of skyscraper8 is not obfuscated or protected in any way. This is on purpose. If you want to study how skyscraper8 works under the hood, I hereby allow you to use tools like RedGate's Reflector or JetBrains' dotPeek to inspect the skyscraper8.dll file. Of course you can also acquire the source code from my Gitea instance.\footnote{\url{https://gitea.yo3explorer.moe/ft/skyscraper8}}

This document was typeset in \LaTeX{}, using the TeX Live distribution, and while I wrote it myself, I did use GPT-5 for proofreading. The proofreading of this document is the only part of skyscraper8 for which an LLM was used. No part of the actual skyscraper8 codebase itself was written by an LLM.

\end{document}