HACKTV(1)

NAME
hacktv - manual page for hacktv 20250415

SYNOPSIS
hacktv [options] input [input...]

DESCRIPTION

-o, --output <target>
    Set the output device or file, Default: hackrf

-m, --mode <name>
    Set the television mode. Default: i

--list-modes
    List available modes and exit.

-s, --samplerate <value>
    Set the sample rate in Hz. Default: 16MHz

--pixelrate <value>
    Set the video pixel rate in Hz. Default: Sample rate

-l, --level <value>
    Set the output level. Default: 1.0

-D, --deviation <value>
    Override the mode's FM peak deviation. (Hz)

-G, --gamma <value>
    Override the mode's gamma correction value.

-i, --interlace
    Update image each field instead of each frame.

--fit <mode>
    Set fit mode (stretch, fill, fit, or none), Default: stretch

--min-aspect <value>
    Set the minimum aspect ratio for fit mode.

--max-aspect <value>
    Set the maximum aspect ratio for fit mode.

-r, --repeat
    Repeat the inputs forever.

--shuffle
    Randomly shuffle the inputs.

-v, --verbose
    Enable verbose output.

--teletext <path>
    Enable teletext output. (625 line modes only)

--wss <mode>
    Enable WSS output. (625 line modes only)

--videocrypt <mode>
    Enable Videocrypt I scrambling. (PAL only)

--videocrypt2 <mode>
    Enable Videocrypt II scrambling. (PAL only)

--videocrypts <mode>
    Enable Videocrypt S scrambling. (PAL only)

--syster
    Enable Nagravision Syster scambling. (PAL only)

--systeraudio
    Invert the audio spectrum when using Syster.

--acp
    Enable Analogue Copy Protection signal.

--vits
    Enable VITS test signals.

--cc608
    Enable CEA/EIA-608 closed-caption pass through.

--vitc
    Enable VITC time code.

--filter
    Enable experimental VSB modulation filter.

--nocolour
    Disable the colour subcarrier (PAL, SECAM, NTSC only).

--s-video
    Output colour subcarrier on second channel. (PAL, NTSC, SECAM baseband modes only).

--volume <value>
    Adjust volume. Takes floats as argument.

--noaudio
    Suppress all audio subcarriers.

--nonicam
    Disable the NICAM subcarrier if present.

--a2stereo
    Enable Zweikanalton / A2 Stereo, disables NICAM.

--single-cut
    Enable D/D2-MAC single cut video scrambling.

--double-cut
    Enable D/D2-MAC double cut video scrambling.

--eurocrypt <mode>
    Enable Eurocrypt conditional access for D/D2-MAC.

--scramble-audio
    Scramble audio data when using D/D2-MAC modes.

--chid <id>
    Set the channel ID (D/D2-MAC).

--mac-audio-stereo
    Use stereo audio (D/D2-MAC). (Default)

--mac-audio-mono
    Use mono audio (D/D2-MAC).

--mac-audio-high-quality
    Use high quality 32 kHz audio (D/D2-MAC). (Default)

--mac-audio-medium-quality Use medium quality 16 kHz audio (D/D2-MAC).

--mac-audio-companded
    Use companded audio compression (D/D2-MAC). (Default)

--mac-audio-linear
    Use linear audio. (D/D2-MAC).

--mac-audio-l1-protection
    Use first level protection (D/D2-MAC). (Default)

--mac-audio-l2-protection
    Use second level protection (D/D2-MAC).

--sis <mode>
    Enable Sound-in-Syncs (dcsis only)

--swap-iq
    Swap the I and Q channels to invert the spectrum. Applied before offset and passthru. (Complex modes only).

--offset <value>
    Add a frequency offset in Hz (Complex modes only).

--passthru <file>
    Read and add an int16 complex signal.

--invert-video
    Invert the composite video signal sync and white levels.

--secam-field-id
    Enable SECAM field identification.

--secam-field-id-lines <x> Set the number of lines per field used for SECAM field
    identification. (1-9, default: 9)

--json
    Output a JSON array when used with --list-modes.

--version
    Print the version number and exit.

Input options

test:colourbars
    Generate and transmit a test pattern.

ffmpeg:<file|url>
    Decode and transmit a video file with ffmpeg.

    If no valid input prefix is provided, ffmpeg: is assumed.

ffmpeg input options

--ffmt <format>
    Force input file format.

--fopts <option=value[:option2=value]>
    Pass option(s) to ffmpeg.

HackRF output options

-o, --output hackrf[:<serial>] Open a HackRF for output.

-f, --frequency <value>
    Set the RF frequency in Hz, 0MHz to 7250MHz.

-a, --amp
    Enable the TX RF amplifier.

-g, --gain <value>
    Set the TX VGA (IF) gain, 0-47dB. Default: 0dB

    Only complex modes (RF) are supported by the HackRF. Baseband modes are support with the addition of a HackDAC module.

SoapySDR output options

-o, --output soapysdr[:<opts>] Open a SoapySDR device for output.

