refactor: remove framerate estimation from RTSP stream inspection
This commit is contained in:
@@ -567,7 +567,6 @@ func (c *CLI) inspectRTSPStream(streamURI string) map[string]interface{} {
|
|||||||
"reachable": false,
|
"reachable": false,
|
||||||
"codec": "unknown",
|
"codec": "unknown",
|
||||||
"resolution": "unknown",
|
"resolution": "unknown",
|
||||||
"framerate": "unknown",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use rtspeek library for detailed stream inspection
|
// Use rtspeek library for detailed stream inspection
|
||||||
@@ -596,17 +595,6 @@ func (c *CLI) inspectRTSPStream(streamURI string) map[string]interface{} {
|
|||||||
details["resolution"] = resolutions[0]
|
details["resolution"] = resolutions[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to determine framerate from clock rate
|
|
||||||
if firstVideo.ClockRate != nil && *firstVideo.ClockRate > 0 {
|
|
||||||
// For H.264/H.265, clock rate is typically 90kHz
|
|
||||||
// Actual framerate depends on RTP timestamps, but we can estimate
|
|
||||||
if firstVideo.Format == "H264" || firstVideo.Format == "H265" {
|
|
||||||
details["framerate"] = "30 fps" // Common default
|
|
||||||
} else if firstVideo.Format == "MJPEG" {
|
|
||||||
details["framerate"] = "variable"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return details
|
return details
|
||||||
@@ -714,10 +702,6 @@ func (c *CLI) getStreamURIs(ctx context.Context) {
|
|||||||
fmt.Printf(" Resolution: %s\n", resolution)
|
fmt.Printf(" Resolution: %s\n", resolution)
|
||||||
}
|
}
|
||||||
|
|
||||||
if framerate, ok := details["framerate"].(string); ok && framerate != "unknown" {
|
|
||||||
fmt.Printf(" Frame Rate: %s\n", framerate)
|
|
||||||
}
|
|
||||||
|
|
||||||
if port, ok := details["port"].(string); ok {
|
if port, ok := details["port"].(string); ok {
|
||||||
fmt.Printf(" RTSP Port: %s\n", port)
|
fmt.Printf(" RTSP Port: %s\n", port)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user