抓包显示收到fcc数据了,但是状态页显示超时,fcc不起效。
tcpdump抓包显示收到fcc单播数据
No. Time Source Destination Protocol Length Info 5485 6.108046 10.23.236.193 183.223.164.65 FCC 82 FCC Client Request (Client Port: 40032, Mcast: 239.11.0.65:5140) 5490 6.111894 183.223.164.217 10.23.236.193 FCC 114 FCC Server Response (Success - Start Unicast) 8370 7.436059 183.223.164.217 10.23.236.193 FCC 60 FCC Sync Notification 8371 7.436059 183.223.164.217 10.23.236.193 FCC 60 FCC Sync Notification 66531 38.959209 10.23.236.193 183.223.164.65 FCC 58 FCC Termination (Force) 66532 38.959238 10.23.236.193 183.223.164.65 FCC 58 FCC Termination (Force) 66533 38.959252 10.23.236.193 183.223.164.65 FCC 58 FCC Termination (Force) 66554 38.981624 10.23.236.193 183.223.164.65 FCC 82 FCC Client Request (Client Port: 40081, Mcast: 239.11.0.108:5140) 66555 38.981666 10.23.236.193 183.223.164.65 FCC 82 FCC Client Request (Client Port: 40081, Mcast: 239.11.0.108:5140) 66556 38.981679 10.23.236.193 183.223.164.65 FCC 82 FCC Client Request (Client Port: 40081, Mcast: 239.11.0.108:5140) 66562 38.986647 183.223.164.217 10.23.236.193 FCC 78 FCC Server Response (Success - Start Unicast) 66563 38.986692 183.223.164.217 10.23.236.193 FCC 78 FCC Server Response (Success - Start Unicast) 67623 39.755862 183.223.164.217 10.23.236.193 FCC 60 FCC Sync Notification 67625 39.755862 183.223.164.217 10.23.236.193 FCC 60 FCC Sync Notification 72823 44.515527 10.23.236.193 183.223.164.65 FCC 58 FCC Termination (Force) 72824 44.515555 10.23.236.193 183.223.164.65 FCC 58 FCC Termination (Force) 72825 44.515569 10.23.236.193 183.223.164.65 FCC 58 FCC Termination (Force) 72846 44.535277 10.23.236.193 183.223.164.65 FCC 82 FCC Client Request (Client Port: 40080, Mcast: 239.11.0.101:5140) 72847 44.535304 10.23.236.193 183.223.164.65 FCC 82 FCC Client Request (Client Port: 40080, Mcast: 239.11.0.101:5140) 72848 44.535324 10.23.236.193 183.223.164.65 FCC 82 FCC Client Request (Client Port: 40080, Mcast: 239.11.0.101:5140) 72853 44.540262 183.223.164.217 10.23.236.193 FCC 114 FCC Server Response (Success - Start Unicast) 75743 45.861986 183.223.164.217 10.23.236.193 FCC 60 FCC Sync Notification 75744 45.861986 183.223.164.217 10.23.236.193 FCC 60 FCC Sync Notification
日志如下
10:52:42 PM DEBUG Client disconnected 10:52:42 PM DEBUG FCC: Sending termination packet (cleanup) 10:52:42 PM DEBUG FCC (Telecom): Termination packet (FMT 5) sent (cleanup), seqn=0 10:52:42 PM DEBUG FCC: Socket closed 10:52:42 PM DEBUG RTSP: Cleanup called in state 0, skipping (already cleaning up or done) 10:52:42 PM DEBUG RTSP: Session cleanup complete 10:52:42 PM DEBUG Multicast socket closed 10:52:42 PM INFO New client requested URL: /IPTV/CCTV1 (method: GET) 10:52:42 PM DEBUG Host header validated: 192.168.0.1:5140 10:52:42 PM INFO Service matched: IPTV/CCTV1 10:52:42 PM INFO FCC: Using Telecom/ZTE/Fiberhome FCC protocol 10:52:42 PM DEBUG FCC: Initializing FCC session and sending request 10:52:42 PM DEBUG FCC: Bound client socket to port 40032 10:52:42 PM DEBUG FCC: Socket registered with epoll 10:52:42 PM DEBUG FCC (Telecom): Request (FMT 2) sent to server 183.223.164.65:8027 10:52:42 PM DEBUG FCC State: INIT -> REQUESTED (Request sent) 10:52:42 PM WARN FCC: Server response timeout (80 ms), falling back to multicast 10:52:42 PM DEBUG FCC State: REQUESTED -> MCAST_ACTIVE (Signaling timeout) 10:52:42 PM INFO Multicast: Successfully joined group 10:52:42 PM DEBUG Multicast: Socket registered with epoll 10:53:15 PM DEBUG Client disconnected 10:53:15 PM DEBUG FCC: Sending termination packet (cleanup) 10:53:15 PM DEBUG FCC (Telecom): Termination packet (FMT 5) sent (cleanup), seqn=0 10:53:15 PM DEBUG FCC: Socket closed 10:53:15 PM DEBUG RTSP: Cleanup called in state 0, skipping (already cleaning up or done) 10:53:15 PM DEBUG RTSP: Session cleanup complete 10:53:15 PM DEBUG Multicast socket closed 10:53:15 PM INFO New client requested URL: /IPTV/CCTV2 (method: GET) 10:53:15 PM DEBUG Host header validated: 192.168.0.1:5140 10:53:15 PM INFO Service matched: IPTV/CCTV2 10:53:15 PM INFO FCC: Using Telecom/ZTE/Fiberhome FCC protocol 10:53:15 PM DEBUG FCC: Initializing FCC session and sending request 10:53:15 PM DEBUG FCC: Bound client socket to port 40081 10:53:15 PM DEBUG FCC: Socket registered with epoll 10:53:15 PM DEBUG FCC (Telecom): Request (FMT 2) sent to server 183.223.164.65:8027 10:53:15 PM DEBUG FCC State: INIT -> REQUESTED (Request sent) 10:53:15 PM WARN FCC: Server response timeout (80 ms), falling back to multicast 10:53:15 PM DEBUG FCC State: REQUESTED -> MCAST_ACTIVE (Signaling timeout) 10:53:15 PM INFO Multicast: Successfully joined group 10:53:15 PM DEBUG Multicast: Socket registered with epoll 10:53:21 PM DEBUG Client disconnected 10:53:21 PM DEBUG FCC: Sending termination packet (cleanup) 10:53:21 PM DEBUG FCC (Telecom): Termination packet (FMT 5) sent (cleanup), seqn=0 10:53:21 PM DEBUG FCC: Socket closed 10:53:21 PM DEBUG RTSP: Cleanup called in state 0, skipping (already cleaning up or done) 10:53:21 PM DEBUG RTSP: Session cleanup complete 10:53:21 PM DEBUG Multicast socket closed 10:53:21 PM INFO New client requested URL: /IPTV/CCTV3 (method: GET) 10:53:21 PM DEBUG Host header validated: 192.168.0.1:5140 10:53:21 PM INFO Service matched: IPTV/CCTV3 10:53:21 PM INFO FCC: Using Telecom/ZTE/Fiberhome FCC protocol 10:53:21 PM DEBUG FCC: Initializing FCC session and sending request 10:53:21 PM DEBUG FCC: Bound client socket to port 40080 10:53:21 PM DEBUG FCC: Socket registered with epoll 10:53:21 PM DEBUG FCC (Telecom): Request (FMT 2) sent to server 183.223.164.65:8027 10:53:21 PM DEBUG FCC State: INIT -> REQUESTED (Request sent) 10:53:21 PM WARN FCC: Server response timeout (80 ms), falling back to multicast 10:53:21 PM DEBUG FCC State: REQUESTED -> MCAST_ACTIVE (Signaling timeout) 10:53:21 PM INFO Multicast: Successfully joined group 10:53:21 PM DEBUG Multicast: Socket registered with epoll
你这个情况比较特别,给 FCC IP 183.223.164.65 发送请求后,发回响应的是另一个 IP:183.223.164.217,所以被代码里的一些逻辑过滤掉了。
第一次见到这种情况,可以提供一下抓包文件吗?
也尝试一下华为协议(rtp:// url 上加上 &fcc-type=huawei)看能否工作
你这个情况比较特别,给 FCC IP 183.223.164.65 发送请求后,发回响应的是另一个 IP:183.223.164.217,所以被代码里的一些逻辑过滤掉了。
第一次见到这种情况,可以提供一下抓包文件吗?
又看了下,不同的节目,响应的ip都不一样183.223.164.217,183.223.164.78,183.221.1.139
https://github.com/stackia/rtp2httpd/releases/tag/v3.4.0-beta.1
试一下这个版本是否可以解决问题
还有点问题,换台后看不到画面,一直到10多秒后才有画面,好像是没有正确处理单播数据,也没有在2秒左右切换到组播直到10多秒后单播数据被动切断。
抓包数据 fcc3.4.0-beta.txt
日志如下
9:29:53 AM DEBUG Client disconnected 9:29:53 AM DEBUG FCC: Socket closed 9:29:53 AM DEBUG RTSP: Cleanup called in state 0, skipping (already cleaning up or done) 9:29:53 AM DEBUG RTSP: Session cleanup complete 9:29:53 AM DEBUG Multicast socket closed 9:29:53 AM DEBUG Buffer pool: Checking for shrink opportunity (free: 10752, high_watermark: 3072, total: 10752) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 19.6s, total: 10752 -> 10240) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 20.2s, total: 10240 -> 9728) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 20.8s, total: 9728 -> 9216) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 21.4s, total: 9216 -> 8704) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 22.0s, total: 8704 -> 8192) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 22.6s, total: 8192 -> 7680) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 23.3s, total: 7680 -> 7168) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 23.9s, total: 7168 -> 6656) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 24.5s, total: 6656 -> 6144) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 25.1s, total: 6144 -> 5632) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 25.7s, total: 5632 -> 5120) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 26.3s, total: 5120 -> 4608) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 26.9s, total: 4608 -> 4096) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 27.5s, total: 4096 -> 3584) 9:29:53 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 28.2s, total: 3584 -> 3072) 9:29:53 AM DEBUG Buffer pool: Shrink completed - freed 15 segments (total: 3072 buffers, free: 3072) 9:29:53 AM INFO New client requested URL: /IPTV/CCTV5 (method: GET) 9:29:53 AM DEBUG Host header validated: 192.168.0.1:5140 9:29:53 AM INFO Service matched: IPTV/CCTV5 9:29:53 AM INFO FCC: Using Telecom/ZTE/Fiberhome FCC protocol 9:29:53 AM DEBUG FCC: Initializing FCC session and sending request 9:29:53 AM DEBUG FCC: Bound client socket to port 40019 9:29:53 AM DEBUG FCC: Socket registered with epoll 9:29:53 AM DEBUG FCC (Telecom): Request (FMT 2) sent to server 183.223.164.65:8027 9:29:53 AM DEBUG FCC State: INIT -> REQUESTED (Request sent) 9:29:53 AM DEBUG FCC Response: FMT=3, result=0, signal_port=0, media_port=14311, valid_time=0, speed=7.63 Mbps, speed_after_sync=7.63 Mbps 9:29:53 AM DEBUG FCC (Telecom): Server provided new media port: 14311 9:29:53 AM DEBUG FCC (Telecom): Server provided new IP: 183.223.164.217 9:29:53 AM DEBUG FCC State: REQUESTED -> UNICAST_PENDING (Server accepted request) 9:29:53 AM DEBUG FCC (Telecom): Server accepted request, waiting for unicast stream 9:29:54 AM DEBUG FCC: Sync notification received - joining multicast 9:29:54 AM DEBUG FCC State: UNICAST_PENDING -> MCAST_REQUESTED (Sync notification received) 9:29:54 AM INFO Multicast: Successfully joined group 9:29:54 AM DEBUG Multicast: Socket registered with epoll 9:29:54 AM DEBUG FCC (Telecom): Termination packet (FMT 5) sent (normal flow), seqn=36213 9:29:54 AM DEBUG FCC: Normal termination message sent, term_seqn=36211 (+2) 9:29:58 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:29:58 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 3072, free: 256, max: 16384) 9:29:58 AM DEBUG Buffer pool: Expansion successful (total: 3584 buffers, free: 768) 9:29:58 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:29:58 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 3584, free: 256, max: 16384) 9:29:58 AM DEBUG Buffer pool: Expansion successful (total: 4096 buffers, free: 768) 9:29:59 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:29:59 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 4096, free: 256, max: 16384) 9:29:59 AM DEBUG Buffer pool: Expansion successful (total: 4608 buffers, free: 768) 9:29:59 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:29:59 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 4608, free: 256, max: 16384) 9:29:59 AM DEBUG Buffer pool: Expansion successful (total: 5120 buffers, free: 768) 9:30:00 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:30:00 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 5120, free: 256, max: 16384) 9:30:00 AM DEBUG Buffer pool: Expansion successful (total: 5632 buffers, free: 768) 9:30:01 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:30:01 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 5632, free: 256, max: 16384) 9:30:01 AM DEBUG Buffer pool: Expansion successful (total: 6144 buffers, free: 768) 9:30:01 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:30:01 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 6144, free: 256, max: 16384) 9:30:01 AM DEBUG Buffer pool: Expansion successful (total: 6656 buffers, free: 768) 9:30:02 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:30:02 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 6656, free: 256, max: 16384) 9:30:02 AM DEBUG Buffer pool: Expansion successful (total: 7168 buffers, free: 768) 9:30:02 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:30:02 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 7168, free: 256, max: 16384) 9:30:02 AM DEBUG Buffer pool: Expansion successful (total: 7680 buffers, free: 768) 9:30:03 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:30:03 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 7680, free: 256, max: 16384) 9:30:03 AM DEBUG Buffer pool: Expansion successful (total: 8192 buffers, free: 768) 9:30:04 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:30:04 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 8192, free: 256, max: 16384) 9:30:04 AM DEBUG Buffer pool: Expansion successful (total: 8704 buffers, free: 768) 9:30:04 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:30:04 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 8704, free: 256, max: 16384) 9:30:04 AM DEBUG Buffer pool: Expansion successful (total: 9216 buffers, free: 768) 9:30:05 AM DEBUG Buffer pool: Low watermark reached (free: 256, watermark: 256), expanding proactively 9:30:05 AM DEBUG Buffer pool: Expanding by 512 buffers (current: 9216, free: 256, max: 16384) 9:30:05 AM DEBUG Buffer pool: Expansion successful (total: 9728 buffers, free: 768) 9:30:05 AM DEBUG Client disconnected 9:30:05 AM DEBUG FCC: Multicast pending buffer chain freed 9:30:05 AM DEBUG FCC: Socket closed 9:30:05 AM DEBUG RTSP: Cleanup called in state 0, skipping (already cleaning up or done) 9:30:05 AM DEBUG RTSP: Session cleanup complete 9:30:05 AM DEBUG Multicast socket closed 9:30:05 AM DEBUG Buffer pool: Checking for shrink opportunity (free: 9728, high_watermark: 3072, total: 9728) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 0.4s, total: 9728 -> 9216) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 1.0s, total: 9216 -> 8704) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 1.6s, total: 8704 -> 8192) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 2.2s, total: 8192 -> 7680) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 2.8s, total: 7680 -> 7168) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 3.5s, total: 7168 -> 6656) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 4.1s, total: 6656 -> 6144) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 4.7s, total: 6144 -> 5632) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 5.3s, total: 5632 -> 5120) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 5.9s, total: 5120 -> 4608) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 6.5s, total: 4608 -> 4096) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 7.1s, total: 4096 -> 3584) 9:30:05 AM DEBUG Buffer pool: Freeing idle segment with 512 buffers (age: 7.7s, total: 3584 -> 3072) 9:30:05 AM DEBUG Buffer pool: Shrink completed - freed 13 segments (total: 3072 buffers, free: 3072)
可以再试一下最新 v3.4.0,这次感觉应该修复了
完美了,感谢大佬