v3.12.0-alpha.1 无法触发 Range: clock
网页端测试一小时内回看,不知为何日志里没看见有走 clock 分支,回看正常。
18:38:45 INFO [Worker 0] New client 192.168.96.100:15699 requested URL: /%E5%A4%AE%E8%A7%86/CCTV-5%E4%BD%93%E8%82%B2/catchup?playseek=20260323183140-20260323183835 (method: GET)
18:38:45 INFO [Worker 0] Service matched: 央视/CCTV-5体育/catchup
18:38:45 DEBUG [Worker 0] Creating RTSP service with merged URL: rtsp://10.255.4.140/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835&r2h-seek-name=playseek
18:38:45 DEBUG [Worker 0] Found r2h-seek-name parameter: playseek
18:38:45 DEBUG [Worker 0] Using explicitly specified seek parameter name: playseek
18:38:45 DEBUG [Worker 0] Found valid playseek parameter: 20260323183140-20260323183835
18:38:45 DEBUG [Worker 0] Parsed RTSP URL: rtsp://10.255.4.140/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********
18:38:45 DEBUG [Worker 0] Parsed playseek parameter: 20260323183140-20260323183835
18:38:45 DEBUG [Worker 0] Timezone: No TZ marker in User-Agent
18:38:45 DEBUG [Worker 0] Parsed seek - begin='20260323183140', end='20260323183835'
18:38:45 DEBUG [Worker 0] Timezone: yyyyMMddHHmmss '20260323183140' (TZ offset 0) + seek offset 0 = '20260323183140'
18:38:45 DEBUG [Worker 0] Converted begin time '20260323183140' to UTC '20260323183140'
18:38:45 DEBUG [Worker 0] Timezone: yyyyMMddHHmmss '20260323183835' (TZ offset 0) + seek offset 0 = '20260323183835'
18:38:45 DEBUG [Worker 0] Converted end time '20260323183835' to UTC '20260323183835'
18:38:45 DEBUG [Worker 0] UTC seek parameter: '20260323183140-20260323183835'
18:38:45 DEBUG [Worker 0] RTSP: Parsed URL - host=10.255.4.140, port=554, path=/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835
18:38:45 DEBUG [Worker 0] RTSP: Connection to 10.255.4.140:554 in progress (async)
18:38:45 DEBUG [Worker 0] RTSP: Socket registered with poller for connection completion
18:38:45 DEBUG [Worker 0] RTSP: Async connection initiated, state=1
18:38:45 INFO [Worker 0] RTSP: Connected to 10.255.4.140:554
18:38:45 DEBUG [Worker 0] RTSP: Connection to 10.255.4.140:554 completed successfully
18:38:45 DEBUG [Worker 0] RTSP: Prepared request:
OPTIONS rtsp://10.255.4.140/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835 RTSP/1.0
CSeq: 1
User-Agent: CTC RTSP 1.0
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely (462 bytes)
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
18:38:45 DEBUG [Worker 0] RTSP: Server supports GET_PARAMETER for keepalive
18:38:45 DEBUG [Worker 0] RTSP: Server advertised methods: DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN, SET_PARAMETER, GET_PARAMETER, OPTIONS
18:38:45 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 200 OK
Public: DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN, SET_PARAMETER, GET_PARAMETER, OPTIONS
Date: Mon, 23 Mar 2026 10:38:45 GMT
CSeq: 1
Server: HWServer/1.0.0.1
18:38:45 DEBUG [Worker 0] RTSP: Prepared request:
DESCRIBE rtsp://10.255.4.140/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835 RTSP/1.0
CSeq: 2
User-Agent: CTC RTSP 1.0
Accept: application/sdp
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely (488 bytes)
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
18:38:45 DEBUG [Worker 0] RTSP: Received redirect response 302
18:38:45 DEBUG [Worker 0] RTSP: Handling redirect to: rtsp://10.255.9.151:554/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835&from=3&hms_devid=492&online=1774262325
18:38:45 DEBUG [Worker 0] RTSP: Parsed URL - host=10.255.9.151, port=554, path=/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835&from=3&hms_devid=492&online=1774262325
18:38:45 DEBUG [Worker 0] RTSP: Connection to 10.255.9.151:554 in progress (async)
18:38:45 DEBUG [Worker 0] RTSP: Socket registered with poller for connection completion
18:38:45 INFO [Worker 0] RTSP: Redirect to 10.255.9.151:554 initiated (redirect #1)
18:38:45 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 302 Moved Temporarily
Location: rtsp://10.255.9.151:554/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835&from=3&hms_devid=492&online=1774262325
Date: Mon, 23 Mar 2026 10:38:45 GMT
CSeq: 2
Server: HWServer/1.0.0.1
Timeshift-Status: 3
18:38:45 INFO [Worker 0] RTSP: Connected to 10.255.9.151:554
18:38:45 DEBUG [Worker 0] RTSP: Connection to 10.255.9.151:554 completed successfully
18:38:45 DEBUG [Worker 0] RTSP: Prepared request:
OPTIONS rtsp://10.255.9.151/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835&from=3&hms_devid=492&online=1774262325 RTSP/1.0
CSeq: 3
User-Agent: CTC RTSP 1.0
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely (501 bytes)
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
18:38:45 DEBUG [Worker 0] RTSP: Server does not advertise GET_PARAMETER, will use OPTIONS for keepalive
18:38:45 DEBUG [Worker 0] RTSP: Server advertised methods: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
18:38:45 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 200 OK
Server: HMS_V1R2
CSeq: 3
Date: Mon, 23 Mar 2026 10:38:45 GMT
Session: 1465882823
Timeshift-Status: 0
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
18:38:45 DEBUG [Worker 0] RTSP: Prepared request:
DESCRIBE rtsp://10.255.9.151/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835&from=3&hms_devid=492&online=1774262325 RTSP/1.0
CSeq: 4
User-Agent: CTC RTSP 1.0
Accept: application/sdp
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely (527 bytes)
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
18:38:45 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 200 OK
Server: HMS_V1R2
CSeq: 4
Date: Mon, 23 Mar 2026 10:38:45 GMT
Session: 1465882823
Timeshift-Status: 1
Content-Length: 133
Content-Type: application/sdp
Content-Base: rtsp://10.255.9.151/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835&from=3&hms_devid=492&online=1774262325/
18:38:45 DEBUG [Worker 0] RTSP: Response body data (state=6): v=0
o=- 1702415089 4281335390 IN IP4 127.0.0.1
s=vod
t=0 0
c=IN IP4 0.0.0.0
a=range:npt=0-415
m=video 0 RTP/AVP 33
b=AS:8983
18:38:45 DEBUG [Worker 0] RTSP: Content-Base: rtsp://10.255.9.151/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835&from=3&hms_devid=492&online=1774262325/
18:38:45 DEBUG [Worker 0] RTSP: Setting up UDP sockets
18:38:45 DEBUG [Worker 0] RTSP: RTP socket registered with poller
18:38:45 DEBUG [Worker 0] RTSP: RTCP socket registered with poller
18:38:45 DEBUG [Worker 0] RTSP: UDP sockets bound to ports 14586 (RTP) and 14587 (RTCP)
18:38:45 DEBUG [Worker 0] RTSP: Prepared request:
SETUP rtsp://10.255.9.151/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835&from=3&hms_devid=492&online=1774262325 RTSP/1.0
CSeq: 5
User-Agent: CTC RTSP 1.0
Transport: MP2T/RTP/TCP;unicast;interleaved=0-1,MP2T/TCP;unicast;interleaved=0-1,RTP/AVP/TCP;unicast;interleaved=0-1,MP2T/RTP/UDP;unicast;client_port=14586-14587,MP2T/UDP;unicast;client_port=14586-14587,RTP/AVP;unicast;client_port=14586-14587
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely (743 bytes)
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
18:38:45 DEBUG [Worker 0] RTSP: Parsing server transport response: MP2T/RTP/TCP;unicast;interleaved=0-1;source=10.255.9.151
18:38:45 INFO [Worker 0] RTSP: Server selected MP2T/RTP transport
18:38:45 INFO [Worker 0] RTSP: Using TCP interleaved transport (keepalive 30000ms)
18:38:45 DEBUG [Worker 0] RTSP: Server confirmed TCP interleaved channels: 0/1
18:38:45 DEBUG [Worker 0] RTSP: Closed UDP RTP socket (use TCP interleaved mode)
18:38:45 DEBUG [Worker 0] RTSP: Closed UDP RTCP socket (use TCP interleaved mode)
18:38:45 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 200 OK
Server: HMS_V1R2
CSeq: 5
Date: Mon, 23 Mar 2026 10:38:45 GMT
Session: 1465882823
Timeshift-Status: 0
Transport: MP2T/RTP/TCP;unicast;interleaved=0-1;source=10.255.9.151
18:38:45 DEBUG [Worker 0] RTSP: Prepared request:
PLAY rtsp://10.255.9.151/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323183140-20260323183835&from=3&hms_devid=492&online=1774262325 RTSP/1.0
CSeq: 6
User-Agent: CTC RTSP 1.0
Session: 1465882823
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely (519 bytes)
18:38:45 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
18:38:45 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 200 OK
Server: HMS_V1R2
CSeq: 6
Date: Mon, 23 Mar 2026 10:38:45 GMT
Session: 1465882823
Timeshift-Status: 0
Scale: 1.0
Range: npt=1.000000-
18:38:45 INFO [Worker 0] RTSP: Stream started successfully
18:38:45 DEBUG [Worker 0] Client disconnected
18:38:45 DEBUG [Worker 0] FCC: Socket closed
18:38:45 DEBUG [Worker 0] Multicast: Socket closed
18:38:45 DEBUG [Worker 0] RTSP: First media packet received (TCP)
18:38:45 DEBUG [Worker 0] RTP reorder: Init complete, base_seq=0 (8 packets collected)
看一下系统时区是否是 UTC+8(可能影响了对“最近1小时”的判断)
看一下系统时区是否是 UTC+8(可能影响了对“最近1小时”的判断)
root@iptv:~# date
Mon Mar 23 22:04:53 CST 2026
root@iptv:~# cat /etc/timezone
Etc/UTC
root@iptv:~# timedatectl
Local time: Mon 2026-03-23 22:04:59 CST
Universal time: Mon 2026-03-23 14:04:59 UTC
RTC time: n/a
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: no
重新执行 dpkg-reconfigure tzdata 后仍然没有作用
root@iptv:~# timedatectl
Local time: Mon 2026-03-23 22:14:17 CST
Universal time: Mon 2026-03-23 14:14:17 UTC
RTC time: n/a
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: no
root@iptv:~# cat /etc/timezone
Asia/Shanghai
root@iptv:~# ls -la /etc/localtime
lrwxrwxrwx 1 root root 35 Nov 29 05:36 /etc/localtime -> ../usr/share/zoneinfo/Asia/Shanghai
22:17:17 INFO [Worker 0] New client 192.168.96.100:49912 requested URL: /%E5%A4%AE%E8%A7%86/CCTV-5%E4%BD%93%E8%82%B2/catchup?playseek=20260323214549-20260323221708 (method: GET)
22:17:17 INFO [Worker 0] Service matched: 央视/CCTV-5体育/catchup
22:17:17 DEBUG [Worker 0] Creating RTSP service with merged URL: rtsp://10.255.4.140/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708&r2h-seek-name=playseek
22:17:17 DEBUG [Worker 0] Found r2h-seek-name parameter: playseek
22:17:17 DEBUG [Worker 0] Using explicitly specified seek parameter name: playseek
22:17:17 DEBUG [Worker 0] Found valid playseek parameter: 20260323214549-20260323221708
22:17:17 DEBUG [Worker 0] Parsed RTSP URL: rtsp://10.255.4.140/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********
22:17:17 DEBUG [Worker 0] Parsed playseek parameter: 20260323214549-20260323221708
22:17:17 DEBUG [Worker 0] Timezone: No TZ marker in User-Agent
22:17:17 DEBUG [Worker 0] Parsed seek - begin='20260323214549', end='20260323221708'
22:17:17 DEBUG [Worker 0] Timezone: yyyyMMddHHmmss '20260323214549' (TZ offset 0) + seek offset 0 = '20260323214549'
22:17:17 DEBUG [Worker 0] Converted begin time '20260323214549' to UTC '20260323214549'
22:17:17 DEBUG [Worker 0] Timezone: yyyyMMddHHmmss '20260323221708' (TZ offset 0) + seek offset 0 = '20260323221708'
22:17:17 DEBUG [Worker 0] Converted end time '20260323221708' to UTC '20260323221708'
22:17:17 DEBUG [Worker 0] UTC seek parameter: '20260323214549-20260323221708'
22:17:17 DEBUG [Worker 0] RTSP: Parsed URL - host=10.255.4.140, port=554, path=/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708
22:17:17 DEBUG [Worker 0] RTSP: Connection to 10.255.4.140:554 in progress (async)
22:17:17 DEBUG [Worker 0] RTSP: Socket registered with poller for connection completion
22:17:17 DEBUG [Worker 0] RTSP: Async connection initiated, state=1
22:17:17 INFO [Worker 0] RTSP: Connected to 10.255.4.140:554
22:17:17 DEBUG [Worker 0] RTSP: Connection to 10.255.4.140:554 completed successfully
22:17:17 DEBUG [Worker 0] RTSP: Prepared request:
OPTIONS rtsp://10.255.4.140/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708 RTSP/1.0
CSeq: 1
User-Agent: CTC RTSP 1.0
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely (462 bytes)
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
22:17:17 DEBUG [Worker 0] RTSP: Server supports GET_PARAMETER for keepalive
22:17:17 DEBUG [Worker 0] RTSP: Server advertised methods: DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN, SET_PARAMETER, GET_PARAMETER, OPTIONS
22:17:17 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 200 OK
Public: DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN, SET_PARAMETER, GET_PARAMETER, OPTIONS
Date: Mon, 23 Mar 2026 14:17:17 GMT
CSeq: 1
Server: HWServer/1.0.0.1
22:17:17 DEBUG [Worker 0] RTSP: Prepared request:
DESCRIBE rtsp://10.255.4.140/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708 RTSP/1.0
CSeq: 2
User-Agent: CTC RTSP 1.0
Accept: application/sdp
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely (488 bytes)
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
22:17:17 DEBUG [Worker 0] RTSP: Received redirect response 302
22:17:17 DEBUG [Worker 0] RTSP: Handling redirect to: rtsp://10.255.9.150:554/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708&from=3&hms_devid=492&online=1774275437
22:17:17 DEBUG [Worker 0] RTSP: Parsed URL - host=10.255.9.150, port=554, path=/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708&from=3&hms_devid=492&online=1774275437
22:17:17 DEBUG [Worker 0] RTSP: Connection to 10.255.9.150:554 in progress (async)
22:17:17 DEBUG [Worker 0] RTSP: Socket registered with poller for connection completion
22:17:17 INFO [Worker 0] RTSP: Redirect to 10.255.9.150:554 initiated (redirect #1)
22:17:17 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 302 Moved Temporarily
Location: rtsp://10.255.9.150:554/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708&from=3&hms_devid=492&online=1774275437
Date: Mon, 23 Mar 2026 14:17:17 GMT
CSeq: 2
Server: HWServer/1.0.0.1
Timeshift-Status: 3
22:17:17 INFO [Worker 0] RTSP: Connected to 10.255.9.150:554
22:17:17 DEBUG [Worker 0] RTSP: Connection to 10.255.9.150:554 completed successfully
22:17:17 DEBUG [Worker 0] RTSP: Prepared request:
OPTIONS rtsp://10.255.9.150/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708&from=3&hms_devid=492&online=1774275437 RTSP/1.0
CSeq: 3
User-Agent: CTC RTSP 1.0
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely (501 bytes)
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
22:17:17 DEBUG [Worker 0] RTSP: Server does not advertise GET_PARAMETER, will use OPTIONS for keepalive
22:17:17 DEBUG [Worker 0] RTSP: Server advertised methods: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
22:17:17 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 200 OK
Server: HMS_V1R2
CSeq: 3
Date: Mon, 23 Mar 2026 14:17:17 GMT
Session: 130289405
Timeshift-Status: 0
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
22:17:17 DEBUG [Worker 0] RTSP: Prepared request:
DESCRIBE rtsp://10.255.9.150/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708&from=3&hms_devid=492&online=1774275437 RTSP/1.0
CSeq: 4
User-Agent: CTC RTSP 1.0
Accept: application/sdp
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely (527 bytes)
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
22:17:17 DEBUG [Worker 0] Client disconnected
22:17:17 DEBUG [Worker 0] FCC: Socket closed
22:17:17 DEBUG [Worker 0] Multicast: Socket closed
22:17:17 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 200 OK
Server: HMS_V1R2
CSeq: 4
Date: Mon, 23 Mar 2026 14:17:17 GMT
Session: 130289405
Timeshift-Status: 1
Content-Length: 134
Content-Type: application/sdp
Content-Base: rtsp://10.255.9.150/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708&from=3&hms_devid=492&online=1774275437/
22:17:17 DEBUG [Worker 0] RTSP: Response body data (state=6): v=0
o=- 1702415089 4281335390 IN IP4 127.0.0.1
s=vod
t=0 0
c=IN IP4 0.0.0.0
a=range:npt=0-1879
m=video 0 RTP/AVP 33
b=AS:8981
22:17:17 DEBUG [Worker 0] RTSP: Content-Base: rtsp://10.255.9.150/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708&from=3&hms_devid=492&online=1774275437/
22:17:17 DEBUG [Worker 0] RTSP: Setting up UDP sockets
22:17:17 DEBUG [Worker 0] RTSP: RTP socket registered with poller
22:17:17 DEBUG [Worker 0] RTSP: RTCP socket registered with poller
22:17:17 DEBUG [Worker 0] RTSP: UDP sockets bound to ports 16562 (RTP) and 16563 (RTCP)
22:17:17 DEBUG [Worker 0] RTSP: Prepared request:
SETUP rtsp://10.255.9.150/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708&from=3&hms_devid=492&online=1774275437 RTSP/1.0
CSeq: 5
User-Agent: CTC RTSP 1.0
Transport: MP2T/RTP/TCP;unicast;interleaved=0-1,MP2T/TCP;unicast;interleaved=0-1,RTP/AVP/TCP;unicast;interleaved=0-1,MP2T/RTP/UDP;unicast;client_port=16562-16563,MP2T/UDP;unicast;client_port=16562-16563,RTP/AVP;unicast;client_port=16562-16563
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely (743 bytes)
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
22:17:17 DEBUG [Worker 0] RTSP: Parsing server transport response: MP2T/RTP/TCP;unicast;interleaved=0-1;source=10.255.9.150
22:17:17 INFO [Worker 0] RTSP: Server selected MP2T/RTP transport
22:17:17 INFO [Worker 0] RTSP: Using TCP interleaved transport (keepalive 30000ms)
22:17:17 DEBUG [Worker 0] RTSP: Server confirmed TCP interleaved channels: 0/1
22:17:17 DEBUG [Worker 0] RTSP: Closed UDP RTP socket (use TCP interleaved mode)
22:17:17 DEBUG [Worker 0] RTSP: Closed UDP RTCP socket (use TCP interleaved mode)
22:17:17 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 200 OK
Server: HMS_V1R2
CSeq: 5
Date: Mon, 23 Mar 2026 14:17:17 GMT
Session: 130289405
Timeshift-Status: 0
Transport: MP2T/RTP/TCP;unicast;interleaved=0-1;source=10.255.9.150
22:17:17 DEBUG [Worker 0] RTSP: Prepared request:
PLAY rtsp://10.255.9.150/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323214549-20260323221708&from=3&hms_devid=492&online=1774275437 RTSP/1.0
CSeq: 6
User-Agent: CTC RTSP 1.0
Session: 130289405
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely (518 bytes)
22:17:17 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response
22:17:17 DEBUG [Worker 0] RTSP: Received complete header:
RTSP/1.0 200 OK
Server: HMS_V1R2
CSeq: 6
Date: Mon, 23 Mar 2026 14:17:17 GMT
Session: 130289405
Timeshift-Status: 0
Scale: 1.0
Range: npt=0.000000-
22:17:17 INFO [Worker 0] RTSP: Stream started successfully
22:17:17 DEBUG [Worker 0] RTSP: First media packet received (TCP)
22:17:17 DEBUG [Worker 0] RTP reorder: Init complete, base_seq=0 (8 packets collected)
我向浏览器的 UA 中添加了 TZ/UTC+8 后,对于1小时内的回放能正常触发 clock
22:44:36 DEBUG [Worker 0] RTSP: Prepared request:
PLAY rtsp://10.255.9.151/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&from=3&hms_devid=492&online=1774277076 RTSP/1.0
CSeq: 6
User-Agent: CTC RTSP 1.0
Session: 3954303858
Range: clock=20260323T144010Z-
但是对于1小时以上的回放会不正常,会产生8小时的时差
22:49:42 INFO [Worker 0] New client 192.168.96.100:51034 requested URL: /%E5%A4%AE%E8%A7%86/CCTV-5%E4%BD%93%E8%82%B2/catchup?playseek=20260323180000-20260323224933 (method: GET)
22:49:42 INFO [Worker 0] Service matched: 央视/CCTV-5体育/catchup
22:49:42 DEBUG [Worker 0] Creating RTSP service with merged URL: rtsp://10.255.4.140/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323180000-20260323224933&r2h-seek-name=playseek
22:49:42 DEBUG [Worker 0] Found r2h-seek-name parameter: playseek
22:49:42 DEBUG [Worker 0] Using explicitly specified seek parameter name: playseek
22:49:42 DEBUG [Worker 0] Found valid playseek parameter: 20260323180000-20260323224933
22:49:42 DEBUG [Worker 0] Parsed RTSP URL: rtsp://10.255.4.140/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********
22:49:42 DEBUG [Worker 0] Parsed playseek parameter: 20260323180000-20260323224933
22:49:42 DEBUG [Worker 0] Timezone: Parsed timezone offset: UTC+8 (28800 seconds)
22:49:42 DEBUG [Worker 0] Parsed seek - begin='20260323180000', end='20260323224933'
22:49:42 DEBUG [Worker 0] Timezone: yyyyMMddHHmmss '20260323180000' (TZ offset -28800) + seek offset 0 = '20260323100000'
22:49:42 DEBUG [Worker 0] Converted begin time '20260323180000' to UTC '20260323100000'
22:49:42 DEBUG [Worker 0] Timezone: yyyyMMddHHmmss '20260323224933' (TZ offset -28800) + seek offset 0 = '20260323144933'
22:49:42 DEBUG [Worker 0] Converted end time '20260323224933' to UTC '20260323144933'
22:49:42 DEBUG [Worker 0] UTC seek parameter: '20260323100000-20260323144933'
22:49:42 DEBUG [Worker 0] RTSP: Parsed URL - host=10.255.4.140, port=554, path=/PLTV/88888888/224/3221225726/10000100000000060000000000247037_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=20260323100000-20260323144933
22:49:42 DEBUG [Worker 0] RTSP: Connection to 10.255.4.140:554 in progress (async)
22:49:42 DEBUG [Worker 0] RTSP: Socket registered with poller for connection completion
22:49:42 DEBUG [Worker 0] RTSP: Async connection initiated, state=1
22:49:42 INFO [Worker 0] RTSP: Connected to 10.255.4.140:554
22:49:42 DEBUG [Worker 0] RTSP: Connection to 10.255.4.140:554 completed successfully
以下略
回放格式是这个 其中 yyyyMMddHHmmss 应当是 utc+8 的时间
#EXTINF:-1 tvg-id="20000256" tvg-chno="989" catchup="default" catchup-source="rtsp://10.255.4.140/PLTV/88888888/224/3221225905/10000100000000060000000000686147_0.smil?rrsip=10.255.13.139&zoneoffset=480&icpid=-1&limitflux=-1&limitdur=-1&tenantId=8601&GuardEncType=2&accountinfo=********&playseek=${(b)yyyyMMddHHmmss}-${(e)yyyyMMddHHmmss}" catchup-days="5" group-title="其他",功能测试
igmp://239.5.1.143:500
当 UA 里没有 TZ/ 时会默认传入的是 UTC+0
我这里浏览器传入的时间是 UTC+8,时移服务器需求的是 UTC+8。因此直接透传就行,我一直没有用到时间转换功能。rtp2httpd 所在的机器的时区也是 UTC+8。
但是 rtp2httpd 似乎认为时移服务器需求的是 UTC+0 时间,并且以为我浏览器传入的时间也是 UTC+0,因此在浏览器没指定 UA 的时候一直挺好。指定了 UA 之后就出了问题?
我改进一下这里时区的处理
https://github.com/stackia/rtp2httpd/releases/tag/v3.12.0-alpha.2
可以尝试这个版本。默认不会启用 Range: clock 时移,只有请求带上了 r2h-seek-mode=range 才会启用 Range: clock 时移
对于你这里的时区问题,可以这样处理:UA 不需要带 TZ 标记,而是 r2h-seek-mode 设置为 range(UTC+8/3600) 就可以解决