ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.86k stars 5.29k forks source link

Useless `live_ms` in streams HTTP API? #3783

Closed ysc3839 closed 3 months ago

ysc3839 commented 10 months ago

Description

In the result of streams HTTP API there is a live_ms:

{
    "id": "vid-14w0m16",
    "name": "stream_2",
    "vhost": "vid-583q51c",
    "app": "push",
    "live_ms": 1692788753828,
    "clients": 1,
    "frames": 229557,
    "send_bytes": 7729,
    "recv_bytes": 289217559,
    "kbps": {
        "recv_30s": 251,
        "send_30s": 0
    },
    "publish": {
        "active": true,
        "cid": "042k4m00"
    },
    "video": {
        "codec": "H264",
        "profile": "High",
        "level": "3.2",
        "width": 768,
        "height": 320
    },
    "audio": {
        "codec": "AAC",
        "sample_rate": 44100,
        "channel": 2,
        "profile": "LC"
    }
}

However it is current system time: https://github.com/ossrs/srs/blob/6babf01de21c346398beeaa6026fc7f9052cb657/trunk/src/app/srs_app_statistic.cpp#L119 Is this time useful? Personally I think it should be stream creation time.