Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Beta2] Frigate clips occasionally do not "autoplay" -- unexpected client/server interaction? #1637

Closed
dermotduffy opened this issue Aug 28, 2021 · 18 comments
Labels
bug Something isn't working stale
Milestone

Comments

@dermotduffy
Copy link
Contributor

dermotduffy commented Aug 28, 2021

Describe the bug

With Frigate 0.9.0 beta2, and the matching HA integration pre-release 2.0.0, occasionally a clip/event will not autoplay in the browser. When the video element loads, manually clicking the play icon will correctly play the video. I have observed this behavior:

  • In the HA media browser
  • In the Lovelace card where I'm manually assembling URLs and passing them to the HLS player.

I am confident this is new behavior from Frigate 0.9.0 onwards, and as the URLs are resolving to correctly formed Frigate URLs and the video elements have the attribute autoplay enabled -- I am not convinced this is a "client-side" issue even though it has all the appearance of one. This happens across multiple browsers and OSes.

This makes media browsing more painful.

Version of frigate
0.9.0-3340952

Config file
Include your full config file wrapped in triple back ticks.

mqtt:
  host: mqtt
ffmpeg:
  global_args:
    - -hide_banner
    - -loglevel
    - info
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p
   - -fflags
   - +genpts+discardcorrupt
   - -rtsp_transport
   - tcp
   - -stimeout
   - '5000000'
cameras:
  sitting_room:
    ffmpeg:
      inputs:
        - path: rtsp://rtsp:{FRIGATE_WYZE_RTSP_PASSWORD}@{HOST_PATH}
          roles:
            - detect
            - rtmp
            - record
    detect:
      enabled: True
      width: 1920
      height: 1080
      fps: 4
    record:
      events:
        enabled: True
        objects:
          - person
    motion:
      mask:
        - 1868,1058,1868,1018,1392,1018,1392,1058

[cut as the file is lengthy and this is likely not relevant to the issue at hand. Full available upon request]

detectors:
  coral:
    type: edgetpu
    device: usb
objects:
  filters:
    person:
      # Optional: minimum score for the object to initiate tracking (default: shown below)
      min_score: 0.6
      # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
      threshold: 0.75

Frigate container logs

Nothing logged of interest.

Query logs

Logs from my reverse proxy (Apache) on the requests being made from HomeAssistant to Frigate:

On video element load (where I would expect autoplay):

frigate:443 [IP] - - [28/Aug/2021:09:28:57 -0700] "GET /vod/event/1630123639.21596-l1y9af/index.m3u8?authSig=[REDACTED] HTTP/1.1" 200 955 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"
frigate:443 [IP] - - [28/Aug/2021:09:28:57 -0700] "GET /vod/event/1630123639.21596-l1y9af/index.m3u8?authSig=[REDACTED] HTTP/1.1" 200 5691 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"
frigate:443 [IP] - - [28/Aug/2021:09:28:57 -0700] "GET /vod/event/1630123639.21596-l1y9af/seg-1-v1.ts?authSig=[REDACTED] HTTP/1.1" 200 1173025 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"
frigate:443 [IP] - - [28/Aug/2021:09:28:57 -0700] "GET /vod/event/1630123639.21596-l1y9af/seg-2-v1.ts?authSig=[REDACTED] HTTP/1.1" 200 1049014 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"
frigate:443 [IP] - - [28/Aug/2021:09:28:57 -0700] "GET /vod/event/1630123639.21596-l1y9af/seg-3-v1.ts?authSig=[REDACTED] HTTP/1.1" 200 1157897 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"

... when play is manually clicked:

frigate:443 [IP] - - [28/Aug/2021:09:28:59 -0700] "GET / HTTP/1.1" 200 6028 "-" "Go-http-client/1.1"
frigate:443 [IP] - - [28/Aug/2021:09:29:00 -0700] "GET /vod/event/1630123639.21596-l1y9af/seg-4-v1.ts?authSig=[REDACTED] HTTP/1.1" 200 149091 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"

Frigate stats

