|
@@ -77,13 +77,24 @@ DEFAULT_PROFILE = CameraProfile()
|
|
|
# AFTER alias normalisation, so internal SSDP codes ("N7") resolve via
|
|
# AFTER alias normalisation, so internal SSDP codes ("N7") resolve via
|
|
|
# ``_MODEL_ALIASES`` below.
|
|
# ``_MODEL_ALIASES`` below.
|
|
|
_PROFILES: dict[str, CameraProfile] = {
|
|
_PROFILES: dict[str, CameraProfile] = {
|
|
|
- # P2S firmware 01.02.00.00 RTSP keyframe pacing is slow enough that
|
|
|
|
|
- # ffmpeg's "32-byte probe + zero analyze" combo can't estimate the
|
|
|
|
|
- # frame rate. ffmpeg's own stderr literally says "consider increasing
|
|
|
|
|
- # probesize" (#1395 follow-up).
|
|
|
|
|
|
|
+ # P2S firmware 01.02.00.00 has two RTSP quirks, both surfaced by #1395:
|
|
|
|
|
+ #
|
|
|
|
|
+ # 1. Slow keyframe pacing — ffmpeg's "32-byte probe + zero analyze"
|
|
|
|
|
+ # combo can't estimate the frame rate ("consider increasing
|
|
|
|
|
+ # probesize"). Fixed by the relaxed probesize/analyzeduration below.
|
|
|
|
|
+ #
|
|
|
|
|
+ # 2. Non-advancing RTP timestamps — every frame is stamped at ~t=0.06s.
|
|
|
|
|
+ # With ffmpeg's default CFR rate conversion (`-r 15`), this freezes
|
|
|
|
|
+ # the output clock after the first frame and drops every subsequent
|
|
|
|
|
+ # frame as a same-timestamp duplicate (ffmpeg stderr: `frame=1
|
|
|
|
|
+ # time=00:00:00.06 dup=0 drop=526`). `-use_wallclock_as_timestamps 1`
|
|
|
|
|
+ # regenerates each packet's PTS from arrival wall-clock time, so the
|
|
|
|
|
+ # output clock advances and CFR conversion works. X1/H2 send correct
|
|
|
|
|
+ # timestamps and need no override.
|
|
|
"P2S": CameraProfile(
|
|
"P2S": CameraProfile(
|
|
|
probesize=1_000_000,
|
|
probesize=1_000_000,
|
|
|
analyzeduration=500_000,
|
|
analyzeduration=500_000,
|
|
|
|
|
+ extra_ffmpeg_input_args=("-use_wallclock_as_timestamps", "1"),
|
|
|
),
|
|
),
|
|
|
}
|
|
}
|
|
|
|
|
|