Screen PAC and UniPac

OpenSaveBinaryBroadcast

The binary subtitle files of Screen's systems, which subtitling houses exchange with broadcasters: a record for each subtitle, its times, its row and its lines. PAC writes its text in a code page it does not name. UniPac, the .fpc, writes it in Unicode.

At a glance

Media typeNone registered
SpecificationNone published. Screen's own format. Subtitld follows Subtitle Edit, whose reader and writer were worked out from real files.
Time precisionA frame. The file does not say at what rate.
Text encodingPAC: a code page the file does not name. Latin, Greek, Cyrillic, Hebrew, Arabic and Thai a byte a character; Chinese, Korean and Japanese two. UniPac: UTF-8.
StylingItalics; seven colours, as Subtitld reads them
PositioningA row, 0 at the top to 11 at the bottom, and left, centre or right
SpeakersNone
In containersNone. A file delivered with the programme.

Anatomy of a file

Not text but bytes: a 20-byte header, then a record for each subtitle.

Header · 01, then 19 zeros
Record · 00 · number 0 · 60
  00:00:23:00
  00:00:24:12
  24 bytes · row 11
  centred · You're a jerk, Thom.
Record · 00 · number 1 · 60
  …
FF … dummy end of file
  1. 1 · Header

    A 01 and zeros. What else it could hold is not known.

  2. 2 · Timing

    The record's number, the marker 60, then its times in and out.

  3. 3 · Text

    How many bytes follow, the row the subtitle starts on, then each line: its alignment and its text.

  4. 4 · End

    What Subtitle Edit writes after the last record, and Subtitld with it. What Screen's own tools put there is not known; readers stop at the last record.

A record, byte by byte

The first subtitle above, as Subtitld writes it:

Bytes What they are
00 The start of a record
00 00 Its number, low byte first, from 0
60 The marker every record has
00 00 FC 08 Time in Hours and minutes, then seconds and frames, each pair as one number, low byte first: 0000 and 08FC, 2300, are 00:00 and 23:00
00 00 6C 09 Time out 096C, 2412: 00:00:24:12
18 00 24 bytes follow
0B Row 11, the bottom
FE 02 03 A line begins, centred: 00 right, 01 left, 02 centre
59 6F 75 … You're a jerk, Thom.

A UniPac record has 80 80 80 after the row, and each line's text between 1F EF BB BF and a full stop, in UTF-8. Its own full stops are written as FF.

The timecode

No frame rate in the file. A PAC counts frames, but does not say how many a second. Subtitld counts them at the video's rate, else 25. Open a file with its video, or check the timing against it.

Code pages

A PAC's text is in one of Screen's code pages, and the file does not say which. Subtitld knows these, from Subtitle Edit's tables:

Code page What it holds
Latin ASCII, with accents written before their letter. Czech, Turkish and Portuguese variants.
Greek, Cyrillic Their letters on the places of the ASCII letters, the Latin ones moved
Hebrew, Arabic, Thai Their letters above ASCII
Chinese (Big5 or GB2312), Korean, Japanese Two bytes a character, a line at a time, after 1F 57 31 36

A line can be in a second code page, marked in its alignment byte. Italics run from < to >, or to the end of the line, each mark taking the place of a space. The codes 01 to 07 are read as teletext's colours: red, green, yellow, blue, magenta, cyan and white. That is a guess Subtitle Edit makes too.

PAC or EBU STL?

PAC EBU STL
Specification None published EBU Tech 3264
Header 20 bytes, nothing known in it 1,024 bytes: the frame rate, the language, the titles
A subtitle A record as long as its text A 128-byte block, more for a long one
Frame rate Not in the file In the header
Character set Not in the file In the header
Rows 12, as Subtitld reads them 23 in teletext

PAC in Subtitld

Kept in the .pac
  • Every subtitle's text and line breaks
  • Italics
  • Colours, the nearest of seven, in PAC; none in UniPac
  • Where it sits: top, middle or bottom; left, centre or right; and a row between
  • Start and end, to the frame
Nowhere to go
  • Bold, underline, fonts and sizes
  • Characters the code page has no place for, which become their letter without its accent, or "?"
  • The language, which a PAC names only in a header record
  • Speakers, translations beside the original
  • Dubs, speakers' faces and colours

Save a .usfx project to keep them.

Opening a PAC or UniPac file

Subtitld reads:

  • each record by its marker and its length, so that one record's text is never taken for the next;
  • the code page, which nothing in the file names, by trying each on the text: the one under which the letters belong to its script, and the most words are common ones of a language written in it. A short file can fool it;
  • a first record that is a STORY: header as none, its LANG: naming the code page and the language;
  • lines in a second code page, found the same way;
  • italics, and colours as teletext's;
  • the Latin letters and digits in Hebrew and Arabic lines, which the files keep reversed, in reading order;
  • the row and the alignment as one of nine places, and a row between them as a margin;
  • frames at the video's rate, else 25.

The language the file names, or its code page's script, becomes the project's. The code page and the frame rate are kept, to save the file again as it was. A file that does not begin as a PAC does says so.

Exporting PAC and UniPac

Subtitld's export dialog with PAC chosen, at 25 frames a second, the code page chosen automatically

Export, then Subtitles and PAC or FPC, offers:

  • TextThe original, a translation, or both, the translation below.
  • Speaker namesLeft out, or before the text (Thom: …).
  • FormattingKept, or removed.
  • Shift timesEvery subtitle earlier or later by the same amount.
  • Frame rateThe video's, unless you choose. The file does not say it, so tell whoever takes it.
  • Code pagePAC only: automatic, from the language and the text, or one of the thirteen. A code page that does not hold the text gives way to one that does.

Lines the file's code page has no place for go in a second one, when one holds them. FPC writes every line in UTF-8, and no colours. A subtitle at the top starts on row 1, one in the middle on row 6, one at the bottom ends on row 11.

Not checked against Screen's tools. What Subtitld writes follows Subtitle Edit's reader and writer. No file it wrote has been opened in Screen's own software.

Trivia

Polistream

Screen Subtitling's transmission systems, which play subtitles out to air. PAC is their format.

2011

Screen licensed Spot Software to write PAC files: the first subtitling software maker outside a formal partnership to pass Screen's PAC tests.

13

Code pages Subtitld knows a PAC's text by. None of them is named in the file.

Related formats

Have a .pac .fpc to fix?

Open it in Subtitld with the video and retime it on the waveform.

Download Subtitld