REC File Documentation
Summary
A Topfield PVR Recording (.rec) is a TV programme captured by a Topfield personal video recorder. Technically it is an MPEG-2 transport stream (MIME video/mp2t) prefixed with a proprietary Topfield header holding the channel name and programme-guide data. VLC often plays it directly; if not, strip the header with a community tool (rec2mpg or tfrec2ts) to get a clean .ts/.mpg that any player accepts. To make it portable, convert the de-headered stream to .mp4 with HandBrake or ffmpeg.
Technical details
| Feature | Value |
|---|---|
| Full name | Topfield PVR Recording |
| File extension | .rec |
| MIME type | video/mp2t |
| Format type | MPEG-2 Transport Stream with a proprietary Topfield header |
| Developer | Topfield |
| Created by | Topfield set-top digital video recorders (PVRs) |
| Introduced | Topfield PVRs, early-to-mid 2000s |
| Header | Proprietary, undocumented; carries channel name, EPG and service info |
| Stream body | MPEG-2 Transport Stream (188-byte packets, sync byte 0x47) |
| Video/audio codecs | MPEG-2 (SD) or H.264 (HD), as broadcast |
| Magic number | None fixed (proprietary header); TS sync 47 repeats after de-headering |
| Open standard | No (Topfield wrapper); TS body is standard MPEG-2 (ISO/IEC 13818-1) |
| De-header tools | rec2mpg, tfrec2ts |
| Safe to open/edit | Yes — inert media |
Other .rec meanings | CCTV/DVR surveillance recordings; generic recorded-data logs |
| Related extensions | .ts, .m2ts, .mpg, .vob |
What is a REC file?
The extension .rec just means “recording”, and it is used by more than one kind of device, so it is not a single format. On this site the primary meaning is the Topfield PVR Recording: a television programme captured by a Topfield set-top personal video recorder (PVR). Topfield’s recorders saved broadcasts to their internal hard drive as .rec files, and users meet these files after copying recordings off the box onto a PC. Two other, unrelated things also produce .rec files, covered honestly at the end: CCTV and security-DVR recordings, and generic recorded-data logs written by assorted PC programs.
A Topfield .rec is really two things stacked together. The bulk of it is a standard digital-TV stream, the same kind of MPEG multiplex a broadcaster transmits. In front of that stream sits a proprietary Topfield header. Understanding that split is the key to opening and converting these files, because the stream is a well-documented format and the header is not.
The Topfield header (proprietary)
Every Topfield recording begins with a large header that is specific to Topfield’s software and is not publicly documented. It stores the metadata the PVR needs to present the recording in its on-screen library: the channel name, electronic programme guide (EPG) text such as the programme title and synopsis, and service information from the broadcast. Reports from the community tools that handle these files put the header at up to roughly two kilobytes, but because Topfield never published its layout, the exact field offsets are not something to state with confidence, and this article does not invent them.
That header is the whole reason a Topfield .rec sometimes will not play in a media player: the player looks at the first bytes, does not find a recognisable stream, and gives up. The fix is to remove the header. Free community tools, rec2mpg and tfrec2ts, strip the Topfield prefix and write out the stream underneath as an ordinary file that any player or converter accepts.
Inside: the MPEG-2 transport stream
Once the header is gone, what remains is a standard MPEG-2 Transport Stream (TS), the multiplex defined by ISO/IEC 13818-1 and used for digital-TV broadcasting. A transport stream is a continuous sequence of fixed-size packets, and its structure is concrete and documented:
TS packet = 188 bytes, repeating:
byte 0 0x47 sync byte (marks every packet)
bytes 1-3 flags + PID (13 bits) which elementary stream this packet carries
+ adaptation/scrambling/continuity control
bytes 4-187 payload a slice of video, audio, or a table (PAT/PMT)
Every packet starts with the sync byte 0x47, and packets are exactly 188 bytes long, so the sync byte reappears at 188-byte intervals through the whole stream; that regular 47 is how a de-headered Topfield file is recognised as a transport stream. Each packet carries a 13-bit PID (packet identifier) that says which elementary stream the packet belongs to, so the video, the audio and the signalling tables are interleaved through the same file and demultiplexed by PID. Two special tables let a player find the content: the Program Association Table (PAT, on PID 0) lists the programmes, and each programme’s Program Map Table (PMT) lists the PIDs of its video and audio streams and names their codecs. The recorded video is usually MPEG-2 for standard-definition channels or H.264 for high-definition ones, exactly as it was broadcast, since the PVR captured the transmitted stream rather than re-encoding it.
Playing and converting a Topfield recording
The first thing to try is simply VLC: it understands transport streams and plays many Topfield recordings directly, tolerating the header in a way most players do not. If VLC cannot open the file, de-header it with rec2mpg or tfrec2ts and try the resulting file, which will play.
Because the body is already an MPEG stream, converting a Topfield recording to MPG or to a plain TS is essentially lossless: the de-header step (rec2mpg or tfrec2ts) copies the stream out unchanged, with no re-encoding. Making the recording portable is a different operation. Converting to MP4 for a phone or a video editor is a normal remux or re-encode with HandBrake or ffmpeg: if the stream is already H.264 it can often be copied straight into an MP4 container, and if it is MPEG-2 it is re-encoded. The realistic order is always the same: try VLC, strip the header if needed, then convert the clean stream.
Other REC files: CCTV and generic recorders
Not every .rec is a Topfield recording, and it is worth being honest about the other two kinds because they need completely different handling. The first is a CCTV or security-DVR recording: many surveillance recorders write a proprietary .rec container (often wrapping H.264 or H.265) that usually opens only in the manufacturer’s bundled player, or through that player’s export-to-MP4/AVI feature. There is no universal opener for these; the recorder’s own software is the route. The second is a generic recorded-data file: assorted PC programs write non-video .rec logs, telemetry or voice data that mean nothing outside the application that produced them. If a .rec does not behave like video (it will not play in VLC even after de-headering), it is probably one of these, and the answer is to find the program that created it.
References
- VideoLAN — VLC media player
- VideoHelp — converting Topfield PVR .rec files (rec2mpg / tfrec2ts)
- HandBrake — open-source video transcoder
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.