mediamtx: playback list is very slow and not all files shown
Which version are you using?
v1.8.3
Which operating system are you using?
- Linux amd64 standard
- Linux amd64 Docker
- Linux arm64 standard
- Linux arm64 Docker
- Linux arm7 standard
- Linux arm7 Docker
- Linux arm6 standard
- Linux arm6 Docker
- Windows amd64 standard
- Windows amd64 Docker (WSL backend)
- macOS amd64 standard
- macOS amd64 Docker
- Other (please describe)
Describe the issue
http://server:9996/list?path=to_outside.1 request stucks for long time. Then (if browser not timedout) it returns one record.
[{"start":"2024-08-07T11:11:52.62923Z","duration":72479.305043111}]
for this path
./recordings/to_outside.1
├── 20240807
│ ├── 111152_629230.mp4
│ ├── 112652_765854.mp4
│ ├── 114152_914281.mp4
│ ├── 115653_036756.mp4
│ ├── 121153_221278.mp4
│ ├── 122653_411640.mp4
│ ├── 124153_575433.mp4
│ ├── 125653_674950.mp4
│ ├── 131153_834464.mp4
│ ├── 132653_965197.mp4
│ ├── 134154_162221.mp4
│ ├── 135654_387268.mp4
│ ├── 141154_496057.mp4
│ ├── 142654_610316.mp4
│ ├── 144154_768511.mp4
│ ├── 145654_881170.mp4
│ ├── 151155_053120.mp4
│ ├── 152655_205675.mp4
│ ├── 154155_335251.mp4
│ ├── 155655_496740.mp4
│ ├── 161155_660633.mp4
│ ├── 162655_820243.mp4
│ ├── 164155_925789.mp4
│ ├── 165656_101943.mp4
│ ├── 171156_267563.mp4
│ ├── 172656_432281.mp4
│ ├── 174156_536632.mp4
│ ├── 175656_713071.mp4
│ ├── 181156_882640.mp4
│ ├── 182657_098366.mp4
│ ├── 184157_223408.mp4
│ ├── 185657_348706.mp4
│ ├── 191157_516616.mp4
│ ├── 192657_701791.mp4
│ ├── 194157_814351.mp4
│ ├── 195657_981305.mp4
│ ├── 201158_126547.mp4
│ ├── 202658_291990.mp4
│ ├── 204158_405639.mp4
│ ├── 205658_571189.mp4
│ ├── 211158_714285.mp4
│ ├── 212658_901024.mp4
│ ├── 214159_015332.mp4
│ ├── 215659_170284.mp4
│ ├── 221159_347544.mp4
│ ├── 222659_507063.mp4
│ ├── 224159_674498.mp4
│ ├── 225659_791715.mp4
│ ├── 231159_953290.mp4
│ ├── 232700_043492.mp4
│ ├── 234200_225604.mp4
│ └── 235700_436868.mp4
└── 20240808
├── 001200_585937.mp4
├── 002700_691500.mp4
├── 004200_843033.mp4
├── 005701_020647.mp4
├── 011201_172174.mp4
├── 012701_293427.mp4
├── 014201_444663.mp4
├── 015701_630024.mp4
├── 021201_768303.mp4
├── 022701_904968.mp4
├── 024202_029968.mp4
├── 025702_234597.mp4
├── 031202_381124.mp4
├── 032702_522035.mp4
├── 034202_670731.mp4
├── 035702_846987.mp4
├── 041203_025881.mp4
├── 042703_111752.mp4
├── 044203_279583.mp4
├── 045703_441168.mp4
├── 051203_623591.mp4
├── 052703_748220.mp4
├── 054203_927473.mp4
├── 055704_089837.mp4
├── 061204_218188.mp4
├── 062704_371738.mp4
├── 064204_510545.mp4
├── 065704_670233.mp4
├── 071204_844362.mp4
└── 072704_968446.mp4
sometimes 3 records of 102 files
[{"start":"2024-08-07T11:11:52.62923Z","duration":80487.961487666},{"start":"2024-08-08T09:33:28.962707Z","duration":9297.306431444},{"start":"2024-08-08T12:08:31.318402Z","duration":431.201}]
last request timing is 7 minutes
Describe how to replicate the issue
My configuration is
playback: yes
playbackTrustedProxies: ['172.16.0.1/12']
pathDefaults:
recordPath: ./recordings/%path/%Y%m%d/%H%M%S_%f
rtspTransport: tcp
recordFormat: fmp4
recordSegmentDuration: 15m
recordDeleteAfter: 0s
paths:
to_inside.1:
source: 'rtsp://secret:secret@secret/ISAPI/Streaming/Channels/101'
record: yes
to_inside.2:
source: 'rtsp://secret:secret@secret/ISAPI/Streaming/Channels/102'
to_outside.1:
source: 'rtsp://secret:secret@secret/ISAPI/Streaming/Channels/101'
record: yes
to_outside.2:
source: 'rtsp://secret:secret@secret/ISAPI/Streaming/Channels/102'
But also had problems with default config.
Disk speed is about 123 MB/s.
Did you attach the server logs?
gate-stack-videoserver-1 |
gate-stack-videoserver-1 | 2024/08/08 12:08:32 DEB [path to_inside.1] [record] creating segment ./recordings/to_inside.1/20240808/120831_396037.mp4
gate-stack-videoserver-1 | 2024/08/08 12:08:32 DEB [path to_outside.1] [record] creating segment ./recordings/to_outside.1/20240808/120831_318402.mp4
gate-stack-videoserver-1 | 2024/08/08 12:08:34 DEB [playback] [conn 10.10.6.167:50030] [c->s] GET /list?path=to_outside.1 HTTP/1.1
gate-stack-videoserver-1 | Host: cams-msz.esc.ivjh.ru:9996
gate-stack-videoserver-1 | Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
gate-stack-videoserver-1 | Accept-Encoding: gzip, deflate
gate-stack-videoserver-1 | Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7
gate-stack-videoserver-1 | Cache-Control: max-age=0
gate-stack-videoserver-1 | Connection: keep-alive
gate-stack-videoserver-1 | Dnt: 1
gate-stack-videoserver-1 | Upgrade-Insecure-Requests: 1
gate-stack-videoserver-1 | User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
gate-stack-videoserver-1 |
....
gate-stack-videoserver-1 | 2024/08/08 12:15:43 DEB [playback] [conn 10.10.6.167:50030] [s->c] HTTP/1.1 200 OK
gate-stack-videoserver-1 | Access-Control-Allow-Credentials: true
gate-stack-videoserver-1 | Access-Control-Allow-Origin: *
gate-stack-videoserver-1 | Content-Type: application/json; charset=utf-8
gate-stack-videoserver-1 | Server: mediamtx
gate-stack-videoserver-1 |
gate-stack-videoserver-1 | (body of 192 bytes)
Did you attach a network dump?
not usefull
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (6 by maintainers)
Commits related to this issue
- playback: allow filtering timespans by start and end date (#3637) (#3489) — committed to bluenviron/mediamtx by aler9 2 years ago
- playback: improve /list response time (#3637) Response times of the /list endpoint were slow due to the need of computing the duration of each segment, that was obtained by summing the duration of ea... — committed to bluenviron/mediamtx by aler9 2 years ago
- playback: improve /list response time (#3637) Response times of the /list endpoint were slow due to the need of computing the duration of each segment, that was obtained by summing the duration of ea... — committed to bluenviron/mediamtx by aler9 2 years ago
- playback: improve /list response time (#3637) Response times of the /list endpoint were slow because the duration of each segment was computed from scratch by summing the duration of each of its part... — committed to bluenviron/mediamtx by aler9 2 years ago
- playback: allow filtering timespans by start and end date (#3637) (#3489) (#4085) — committed to bluenviron/mediamtx by aler9 2 years ago
- playback: improve /list response time (#3637) Response times of the /list endpoint were slow because the duration of each segment was computed from scratch by summing the duration of each of its part... — committed to bluenviron/mediamtx by aler9 2 years ago
- playback: improve /list response time (#3637) Response times of the /list endpoint were slow because the duration of each segment was computed from scratch by summing the duration of each of its part... — committed to bluenviron/mediamtx by aler9 2 years ago
- playback: improve /list response time (#3637) Response times of the /list endpoint were slow because the duration of each segment was computed from scratch by summing the duration of each of its part... — committed to bluenviron/mediamtx by aler9 2 years ago
- playback: improve /list response time (#3637) Response times of the /list endpoint were slow because the duration of each segment was computed from scratch by summing the duration of each of its part... — committed to bluenviron/mediamtx by aler9 2 years ago
- playback: improve /list response time (#3637) Response times of the /list endpoint were slow because the duration of each segment was computed from scratch by summing the duration of each of its part... — committed to bluenviron/mediamtx by aler9 2 years ago
- playback: improve /list response time (#3637) (#4096) Response times of the /list endpoint were slow because the duration of each segment was computed from scratch by summing the duration of each o... — committed to bluenviron/mediamtx by aler9 2 years ago
@redbaron-gt you can specify the start time you want and specify the duration for it. So
You dont need to have mediamtx split the timespans for you, you can specify any range in that ^ api call