-f, --frequency <value>
    Set the RF frequency in Hz.

-g, --gain <value>
    Set the TX level. Default: 0dB

-A, --antenna <name>
    Set the antenna.

fl2k output options

-o, --output fl2k[:<dev>]
    Open an fl2k device for output.

--fl2k-audio <mode>
    Audio mode (none, stereo, spdif), default: none

    Each of the FL2K's three output channels can be used for:

    Red: Baseband video / Complex I signal Green: Complex Q signal / Analogue audio (Left) / Nothing Blue: Analogue audio (Right) / Digital audio (S/PDIF) / Nothing

    The 0.7v p-p voltage level of the FL2K is too low to create a correct composite video signal, it will appear too dark without amplification.

    Digital S/PDIF audio is currently fixed at 16-bit, 32 kHz. Not all decoders work at this sample rate.

    Analogue audio is limited to 8-bits. The LSB is delta-sigma modulated at the FL2K sample rate with the lower 8-bits of the 16-bit audio and may be recovered by using a low pass filter of ~16 kHz on the output.

File output options

-o, --output file:<filename>
    Open a file for output. Use - for stdout.

-t, --type <type>
    Set the file data type.

Supported file types:

    uint8 int8 uint16 int16 int32 float

    The default output is int16. The TV mode will determine if the output is real or complex.

    If no valid output prefix is provided, file: is assumed.

NOTE: The number of samples per line is rounded to the nearest integer, which may result in a slight frame rate error.

For modes which include audio you also need to ensure the sample rate is adequate to contain both the video signal and audio subcarriers.

16MHz works well with PAL modes, and 13.5MHz for NTSC modes.

20.25MHz is ideal for the D/D2-MAC modes, but may not work with all hackrfs.

Teletext

Teletext is a digital information service transmitted within the VBI lines of the video signal. Developed in the UK in the 1970s, it was used throughout much of Europe until the end of analogue TV in the 2010s.

hacktv supports TTI files. The path can be either a single file or a directory. All files in the directory will be loaded.

Raw packet sources are also supported with the raw:<source> path name. The input is expected to be 42 byte teletext packets. Use - for stdin.

Lines 7-22 and 320-335 are used, 16 lines per field.

Teletext support in hacktv is only compatible with 625 line PAL modes. NTSC and SECAM variations exist and may be supported in the future.

WSS (Widescreen Signaling)

WSS provides a method to signal to a TV the intended aspect ratio of the video. The following modes are supported:

4:3 = 4:3 video

14:9-letterbox
    = 14:9 video centred

14:9-top
    = 14:9 video at top

16:9-letterbox
    = 16:9 video centred

16:9-top
    = 16:9 video at top

16:9+-letterbox
    = >16:9 video centred

14:9-window
    = 4:3 video with a 14:9 protected window

16:9
    = 16:9 video (Anamorphic)

auto
    = Automatically switch between 4:3 and 16:9 modes.

Currently only supported in 625 line modes. A 525 line variant exists and may be supported in future.

Videocrypt I

A video scrambling system used by the Sky TV analogue satellite service in the UK in the 1990s. Each line of the image is cut at a point determined by a pseudorandom number generator, then the two parts are swapped.

hacktv supports the following modes:

free
    = Free-access, no subscription card is required to decode.

    conditional = A valid Sky card is required to decode. Sample data from MTV.

Videocrypt is only compatible with 625 line PAL modes. This version works best when used with samples rates at multiples of 14MHz.

Videocrypt II

A variation of Videocrypt I used throughout Europe. The scrambling method is identical to VC1, but has a higher VBI data rate.

hacktv supports the following modes:

free
    = Free-access, no subscription card is required to decode.

Both VC1 and VC2 cannot be used together except if both are in free-access mode.

Videocrypt S

A variation of Videocrypt II used on the short lived BBC Select service. This mode uses line-shuffling rather than line cut-and-rotate.

hacktv supports the following modes:

free
    = Free-access, no subscription card is required to decode.

    conditional = A valid BBC Select card is required to decode. (Does not work yet)

Audio inversion is not yet supported.

Nagravision Syster

Another video scrambling system used in the 1990s in Europe. The video lines are vertically shuffled within a field.

Syster is only compatible with 625 line PAL modes and does not currently work with most hardware.

Some decoders will invert the audio around 12.8 kHz. For these devices you need to use the --systeraudio option.

Eurocrypt

Conditional access (CA) system used by D/D2MAC services, M and S2 versions are supported.

hacktv supports the following modes:

filmnet
    = (M) A valid FilmNet card is required to decode.

tv1000
    = (M) A valid Viasat card is required to decode.

ctv = (M) A valid CTV card is required to decode.

ctvs
    = (S) A valid CTV card is required to decode.

tvplus
    = (M) A valid TV Plus (Netherlands) card is required to decode.

tvs = (S) A valid TVS (Denmark) card is required to decode.

rdv = (S) A valid RDV card is required to decode.

nrk = (S) A valid NRK card is required to decode.

MultiMac style cards can also be used.