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

How to resolve ffmpeg errors when enabling Raspberry Pi 4 ffmpeg 32 bit hardware acceleration #731

Closed
mchangsp opened this issue Feb 6, 2021 · 6 comments

Comments

@mchangsp
Copy link

mchangsp commented Feb 6, 2021

I have frigate 0.8.1-D376F6B running on a Raspberry Pi.
('vcgencmd get_mem gpu' gives the result
gpu=128M
)
Without hardware acceleration the application runs fine.
However, when I enable

ffmpeg:  
  hwaccel_args:
    # 32 bit OS
    - -c:v
    - h264_mmal 

I get strange errors:

frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     comment         : videoSub
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     encoder         : Lavf58.45.100
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Stream #3:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x960, q=2-31, 73728 kb/s, 5 fps, 5 tbn, 5 tbc
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Metadata:
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :       encoder         : Lavc58.91.100 rawvideo
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [flv @ 0x1121fe0] Failed to update header with correct duration.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [flv @ 0x1121fe0] Failed to update header with correct filesize.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : frame=  167 fps=9.5 q=-1.0 Lq=-1.0 q=-1.0 q=0.0 size=N/A time=00:00:19.71 bitrate=N/A speed=1.12x
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : video:3404kB audio:135kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Any suggestions on what to do to resolve these errors?

@mchangsp
Copy link
Author

mchangsp commented Feb 6, 2021

full config file

mqtt:
  host: xxx.xxx.xxx.xxx
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: uuuuuu
  password: pppppp
  stats_interval: 60

logger:
  default: info
  logs:
    frigate.mqtt: error
    ffmpeg.garden.detect: info  

ffmpeg:  
  global_args:
    - -hide_banner
    - -loglevel
    - info
  #hwaccel_args:
    # 32 bit OS
    #- -c:v
    #- h264_mmal 
    # 64 bit OS
    #- -c:v
    #- h264_v4l2m2m
  input_args:
    - -avoid_negative_ts
    - make_zero
    - -fflags
    - nobuffer
    - -flags
    - low_delay
    - -strict
    - experimental
    - -fflags
    - +genpts+discardcorrupt
    - -rtsp_transport
    - tcp
    - -stimeout
    - '5000000'
    - -use_wallclock_as_timestamps
    - '1'
    - -vsync
    - '2'
  

cameras:
  # Required: name of the camera
  fr_frontdoor:
    # Required: ffmpeg settings for the camera
    ffmpeg:
      inputs: 
        - path: rtsp://xxxxxxx/videoSub
          roles:
            - detect
            - clips
            #- record
            - rtmp

    width: 1280
    height: 960
    fps: 5
    clips:
      enabled: true
      pre_capture: 10
      post_capture: 10
    snapshots:
      enabled: true
      timestamp: true
      crop: false
    record:
      enabled: true

  fr_garden:
    ffmpeg:
      inputs: 
        - path: rtsp://xxxxxxx/videoSub
          roles:
            - detect
            - clips
            #- record
            - rtmp
    width: 1280
    height: 720
    fps: 5 
    clips:
      enabled: true
      pre_capture: 10
      post_capture: 10
    snapshots:
      enabled: true
      timestamp: true
      crop: false
    record:
      enabled: true
      retain_days: 30
   


objects:
  track:
    - person
    - cat
    - dog
    - bird

@blakeblackshear
Copy link
Owner

I'm assuming you are seeing ffmpeg be restarted in the logs too. Is it in a continuous fail loop or does it work for a while and fail occasionally?

@mchangsp
Copy link
Author

mchangsp commented Feb 6, 2021

I'm assuming you are seeing ffmpeg be restarted in the logs too. Is it in a continuous fail loop or does it work for a while and fail occasionally?

Thanks for looking into the matter.

I do a 'docker-compose up' and I see the errors in the terminal.
It is failing in a continuous loop.

Here is a more detailed log of what is in the output

