fix(video): stop stream-copying oversized sources into HLS #166
@@ -668,6 +668,12 @@ impl Handler<GeneratePlaylistMessage> for PlaylistGenerator {
|
|||||||
// segment starts on a keyframe — accurate seeking without
|
// segment starts on a keyframe — accurate seeking without
|
||||||
// players having to decode from a prior segment.
|
// players having to decode from a prior segment.
|
||||||
cmd.arg("-force_key_frames").arg("expr:gte(t,n_forced*3)");
|
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
|
// -f hls is required because the playlist is written to a .tmp
|
||||||
|
|||||||
Reference in new issue
Block a user