Frigate : Green screen for H265 stream

Hi,

I’ve succesfully added my first camera “Voordeur3” in my Frigate configuration.

I’m trying to add a second camera “Living”, which apparently uses H265 instead of H264.
I’ve added the camera the same way in the configuration as my first one, but it appears as a green screen.

I’m able to run the stream correctly from my VLC player.
I used the pixel settings (in Frigate) I could see in codec part of Mediaplayer.

HA is installed on :
Intel Celeron Dualcore NUC 8GB RAM en 120GB SSD - J4025 2GHz - WIFI/Bluetooth - 2x HDMI - Win11 PRO
HA is running in HyperV on the box.

I’ve got the following in my log files :

[2023-03-09 12:52:30] frigate.video                  ERROR   : Living: Unable to read frames from ffmpeg process.
[2023-03-09 12:52:30] frigate.video                  ERROR   : Living: Unable to read frames from ffmpeg process.
[2023-03-09 12:52:30] frigate.video                  ERROR   : Living: ffmpeg process is not running. exiting capture thread...
[2023-03-09 12:52:31] frigate.record                 WARNING : Discarding a corrupt recording segment: Voordeur3-20230309125222.mp4
[2023-03-09 12:52:40] watchdog.Living                ERROR   : Ffmpeg process crashed unexpectedly for Living.
[2023-03-09 12:52:40] watchdog.Living                ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 2 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 26 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 17 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 6 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 40 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 46 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 44 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Illegal combination of S and E bit in RTP/HEVC packet
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 18 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] PPS id out of range: 0
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   :     Last message repeated 1 times
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [hevc @ 0x55e8f87bedc0] Error parsing NAL unit #0.
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : [rtsp @ 0x55e8f87b9e40] Could not find codec parameters for stream 0 (Video: hevc, none, 1280x720): unspecified pixel format
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Immediate exit requested
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : Error initializing output stream 0:0 -- 
[2023-03-09 12:52:40] ffmpeg.Living.detect           ERROR   : 
[2023-03-09 12:53:00] watchdog.Living                INFO    : No frames received from Living in 20 seconds. Exiting ffmpeg...
[2023-03-09 12:53:00] watchdog.Living                INFO    : Waiting for ffmpeg to exit gracefully...
[2023-03-09 12:53:00] frigate.video                  ERROR   : Living: Unable to read frames from ffmpeg process.
[2023-03-09 12:53:00] frigate.video                  ERROR   : Living: ffmpeg process is not running. exiting capture thread...
[2023-03-09 12:53:01] frigate.record                 WARNING : Discarding a corrupt recording segment: Voordeur3-20230309125252.mp4

My Frigate.yaml

---
mqtt:
  host: 192.168.1.101
  port: 1883
  user: Mosquitto
  password: xahz9uv17257575g1aetiaLoo3dahnge6quaagh0ieZae

#ffmpeg:
#  hwaccel_args:
#    - -hwaccel
#    - -hwaccel_device
#    - /dev/dri/renderD128
#    - -hwaccel_output_format yuv420p

#ffmpeg:
#  hwaccel_args: -c:v h264_qsv

cameras:
  Voordeur3:
    ffmpeg:
      inputs:
        - path: rtsp://admin:@192.168.1.10:8001
          roles:
            - rtmp
            - detect
            - record
    rtmp:
      enabled: True
    detect:
      width: 1920
      height: 1080
      fps: 5
    record:
      enabled: True
      retain: 
        days: 0
        mode: active_objects
      events:
       pre_capture: 10
       post_capture: 10       
       objects: 
        - person
        - dog
        - cat
       retain:
        default: 3
        mode: active_objects
    snapshots:
      enabled: True
      timestamp: True
      retain:
        default: 10
        objects:
         person: 15
         
         
  Living:
    ffmpeg:
      inputs:
        - path: rtsp://admin:@192.168.1.20:8001
          roles:
            - detect
            - record
    rtmp:
      enabled: False
    detect:
      width: 2304
      height: 1296
      fps: 5
    record:
      enabled: True
      retain: 
        days: 0
        mode: active_objects
      events:
       pre_capture: 10
       post_capture: 10       
       objects: 
        - person
        - dog
        - cat
       retain:
        default: 3
        mode: active_objects
    snapshots:
      enabled: True
      timestamp: True
      retain:
        default: 10
        objects:
         person: 15         
         
         
       # objects: 3      
      
    #events:
    #  retain:
    #    default: 3
    #    mode: active_objects
    #  objects:
    #    dog: 1
    #    car: 2
    #    person: 5

birdseye:
  enabled: False

Are you sure the correct resolution is configured.

I do not believe that H265 is supported. Could be wrong, but I dont think so…
Also, you do not need such a large detect resolution. That will actually slow things down. I keep mine at 960x540 and it detects everything just fine.

Thanks for the feedback! I lowered my detection resolution. (will probably be better on the CPU :slight_smile: )
Hopefully there’s a way to add the stream.

H.265 is fully supported in frigate as long as your browser supports it (Firefox does not)

As the docs say you need to disable rtmp for h265

I have disabled rtmp but still cannot get the frigate stream to display when I switch my camera to H.265.

Is it not supported?

Thanks

h265 is supported, frigate uses ffmpeg and supports many codecs. If the stream is not loading then you should check the logs, that will tell you what is wrong