pi@rpilab01:~/project/frigate$ docker-compose up
Starting frigate ... done
Attaching to frigate
frigate    |  * Starting nginx nginx
frigate    |    ...done.
frigate    | frigate.app                    WARNING : Camera fr_frontdoor has record enabled, but record is not assigned to an input.
frigate    | frigate.app                    WARNING : Camera fr_garden has record enabled, but record is not assigned to an input.
frigate    | Starting migrations
frigate    | peewee_migrate                 INFO    : Starting migrations
frigate    | There is nothing to migrate
frigate    | peewee_migrate                 INFO    : There is nothing to migrate
frigate    | detector.coral                 INFO    : Starting detection process: 31
frigate    | frigate.app                    INFO    : Camera processor started for fr_frontdoor: 34
frigate    | frigate.edgetpu                INFO    : Attempting to load TPU as usb
frigate    | frigate.app                    INFO    : Camera processor started for fr_garden: 35
frigate    | frigate.app                    INFO    : Capture process started for fr_frontdoor: 37
frigate    | frigate.app                    INFO    : Capture process started for fr_garden: 40
frigate    | frigate.edgetpu                INFO    : TPU found
frigate    | watchdog.fr_frontdoor          INFO    : No frames received from fr_frontdoor in 20 seconds. Exiting ffmpeg...
frigate    | watchdog.fr_frontdoor          INFO    : Waiting for ffmpeg to exit gracefully...
frigate    | frigate.video                  INFO    : fr_frontdoor: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | frigate.video                  INFO    : fr_frontdoor: ffmpeg process is not running. exiting capture thread...
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : frame=  156 fps=9.9 q=-1.0 q=-1.0 q=0.0 size=N/A time=00:00:18.20 bitrate=N/A speed=1.15x
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : frame=  161 fps=9.9 q=-1.0 q=-1.0 q=0.0 size=N/A time=00:00:18.71 bitrate=N/A speed=1.15x
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 5 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : frame=  166 fps=9.9 q=-1.0 q=-1.0 q=0.0 size=N/A time=00:00:19.22 bitrate=N/A speed=1.14x
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 3 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : frame=  171 fps=9.9 q=-1.0 q=-1.0 q=0.0 size=N/A time=00:00:19.72 bitrate=N/A speed=1.14x
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0xe9daf0] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Finishing stream 2:0 without any data written to it.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Output #2, rawvideo, to 'pipe:':
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :   Metadata:
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     title           : IP Camera Video
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     comment         : videoSub
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     encoder         : Lavf58.45.100
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Stream #2:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x960, q=2-31, 73728 kb/s, 5 fps, 5 tbn, 5 tbc
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Metadata:
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :       encoder         : Lavc58.91.100 rawvideo
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [flv @ 0xeb4e40] Failed to update header with correct duration.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [flv @ 0xeb4e40] Failed to update header with correct filesize.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : frame=  173 fps=9.8 q=-1.0 Lq=-1.0 q=0.0 size=N/A time=00:00:19.83 bitrate=N/A speed=1.13x
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : video:2387kB audio:135kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Exiting normally, received signal 15.
frigate    | watchdog.fr_frontdoor          INFO    : No frames received from fr_frontdoor in 20 seconds. Exiting ffmpeg...
frigate    | watchdog.fr_frontdoor          INFO    : Waiting for ffmpeg to exit gracefully...
frigate    | frigate.video                  INFO    : fr_frontdoor: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | frigate.video                  INFO    : fr_frontdoor: ffmpeg process is not running. exiting capture thread...
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 3 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : frame=  151 fps=9.5 q=-1.0 q=-1.0 q=0.0 size=N/A time=00:00:18.17 bitrate=N/A speed=1.14x
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : frame=  156 fps=9.5 q=-1.0 q=-1.0 q=0.0 size=N/A time=00:00:18.67 bitrate=N/A speed=1.14x
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : frame=  161 fps=9.5 q=-1.0 q=-1.0 q=0.0 size=N/A time=00:00:19.18 bitrate=N/A speed=1.13x
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : frame=  166 fps=9.5 q=-1.0 q=-1.0 q=0.0 size=N/A time=00:00:19.68 bitrate=N/A speed=1.13x
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] MMAL error 2 on control port
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Last message repeated 4 times
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [h264_mmal @ 0x16fee10] Did not get output frame from MMAL.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Error while decoding stream #0:0: Unknown error occurred
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Finishing stream 2:0 without any data written to it.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Output #2, rawvideo, to 'pipe:':
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :   Metadata:
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     title           : IP Camera Video
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     comment         : videoSub
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     encoder         : Lavf58.45.100
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Stream #2:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x960, q=2-31, 73728 kb/s, 5 fps, 5 tbn, 5 tbc
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :     Metadata:
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   :       encoder         : Lavc58.91.100 rawvideo
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [flv @ 0x16744a0] Failed to update header with correct duration.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : [flv @ 0x16744a0] Failed to update header with correct filesize.
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : frame=  167 fps=9.5 q=-1.0 Lq=-1.0 q=0.0 size=N/A time=00:00:19.68 bitrate=N/A speed=1.12x
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : video:2255kB audio:135kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frigate    | ffmpeg.fr_frontdoor.detect     ERROR   : Exiting normally, received signal 15.

@blakeblackshear
Copy link
Owner

This is what I would expect to see if there wasn't enough gpu memory available for mmal. Can you post your compose file as well?

@mchangsp
Copy link
Author

mchangsp commented Feb 6, 2021

This is my docker-compose.yml

version: '3'

services:
  frigate:
    container_name: frigate
    restart: unless-stopped
    privileged: true
    image: blakeblackshear/frigate:stable-armv7
    volumes:
      - /dev/bus/usb:/dev/bus/usb
      - /etc/localtime:/etc/localtime:ro
      - /home/pi/project/frigate/config:/config
      - /home/pi/project/frigate/clips:/media/frigate/clips      
      - /home/pi/project/frigate/recordings:/media/frigate/recordings
  
      - type: tmpfs # 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 100000000
    ports:
      - "5000:5000"
      - "1935:1935"
    environment:
      FRIGATE_RTSP_PASSWORD: "xxxxxxx"
    healthcheck:
      test: ["CMD", "wget" , "-q", "-O-", "http://localhost:5000"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 3m

@mchangsp
Copy link
Author

mchangsp commented Feb 6, 2021

This is what I would expect to see if there wasn't enough gpu memory available for mmal. Can you post your compose file as well?

in /boot/config.txt
I allocated more memory for mmal with the line:
gpu_mem=256

That seems to so the trick. The error messages disappeared.
Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants