Repository navigation
Live View Fails for WebRTC and MSE ("404 Not Found") After Updating to v0.44.0 #670
Description
After updating LightNVR to version v0.44.0, the Live View feature fails to render camera streams when using either WebRTC or MSE streaming modes.
Expected Behavior
Live View should successfully connect to the go2rtc service via WebRTC or MSE and render the camera streams smoothly without routing errors.
System Logs :
2026-10-24 13:04:09.130INFO[SystemAPI] Handling GET /api/system/logs request
2026-10-24 13:04:07.501WARN[HTTP] Slow API phase: path=/api/streams/01-Kandang/recording phase=handler execution duration_ms=426 request_id=099c3d0e-27b4-41c5-8bbd-0ba0012ca5ef
2026-10-24 13:04:07.499WARN[HTTP] Slow API phase: path=/api/streams/01-Home/recording phase=handler execution duration_ms=426 request_id=01e19f2b-eeb4-4382-9f07-6570fd652339
2026-10-24 13:04:07.466WARN[HTTP] Slow API phase: path=/api/telemetry/player phase=handler execution duration_ms=394 request_id=47d0b532-eb59-432b-92ca-1cfd65802618
2026-10-24 13:04:07.461WARN[HTTP] Slow API phase: path=/api/telemetry/player phase=handler execution duration_ms=387 request_id=4c90ff0b-e0ec-47f1-a470-3c7406b4a8c2
2026-10-24 13:04:07.333INFO[Detection] [01-Kandang] ONVIF motion detected (async thread, ts=1792818243)
2026-10-24 13:04:07.332INFO[Detection] [01-Kandang] Running detection (interval=10s, elapsed=12s, model=onvif)
2026-10-24 13:04:04.116INFO[SystemAPI] Handling GET /api/system/logs request
2026-10-24 13:04:04.111INFO[MP4Writer] [01-Kandang] Added recording at segment start (ID: 66777, trigger_type: continuous) for file: /mnt/usb/mp4/01-Kandang/2026/10/24/recording_20261024_130404.mp4
2026-10-24 13:04:04.108INFO[MP4Writer] [01-Kandang] Recording started...
2026-10-24 13:04:04.108INFO[MP4Writer] [01-Kandang] Previous segment ended with a key frame — starting new segment with overlap keyframe
2026-10-24 13:04:04.108INFO[MP4Writer] [01-Kandang] Found first key frame, starting recording
2026-10-24 13:04:04.107INFO[MP4Writer] [01-Kandang] Marked previous recording (ID: 66775) as complete for stream 01-Kandang (size: 20418035 bytes)
2026-10-24 13:04:04.107INFO[MP4Writer] [01-Kandang] Recording segment for stream 01-Kandang to /mnt/usb/mp4/01-Kandang/2026/10/24/recording_20261024_130404.mp4
2026-10-24 13:04:04.107INFO[MP4Writer] [01-Kandang] Using segment duration: 300 seconds (from database)
2026-10-24 13:04:04.107INFO[MP4Writer] [01-Kandang] Starting segment recording with info: index=1, has_audio=1, last_frame_was_key=1
2026-10-24 13:04:04.107INFO[MP4Writer] [01-Kandang] Starting new segment with index 2
2026-10-24 13:04:04.107INFO[MP4Writer] [01-Kandang] Recording from rtsp://localhost:8554/01-Kandang
2026-10-24 13:04:04.107INFO[MP4Writer] [01-Kandang] Output file: /mnt/usb/mp4/01-Kandang/2026/10/24/recording_20261024_130404.mp4
2026-10-24 13:04:04.107INFO[MP4Writer] [01-Kandang] Duration: 300 seconds
2026-10-24 13:04:04.107INFO[MP4Writer] [01-Kandang] Including audio stream in MP4 recording
2026-10-24 13:04:04.103INFO[MP4Writer] [01-Kandang] File size for /mnt/usb/mp4/01-Kandang/2026/10/24/recording_20261024_125851.mp4: 20418035 bytes
2026-10-24 13:04:04.095INFO[MP4Writer] [01-Kandang] Time to create new segment for stream 01-Kandang (elapsed time: 300 seconds, segment duration: 300 seconds)
2026-10-24 13:04:04.090INFO[MP4Writer] [01-Kandang] [01-Kandang] Recording thread detected video params: 1280x720 @ 25 fps, codec=h264
2026-10-24 13:04:04.087INFO[MP4Writer] [01-Kandang] Finished segment recording with info: index=1, has_audio=1, last_frame_was_key=1
2026-10-24 13:04:03.334INFO[MP4Writer] [01-Home] Added recording at segment start (ID: 66776, trigger_type: continuous) for file: /mnt/usb/mp4/01-Home/2026/10/24/recording_20261024_130403.mp4
2026-10-24 13:04:03.331INFO[MP4Writer] [01-Home] Recording started...
2026-10-24 13:04:03.331INFO[MP4Writer] [01-Home] Previous segment ended with a key frame — starting new segment with overlap keyframe
2026-10-24 13:04:03.331INFO[MP4Writer] [01-Home] Found first key frame, starting recording
2026-10-24 13:04:03.330INFO[MP4Writer] [01-Home] Recording segment for stream 01-Home to /mnt/usb/mp4/01-Home/2026/10/24/recording_20261024_130403.mp4
2026-10-24 13:04:03.330INFO[MP4Writer] [01-Home] Using segment duration: 300 seconds (from database)
2026-10-24 13:04:03.330INFO[MP4Writer] [01-Home] Starting segment recording with info: index=1, has_audio=1, last_frame_was_key=1
2026-10-24 13:04:03.330INFO[MP4Writer] [01-Home] Starting new segment with index 2
2026-10-24 13:04:03.330INFO[MP4Writer] [01-Home] Recording from rtsp://localhost:8554/01-Home
2026-10-24 13:04:03.330INFO[MP4Writer] [01-Home] Output file: /mnt/usb/mp4/01-Home/2026/10/24/recording_20261024_130403.mp4
2026-10-24 13:04:03.330INFO[MP4Writer] [01-Home] Duration: 300 seconds
2026-10-24 13:04:03.330INFO[MP4Writer] [01-Home] Including audio stream in MP4 recording
2026-10-24 13:04:03.329INFO[MP4Writer] [01-Home] Marked previous recording (ID: 66774) as complete for stream 01-Home (size: 26185305 bytes)
2026-10-24 13:04:03.326INFO[MP4Writer] [01-Home] File size for /mnt/usb/mp4/01-Home/2026/10/24/recording_20261024_125848.mp4: 26185305 bytes
2026-10-24 13:04:03.322INFO[Detection] [01-Kandang] ONVIF motion detected (async thread, ts=1792818243)
2026-10-24 13:04:03.318INFO[MP4Writer] [01-Home] Time to create new segment for stream 01-Home (elapsed time: 300 seconds, segment duration: 300 seconds)
2026-10-24 13:04:03.312INFO[MP4Writer] [01-Home] Finished segment recording with info: index=1, has_audio=1, last_frame_was_key=1
2026-10-24 13:04:03.312INFO[MP4Writer] [01-Home] [01-Home] Recording thread detected video params: 1280x720 @ 25 fps, codec=h264
2026-10-24 13:04:03.060INFOONVIF Detection: motion detected for 01-Kandang
2026-10-24 13:04:02.356INFO[HealthCheck] Handling GET /api/health request
2026-10-24 13:04:02.355WARN[HTTP] Slow API phase: path=/api/streams/01-Kandang/recording phase=handler execution duration_ms=275 request_id=5c12a1b2-670c-479d-b2c0-4e3f369a9cbf
2026-10-24 13:04:02.353WARN[HTTP] Slow API phase: path=/api/streams/01-Home/recording phase=handler execution duration_ms=274 request_id=711920f2-423d-473c-a54c-c422468ad9ff
2026-10-24 13:04:01.239INFOEnsuring detection-based recording is active for stream: 01-Kandang (annotation_only=true)
2026-10-24 13:04:01.239INFOUnified detection already running for stream 01-Kandang
2026-10-24 13:04:01.239INFOSuccessfully started detection-based recording for stream: 01-Kandang
2026-10-24 13:04:01.238INFOUsing go2rtc native HLS for stream 01-Kandang (no ffmpeg HLS thread needed)
2026-10-24 13:04:01.238INFOgo2rtc native HLS ready for stream 01-Kandang
2026-10-24 13:04:01.214INFOgo2rtc native HLS ready for stream 01-Home
2026-10-24 13:04:01.214INFOService check for stream 01-Kandang: enabled=1, record=1, streaming_enabled=1
2026-10-24 13:04:01.214INFORecording state for stream 01-Kandang: 1 (1=active, 0=inactive)
2026-10-24 13:04:01.213INFOUsing go2rtc native HLS for stream 01-Home (no ffmpeg HLS thread needed)
2026-10-24 13:04:01.148INFORunning periodic service check (32 max streams)
2026-10-24 13:04:01.148INFOService check for stream 01-Home: enabled=1, record=1, streaming_enabled=1
2026-10-24 13:04:01.148INFORecording state for stream 01-Home: 1 (1=active, 0=inactive)
2026-10-24 13:04:00.940INFOONVIF Detection: motion detected for 01-Kandang
2026-10-24 13:03:59.562INFO[HealthCheck] Successfully handled GET /api/health request
2026-10-24 13:03:59.496INFO[HealthCheck] Handling GET /api/health request
2026-10-24 13:03:59.468INFO[MP4Writer] [01-Kandang] Saved segment info for next segment: index=1, has_audio=1, last_frame_was_key=1
2026-10-24 13:03:59.353INFO[MP4Writer] [01-Kandang] DTS segment boundary reached (pkt->dts 27714450 >= threshold 27714000), checking current frame for segment close
2026-10-24 13:03:59.353INFO[MP4Writer] [01-Kandang] Found final key frame, ending recording
2026-10-24 13:03:59.353INFO[MP4Writer] [01-Kandang] Recording segment complete (video packets: 4500, audio packets: 4688)
2026-10-24 13:03:59.132INFO[SystemAPI] Handling GET /api/system/logs request
2026-10-24 13:03:57.353WARN[HTTP] Slow API phase: path=/api/streams/01-Kandang/recording phase=handler execution duration_ms=262 request_id=ba86ef9d-3309-4d36-aadd-224c1151a72a
2026-10-24 13:03:57.350WARN[HTTP] Slow API phase: path=/api/streams/01-Home/recording phase=handler execution duration_ms=260 request_id=22ecc294-aec8-4ef5-b323-6afb02b6f564
2026-10-24 13:03:56.597INFO[MP4Writer] [01-Home] Saved segment info for next segment: index=1, has_audio=1, last_frame_was_key=1
2026-10-24 13:03:56.452INFO[MP4Writer] [01-Home] Recording segment complete (video packets: 4560, audio packets: 4750)
2026-10-24 13:03:56.451INFO[MP4Writer] [01-Home] Found final key frame, ending recording
2026-10-24 13:03:55.345INFO[Detection] [01-Kandang] Running detection (interval=10s, elapsed=12s, model=onvif)
2026-10-24 13:03:54.122INFO[SystemAPI] Handling GET /api/system/logs request
2026-10-24 13:03:52.487INFO[MP4Writer] [01-Home] Wall-clock duration limit of 300 seconds reached, waiting for next key frame
2026-10-24 13:03:52.415WARN[HTTP] Slow API phase: path=/api/streams/01-Kandang/recording phase=handler execution duration_ms=309 request_id=ed15af42-b1fc-4e9a-9085-912d0304e987
2026-10-24 13:03:52.413WARN[HTTP] Slow API phase: path=/api/streams/01-Home/recording phase=handler execution duration_ms=307 request_id=3863bfea-0505-4d63-862b-027211f70504
2026-10-24 13:03:52.353INFO[HealthCheck] Handling GET /api/health request
2026-10-24 13:03:52.110INFO=== Detection Stream Status ===
2026-10-24 13:03:52.110INFOStream 01-Kandang: ACTIVE (thread running) (interval: 10, frame counter: 0)
2026-10-24 13:03:52.110INFO - Unified detection state: 2
2026-10-24 13:03:52.110INFOTotal active detection streams: 1 (running threads: 1)
2026-10-24 13:03:52.110INFO==============================
2026-10-24 13:03:50.449INFO[StorageAPI] Handling GET /api/storage/health request
2026-10-24 13:03:50.397INFO[SystemAPI] Handling GET /api/system/logs request
2026-10-24 13:03:46.733WARN[HTTP] Slow API phase: path=/api/streams/01-Kandang/recording phase=handler execution duration_ms=277 request_id=db2c22ad-9560-4456-8595-fed041ccfbd6
2026-10-24 13:03:46.731WARN[HTTP] Slow API phase: path=/api/streams/01-Home/recording phase=handler execution duration_ms=277 request_id=d00fd04f-0676-4ea4-a73a-83e80ed3a412
2026-10-24 13:03:44.007INFO[Detection] [01-Kandang] Heartbeat: state=BUFFERING, packets=9210, detections=5, last_check=1s ago
2026-10-24 13:03:43.349INFO[Detection] [01-Kandang] Running detection (interval=10s, elapsed=12s, model=onvif)
2026-10-24 13:03:42.345INFO[HealthCheck] Handling GET /api/health request
2026-10-24 13:03:36.949INFO[StreamsAPI] Handling GET /api/streams request
2026-10-24 13:03:36.462WARN[HTTP] Slow API phase: path=/api/streams/01-Kandang/recording phase=handler execution duration_ms=354 request_id=d4f053f5-9650-4ee3-9923-52ff1c4e29cc
2026-10-24 13:03:36.461WARN[HTTP] Slow API phase: path=/api/streams/01-Home/recording phase=handler execution duration_ms=361 request_id=2eaca81f-9b3e-4c6b-8c45-7392080ee4c6
2026-10-24 13:03:36.416WARN[HTTP] Slow API phase: path=/api/telemetry/player phase=handler execution duration_ms=308 request_id=2baf2f41-495f-4367-befd-d269812f0ef1
2026-10-24 13:03:36.412WARN[HTTP] Slow API phase: path=/api/telemetry/player phase=handler execution duration_ms=314 request_id=e330584d-8f69-49c1-a0f1-373ec200bdc7
2026-10-24 13:03:32.332INFO[HealthCheck] Handling GET /api/health request
2026-10-24 13:03:31.319INFO[Detection] [01-Kandang] Running detection (interval=10s, elapsed=12s, model=onvif)
2026-10-24 13:03:31.049INFOUsing go2rtc native HLS for stream 01-Kandang (no ffmpeg HLS thread needed)
2026-10-24 13:03:31.049INFOgo2rtc native HLS ready for stream 01-Kandang
2026-10-24 13:03:31.049INFOEnsuring detection-based recording is active for stream: 01-Kandang (annotation_only=true)
Additional Context
Continuous recording and motion detection are still functioning properly in the background.
Activity
matteius commentedon Oct 25, 2026
Yes sorry about that, I ran into it too, fixed on 0.44.1.