diff --git a/doc/muxers.texi b/doc/muxers.texi
index 62f4091..8f0c5a1 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -1528,6 +1528,15 @@ is @code{-1}, which results in shifting timestamps so that they start from 0.
 @item omit_video_pes_length @var{boolean}
 Omit the PES packet length for video packets. Default is @code{1} (true).
 
+@item pcr_all_video @var{boolean}
+Include PCR values in all video streams. Default is @code{0} (false).
+
+@item pcr_all_audio @var{boolean}
+Include PCR values in all audio streams. Default is @code{0} (false).
+
+@item pcr_all_data @var{boolean}
+Include PCR values in all data streams. Default is @code{0} (false).
+
 @item pcr_period @var{integer}
 Override the default PCR retransmission time in milliseconds. Ignored if
 variable muxrate is selected. Default is @code{20}.
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 3339e26..fb7f11a 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -113,6 +113,9 @@ typedef struct MpegTSWrite {
     double sdt_period;
     int64_t last_pat_ts;
     int64_t last_sdt_ts;
+    int pcr_all_video;
+    int pcr_all_audio;
+    int pcr_all_data;
 
     int omit_video_pes_length;
 } MpegTSWrite;
@@ -237,6 +240,7 @@ typedef struct MpegTSWriteStream {
     int prev_payload_key;
     int64_t payload_pts;
     int64_t payload_dts;
+    int local_pcr_packet_count;
     int payload_flags;
     uint8_t *payload;
     AVFormatContext *amux;
@@ -902,6 +906,7 @@ static int mpegts_init(AVFormatContext *s)
         pids[i]                = ts_st->pid;
         ts_st->payload_pts     = AV_NOPTS_VALUE;
         ts_st->payload_dts     = AV_NOPTS_VALUE;
+        ts_st->local_pcr_packet_count = -1;
         ts_st->first_pts_check = 1;
         ts_st->cc              = 15;
         ts_st->discontinuity   = ts->flags & MPEGTS_FLAG_DISCONT;
@@ -1178,11 +1183,17 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
     int64_t pcr = -1; /* avoid warning */
     int64_t delay = av_rescale(s->max_delay, 90000, AV_TIME_BASE);
     int force_pat = st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && key && !ts_st->prev_payload_key;
+    int force_pcr = 0;
 
     av_assert0(ts_st->payload != buf || st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO);
     if (ts->flags & MPEGTS_FLAG_PAT_PMT_AT_FRAMES && st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
         force_pat = 1;
     }
+    if ((ts->pcr_all_video && st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) ||
+        (ts->pcr_all_audio && st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) ||
+        (ts->pcr_all_data && st->codecpar->codec_type  == AVMEDIA_TYPE_DATA)) {
+            force_pcr = 1;
+    }
 
     is_start = 1;
     while (payload_size > 0) {
@@ -1198,6 +1209,16 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
                 ts_st->service->pcr_packet_count = 0;
                 write_pcr = 1;
             }
+        } else if (force_pcr) { // for streams other than the primary PCR stream
+            if (ts_st->local_pcr_packet_count < 0) // copy from primary
+                ts_st->local_pcr_packet_count = ts_st->service->pcr_packet_count;
+            if (ts->mux_rate > 1 || is_start) // VBR pcr period is based on frames
+                ts_st->local_pcr_packet_count++;
+            if (ts_st->local_pcr_packet_count >=
+                ts_st->service->pcr_packet_period) {
+                ts_st->local_pcr_packet_count = 0;
+                write_pcr = 1;
+                }
         }
 
         if (ts->mux_rate > 1 && dts != AV_NOPTS_VALUE &&
@@ -1228,7 +1249,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
         }
         if (key && is_start && pts != AV_NOPTS_VALUE) {
             // set Random Access for key frames
-            if (ts_st->pid == ts_st->service->pcr_pid)
+            if (ts_st->pid == ts_st->service->pcr_pid || force_pcr)
                 write_pcr = 1;
             set_af_flag(buf, 0x40);
             q = get_ts_payload_start(buf);
@@ -1951,6 +1972,15 @@ static const AVOption options[] = {
     { "omit_video_pes_length", "Omit the PES packet length for video packets",
       offsetof(MpegTSWrite, omit_video_pes_length), AV_OPT_TYPE_BOOL,
       { .i64 = 1 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },
+    { "pcr_all_video", "Include PCR values in all video streams",
+      offsetof(MpegTSWrite, pcr_all_video), AV_OPT_TYPE_BOOL,
+      { .i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },
+    { "pcr_all_audio", "Include PCR values in all audio streams",
+      offsetof(MpegTSWrite, pcr_all_audio), AV_OPT_TYPE_BOOL,
+      { .i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },
+    { "pcr_all_data", "Include PCR values in all data streams",
+      offsetof(MpegTSWrite, pcr_all_data), AV_OPT_TYPE_BOOL,
+      { .i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },
     { "pcr_period", "PCR retransmission time in milliseconds",
       offsetof(MpegTSWrite, pcr_period), AV_OPT_TYPE_INT,
       { .i64 = PCR_RETRANS_TIME }, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
