Create Satellite Compliant MPEG-TS Using FFmpeg

This article provides a practical guide on how to configure and run FFmpeg to generate an MPEG-2 Transport Stream (MPEG-TS) optimized for satellite broadcasting. Satellite transmission standards, such as DVB-S and DVB-S2, require strict adherence to specific multiplexing parameters, including constant bitrate (CBR), precise Packet Identifier (PID) mapping, and frequent Program Clock Reference (PCR) insertion. You will learn the exact FFmpeg commands and parameters needed to output a compliant broadcast stream.

The Core Challenges of Satellite MPEG-TS

Satellite receivers (Integrated Receiver-Decoders, or IRDs) require highly stable and predictable streams. Unlike web streaming, where bitrates can fluctuate, satellite transponders operate on a fixed bandwidth. If your stream does not meet the exact bitrate of the allocated satellite slice, the signal will fail.

To achieve satellite compliance, your MPEG-TS container must feature: * Strict Constant Bitrate (CBR): The stream must maintain an identical bitrate at all times using padding (null packets). * Precise PCR Intervals: The Program Clock Reference must be transmitted frequently (typically every 20ms to 40ms) to keep the receiver’s clock synchronized. * Explicit PID Assignment: Video, audio, and metadata packet identifiers must be statically defined so the receiver can decode them without delay.

The FFmpeg Command

Below is the optimized FFmpeg command designed to output a DVB-compliant MPEG-TS stream from a standard MP4 input source.

ffmpeg -i input.mp4 \
  -c:v libx264 -b:v 4000k -maxrate:v 4000k -bufsize:v 8000k \
  -g 50 -keyint_min 50 -sc_threshold 0 \
  -c:a mp2 -b:a 192k -ar 48000 \
  -f mpegts \
  -mpegts_original_network_id 0x0001 \
  -mpegts_transport_stream_id 0x0001 \
  -mpegts_service_id 0x0001 \
  -mpegts_pmt_start_pid 0x1000 \
  -mpegts_start_pid 0x0100 \
  -pcr_period 40 \
  -muxrate 5000k \
  -mpegts_flags +filler \
  output.ts

Parameter Breakdown

To adapt this command to your specific broadcast requirements, you must understand what each parameter does.

1. Video Encoding and GOP Structure

2. Audio Encoding

3. Container and PID Configuration

4. Multiplexing and Satellite Optimization