{"back_yard":{"camera_fps":4.1,"capture_pid":285,"detection_fps":1.0,"pid":247,"process_fps":4.1,"skipped_fps":0.0},"detection_fps":7.1,"detectors":{"coral":{"detection_start":0.0,"inference_speed":9.53,"pid":227}},"front_door":{"camera_fps":4.0,"capture_pid":290,"detection_fps":0.0,"pid":249,"process_fps":4.0,"skipped_fps":0.0},"garage":{"camera_fps":4.1,"capture_pid":275,"detection_fps":0.0,"pid":244,"process_fps":4.1,"skipped_fps":0.0},"kitchen":{"camera_fps":0.1,"capture_pid":259,"detection_fps":0.1,"pid":238,"process_fps":0.1,"skipped_fps":0.0},"landing":{"camera_fps":4.0,"capture_pid":281,"detection_fps":0.0,"pid":246,"process_fps":4.0,"skipped_fps":0.0},"living_room":{"camera_fps":4.0,"capture_pid":266,"detection_fps":0.0,"pid":241,"process_fps":4.0,"skipped_fps":0.0},"master_bedroom":{"camera_fps":4.1,"capture_pid":270,"detection_fps":0.0,"pid":243,"process_fps":4.1,"skipped_fps":0.0},"office":{"camera_fps":0.1,"capture_pid":261,"detection_fps":0.0,"pid":239,"process_fps":0.1,"skipped_fps":0.0},"service":{"storage":{"/dev/shm":{"free":234.4,"mount_type":"tmpfs","total":268.4,"used":34.1},"/media/frigate/clips":{"free":15628.6,"mount_type":"ext4","total":244529.7,"used":216408.2},"/media/frigate/recordings":{"free":15628.6,"mount_type":"ext4","total":244529.7,"used":216408.2},"/tmp/cache":{"free":1999.7,"mount_type":"tmpfs","total":2000.0,"used":0.3}},"uptime":2177,"version":"0.9.0-3340952"},"sitting_room":{"camera_fps":4.1,"capture_pid":251,"detection_fps":6.0,"pid":235,"process_fps":4.1,"skipped_fps":0.0}}

Screenshots
If applicable, add screenshots to help explain your problem.

Maybe ~75% of clicked clips will autoplay, 25% will act like this (no autoplay, but work fine when play is manually clicked).

Peek 2021-08-28 09-36

Computer Hardware

  • OS: Ubuntu 20.04.3 LTS
  • Install method: Manual docker
  • Virtualization: None
  • Coral Version: USB
  • Network Setup: Both
@dermotduffy dermotduffy changed the title [Beta2] Frlgate clips occasionally do not "autoplay" -- unexpected client/server interaction? [Beta2] Frigate clips occasionally do not "autoplay" -- unexpected client/server interaction? Aug 28, 2021
@blakeblackshear blakeblackshear added this to the 0.9.0 milestone Aug 28, 2021
@blakeblackshear blakeblackshear added the bug Something isn't working label Aug 28, 2021
@blakeblackshear
Copy link
Owner

Can you try and get the nginx logs from inside the frigate container when this happens? They should be at /usr/local/nginx/logs/

@dermotduffy
Copy link
Contributor Author

dermotduffy commented Aug 28, 2021

On load (no autoplay, ignore /api/stats from various HA instances):

