kingslay / KSPlayer

A video player for iOS、macOS、tvOS、visionOS , based on AVPlayer and FFmpeg, support the horizontal, vertical screen. support adjust volume, brightness and seek by slide, SwiftUI, support subtitles.
https://apps.apple.com/app/tracyplayer/id6450770064
GNU General Public License v3.0
980 stars 198 forks source link

RTSP video is not shown when using slow connection #737

Closed AlienJust closed 6 months ago

AlienJust commented 7 months ago

Hello! If I use high speed connection to my IP camera I can see video If I use slow speed connection video is not shown

In debugger view I see the next log lines:

2024-02-22 20:08:44.261423+0500 SmartService[8673:2417432] debug KSPlayer: MEPlayerItem.swift:131 MEPlayerItem | nal_unit_type: 7(SPS), nal_ref_idc: 3
2024-02-22 20:08:44.261667+0500 SmartService[8673:2417432] debug KSPlayer: MEPlayerItem.swift:131 MEPlayerItem | nal_unit_type: 8(PPS), nal_ref_idc: 3
2024-02-22 20:08:44.261894+0500 SmartService[8673:2417432] debug KSPlayer: MEPlayerItem.swift:131 MEPlayerItem | Decoding VUI

I use KSPlayer with options like:

let options = KSOptions()
options.formatContextOptions["timeout"] = 0
options.formatContextOptions["scan_all_pmts"] = 1
options.formatContextOptions["auto_convert"] = 0
options.formatContextOptions["fps_probe_size"] = 3
options.formatContextOptions["reconnect"] = 1
options.formatContextOptions["reconnect_streamed"] = 1
options.formatContextOptions["rw_timeout"] = 10_000_000
options.formatContextOptions["max_analyze_duration"] = 300 * 1000
options.formatContextOptions["multiple_requests"] = 1
options.formatContextOptions["protocol_whitelist"] = "rtp,udp,file,http,https,tcp,tls,crypto,async,cache,data,httpproxy"
options.formatContextOptions["listen_timeout"] = -1

playerView.set(url:URL(string: response.url.fromBase64()!)!, options: options)

Can You please provide options for slow connection to RTSP stream?

AlienJust commented 7 months ago

If I play my IP cam stream in Your AppStore TracyPlayer app with default settings then it plays well even on slow connection!

kingslay commented 7 months ago

这个问题属于技术咨询。这个项目的技术咨询有两个收费方式:

  1. 单次技术咨询收费50美元。
  2. 持续每个月捐赠30美元以上。