diff --git a/doc/params.txt b/doc/params.txt
index 2584650..45bdc1d 100644
--- a/doc/params.txt
+++ b/doc/params.txt
@@ -299,6 +299,11 @@ Set the QP bounds.
 Set the frame rate numerator and denominator.
 
 
+* vps-timing=X. Default 0.
+
+Signal timing information in the VPS. Useful when the output format is raw bytestream.
+
+
 * lt-conv-min=X. Default 10.
 
 Minimum number of frames used to compute the ABR rate control convergence window.
diff --git a/f265/bdi.c b/f265/bdi.c
index c78fa2f..f0c85f0 100644
--- a/f265/bdi.c
+++ b/f265/bdi.c
@@ -278,6 +278,7 @@ void f265_normalize_params(f265_enc_params *p)
     CLP(p->key_interval);
     CLP(p->frame_rate_num);
     p->frame_rate_den = F265_MAX(p->frame_rate_den, 1);
+    CLF(p->vps_timing_flag);
     CL(p->qp, 0, 51);
     // Assume level is 5 or greater. FIXME. See table A1 in HEVC spec.
     CL(p->tiles[0], 1, 10);
diff --git a/f265/bs.c b/f265/bs.c
index f6bde52..57c47af 100644
--- a/f265/bs.c
+++ b/f265/bs.c
@@ -183,7 +183,18 @@ void fenc_write_vps(f265_vlc_bs *vbs, f265_enc *enc)
     FENC_PUT_UE_V(vbs, 0, "vps_max_latency_increase_plus1");
     FENC_PUT_BITS(vbs, 0, 6, "vps_max_nuh_reserved_zero_layer_id");
     FENC_PUT_UE_V(vbs, 0, "vps_max_op_sets_minus1");
-    FENC_PUT_FLAG(vbs, 0, "vps_timing_info_present_flag");
+
+    int timing_flag = gd->vps_timing_flag;
+    FENC_PUT_FLAG(vbs, timing_flag, "vps_timing_info_present_flag");
+    if (timing_flag)
+    {
+        FENC_PUT_BITS(vbs, gd->frame_rate_den, 32, "vps_num_units_in_tick");
+        FENC_PUT_BITS(vbs, gd->frame_rate_num, 32, "vps_time_scale");
+        FENC_PUT_FLAG(vbs, 1, "vps_poc_proportional_to_timing_flag");
+        FENC_PUT_UE_V(vbs, 0, "vps_num_ticks_poc_diff_one_minus1");
+        FENC_PUT_UE_V(vbs, 0, "vps_num_hrd_parameters");
+    }
+
     FENC_PUT_FLAG(vbs, 0, "vps_extension_flag");
     fenc_vlc_flush(vbs);
 }
diff --git a/f265/enc.c b/f265/enc.c
index d2d208b..b9e55f6 100644
--- a/f265/enc.c
+++ b/f265/enc.c
@@ -679,6 +679,7 @@ static void fenc_init_enc_mem(f265_enc_params *p, f265_enc_mem_data *d, char **e
     gd->nb_reordered_frames = p->nb_b_frames ? p->nb_b_refs + 1 : 0;
     gd->frame_rate_num = p->frame_rate_num;
     gd->frame_rate_den = p->frame_rate_den;
+    gd->vps_timing_flag = p->vps_timing_flag;
     gd->algo = p->algo;
 
     f265_me_search_func sf[4] = {fenc_me_dia_search, fenc_me_xdia_search, fenc_me_hex_search, fenc_me_square_search};
diff --git a/f265/enc.h b/f265/enc.h
index bca2e55..d43400d 100644
--- a/f265/enc.h
+++ b/f265/enc.h
@@ -2293,6 +2293,9 @@ typedef struct f265_gen_data
     int32_t frame_rate_num;
     int32_t frame_rate_den;
 
+    // True if VPS timing info is to be written.
+    int8_t vps_timing_flag;
+
     // Encoder flags. The values persist for the duration of the stream.
     uint32_t eflags;
 
diff --git a/f265/f265.h b/f265/f265.h
index d1d0a2e..18bfc05 100644
--- a/f265/f265.h
+++ b/f265/f265.h
@@ -241,6 +241,9 @@ typedef struct f265_enc_params
     int32_t frame_rate_num;
     int32_t frame_rate_den;
 
+    // True if VPS timing info is to be written.
+    int8_t vps_timing_flag;
+
     // Rate control method.
     int8_t rc_method;
 
diff --git a/f265/parse.c b/f265/parse.c
index ab4cd0a..20ef7b2 100644
--- a/f265/parse.c
+++ b/f265/parse.c
@@ -466,6 +466,11 @@ static void handle_param_fps(f265_parse_ctx *ctx, f265_enc_params *p, f265_parse
         p->frame_rate_den = a[1].i;
 }
 
+static void handle_param_vps_timing(f265_parse_ctx *ctx, f265_enc_params *p, f265_parse_arg *a, int32_t nb_args)
+{
+    p->vps_timing_flag = a[0].i;
+}
+
 static void handle_param_lt_conv_min(f265_parse_ctx *ctx, f265_enc_params *p, f265_parse_arg *a, int32_t nb_args)
 {
     p->lt_conv_min = a[0].i;
@@ -548,6 +553,7 @@ static const f265_parse_entry f265_enc_params_table[] =
     { "bitrate-range", handle_param_bitrate_range, 2, 0 },
     { "qp-bounds", handle_param_qp_bounds, 2, 0 },
     { "fps", handle_param_fps, 0, 0 },
+    { "vps-timing", handle_param_vps_timing, 1, 0 },
     { "lt-conv-min", handle_param_lt_conv_min, 1, 0 },
     { "lt-conv-exp", handle_param_lt_conv_exp, 1, 1 },
     { "algo", handle_param_algo, 0, 0 },