192.168.176.1 - - [28/Aug/2021:10:58:13 -0700] "GET /api/stats HTTP/1.1" 200 1543 "-" "HomeAssistant/2021.9.0.dev20210819 aiohttp/3.7.4.post0 Python/3.9" "IP"
192.168.176.1 - - [28/Aug/2021:10:58:14 -0700] "GET /api/stats HTTP/1.1" 200 1543 "-" "HomeAssistant/2021.8.1 aiohttp/3.7.4.post0 Python/3.9" "172.27.0.2"
192.168.176.1 - - [28/Aug/2021:10:58:18 -0700] "GET /api/stats HTTP/1.1" 200 1543 "-" "HomeAssistant/2021.9.0.dev20210819 aiohttp/3.7.4.post0 Python/3.9" "IP"
192.168.176.1 - - [28/Aug/2021:10:58:19 -0700] "GET /api/stats HTTP/1.1" 200 1543 "-" "HomeAssistant/2021.8.1 aiohttp/3.7.4.post0 Python/3.9" "172.27.0.2"
192.168.176.1 - - [28/Aug/2021:10:58:23 -0700] "GET /api/stats HTTP/1.1" 200 1542 "-" "HomeAssistant/2021.9.0.dev20210819 aiohttp/3.7.4.post0 Python/3.9" "IP"
192.168.176.1 - - [28/Aug/2021:10:58:24 -0700] "GET /api/stats HTTP/1.1" 200 1543 "-" "HomeAssistant/2021.8.1 aiohttp/3.7.4.post0 Python/3.9" "172.27.0.2"
192.168.176.1 - - [28/Aug/2021:10:58:25 -0700] "GET /api/events?limit=50&has_clip=1 HTTP/1.1" 200 374091 "-" "HomeAssistant/2021.9.0.dev20210819 aiohttp/3.7.4.post0 Python/3.9" "IP"
192.168.176.1 - - [28/Aug/2021:10:58:25 -0700] "GET /api/events/summary?has_clip=1 HTTP/1.1" 200 2870 "-" "HomeAssistant/2021.9.0.dev20210819 aiohttp/3.7.4.post0 Python/3.9" "IP"
192.168.176.1 - - [28/Aug/2021:10:58:26 -0700] "GET /api/events?after=1630134000&limit=50&has_clip=1 HTTP/1.1" 200 20091 "-" "HomeAssistant/2021.9.0.dev20210819 aiohttp/3.7.4.post0 Python/3.9" "IP"
192.168.176.1 - - [28/Aug/2021:10:58:26 -0700] "GET /api/events/summary?has_clip=1 HTTP/1.1" 200 2870 "-" "HomeAssistant/2021.9.0.dev20210819 aiohttp/3.7.4.post0 Python/3.9" "IP"
192.168.176.1 - - [28/Aug/2021:10:58:27 -0700] "GET /vod/event/1630166262.801895-n19k1j/index.m3u8?authSig=REDACTED HTTP/1.1" 200 409 "https://[DOMAIN]/media-browser" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36" "IP, ::1, IP"
192.168.176.1 - - [28/Aug/2021:10:58:27 -0700] "GET /vod/event/1630166262.801895-n19k1j/index.m3u8?authSig=REDACTED HTTP/1.1" 200 409 "https://[DOMAIN]/media-browser" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36" "IP, ::1, IP"
192.168.176.1 - - [28/Aug/2021:10:58:27 -0700] "GET /vod/event/1630166262.801895-n19k1j/seg-1-v1.ts?authSig=REDACTED HTTP/1.1" 200 1131384 "https://[DOMAIN]/media-browser" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36" "IP, ::1, IP"
192.168.176.1 - - [28/Aug/2021:10:58:27 -0700] "GET /vod/event/1630166262.801895-n19k1j/seg-2-v1.ts?authSig=REDACTED HTTP/1.1" 200 1098296 "https://[DOMAIN]/media-browser" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36" "IP, ::1, IP"
192.168.176.1 - - [28/Aug/2021:10:58:27 -0700] "GET /vod/event/1630166262.801895-n19k1j/seg-3-v1.ts?authSig=REDACTED HTTP/1.1" 200 662136 "https://[DOMAIN]/media-browser" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36" "IP, ::1, IP"
192.168.176.1 - - [28/Aug/2021:10:58:28 -0700] "GET /api/stats HTTP/1.1" 200 1543 "-" "HomeAssistant/2021.9.0.dev20210819 aiohttp/3.7.4.post0 Python/3.9" "IP"

On manual play click:

192.168.176.1 - - [28/Aug/2021:10:58:29 -0700] "GET /api/stats HTTP/1.1" 200 1543 "-" "HomeAssistant/2021.8.1 aiohttp/3.7.4.post0 Python/3.9" "172.27.0.2"
192.168.176.1 - - [28/Aug/2021:10:58:31 -0700] "GET /vod/event/1630166262.801895-n19k1j/seg-2-v1.ts?authSig=REDACTED HTTP/1.1" 200 1098296 "https://[DOMAIN]/media-browser" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36" "IP, ::1, IP"
192.168.176.1 - - [28/Aug/2021:10:58:31 -0700] "GET /vod/event/1630166262.801895-n19k1j/seg-2-v1.ts?authSig=REDACTED HTTP/1.1" 200 1098296 "https://[DOMAIN]/media-browser" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36" "IP, ::1, IP"
192.168.176.1 - - [28/Aug/2021:10:58:31 -0700] "GET /vod/event/1630166262.801895-n19k1j/seg-2-v1.ts?authSig=REDACTED HTTP/1.1" 200 1098296 "https://[DOMAIN]/media-browser" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36" "IP, ::1, IP"

@blakeblackshear
Copy link
Owner

I haven't been able to reproduce this. Does this happen for the same clip consistently?

@dermotduffy
Copy link
Contributor Author

dermotduffy commented Aug 28, 2021

Yes -- once a clip behaves this way, it seems to reliably & repeatedly behave this way. I see it on multiple cameras.

@blakeblackshear
Copy link
Owner

Do you have any errors in the browser console? What browser are you using?

