diff --git a/src/video/actors.rs b/src/video/actors.rs index 009aa4a..7a22a5a 100644 --- a/src/video/actors.rs +++ b/src/video/actors.rs @@ -668,6 +668,12 @@ impl Handler for PlaylistGenerator { // segment starts on a keyframe — accurate seeking without // players having to decode from a prior segment. cmd.arg("-force_key_frames").arg("expr:gte(t,n_forced*3)"); + // Keep source frame timestamps. Variable-frame-rate phone + // clips and screen recordings report r_frame_rate as their + // timebase (90000/1); the mpegts muxer's default CFR mode + // then duplicates frames to fill it — a 2.6 s clip came out + // as 233k frames / 221 MB. vfr leaves timing untouched. + cmd.arg("-fps_mode").arg("vfr"); } // -f hls is required because the playlist is written to a .tmp