@dermotduffy
Copy link
Contributor Author

Nothing on the console. Tested:

  • Ubuntu, Chrome Version 91.0.4472.164-1 [Primary test environment]
  • OSX, Chrome Version 92.0.4515.159 [Secondary]

@blakeblackshear
Copy link
Owner

I am wondering of there is something wrong with the first segment referenced in the m3u8 playlist. Can you curl that endpoint for the failing event and post the contents?

@dermotduffy
Copy link
Contributor Author

Verified on Safari Version 14.0.3 (15610.4.3.1.7, 15610) -- has the same behavior on the same clips ... how odd.

@dermotduffy
Copy link
Contributor Author

Assuming you mean on the index, here is a curl of a "bad" clip

(/tmp) $ curl "https://[HA]/api/frigate/frigate/vod/event/1630183869.903645-7cnse9/index.m3u8?authSig=[AUTH]"

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-ALLOW-CACHE:YES
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:10.000,
seg-1-v1.ts?authSig=[SAME_AUTH]
#EXTINF:9.046,
seg-2-v1.ts?authSig=[SAME_AUTH]
#EXT-X-ENDLIST

@dermotduffy
Copy link
Contributor Author

I can manually fetch the segments referenced:

(/tmp) $ curl -o /tmp/out "https://[HA]/api/frigate/frigate/vod/event/1630183869.903645-7cnse9/seg-1-v1.ts?authSig=[AUTH]"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  940k  100  940k    0     0  34.0M      0 --:--:-- --:--:-- --:--:-- 34.0M
[2021-08-28 14:08:34] [0]
(/tmp) $ file /tmp/out
/tmp/out: MPEG transport stream data

@dermotduffy
Copy link
Contributor Author

dermotduffy commented Aug 28, 2021

Hmm. This is interesting, two segments captured from a good clip and bad clip from the same camera (Note: I have no idea what this command should output, I'm stabbing in the dark here):

(/tmp) $ ffprobe /tmp/out-good
ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[mpegts @ 0x55d260df6f00] start time for stream 1 is not set in estimate_timings_from_pts
Input #0, mpegts, from '/tmp/out-good':
  Duration: 00:00:10.02, start: 0.101000, bitrate: 891 kb/s
  Program 1 
    Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080, 15 fps, 15 tbr, 90k tbn, 30 tbc
    Stream #0:1[0x101]: Data: timed_id3 (ID3  / 0x20334449)
Unsupported codec with id 100358 for input stream 1
(/tmp) $ ffprobe /tmp/out-bad
ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[h264 @ 0x558b3403eec0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x558b3403eec0] decode_slice_header error
[h264 @ 0x558b3403eec0] no frame!
[mpegts @ 0x558b34039f00] start time for stream 1 is not set in estimate_timings_from_pts
Input #0, mpegts, from '/tmp/out-bad':
  Duration: 00:00:10.02, start: 0.101000, bitrate: 768 kb/s
  Program 1 
    Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080, 15 fps, 15 tbr, 90k tbn, 30 tbc
    Stream #0:1[0x101]: Data: timed_id3 (ID3  / 0x20334449)
Unsupported codec with id 100358 for input stream 1

@blakeblackshear
Copy link
Owner

I am guessing this is related: kaltura/nginx-vod-module#675

What is the i-frame interval on your camera?

@blakeblackshear
Copy link
Owner

Do you see the same behavior for this event in Frigate's Events UI?

@dermotduffy
Copy link
Contributor Author

Sorry, I don't know that. The cameras I have seen this behavior on so far are WYZE with the "official" RTSP firmware, I don't think they have a means to configure i-frame interval.

@dermotduffy
Copy link
Contributor Author

It plays fine on the Frigate Event UI (but that does not autoplay anyway, for any clips, AFAICT).

@dermotduffy
Copy link
Contributor Author

The workaround described in that other bug works! Adding this to the server section of /usr/local/nginx/conf/nginx.conf turns a previously bad clip into a good clip:

        vod_align_segments_to_key_frames on;

I do not understand the implications of enabling this more generally, do you? This implies there may be timing implications.

@blakeblackshear
Copy link
Owner

Fantastic! Thanks for testing. I actually think this will help some other issues that have been hard to track down. I believe it tries to force 10s segments, but not all cameras have consistent enough key frame intervals. I will add it in and do some testing on my end in the morning. If I don't run into anything, I will add it in and put up the next RC.

@stale
Copy link

stale bot commented Sep 28, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 28, 2021
@stale stale bot closed this as completed Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants