Local realtime person detection for RTSP cameras

While I think this is great to make things easier and more straightforward for newer users, this also limits people who only want to “scan” certain parts of the camera image, like frigate always used to do.

Wouldn’t it be better to allow both? Default would be to scan the whole image, but there should be an option to also allow only parts of the camera image to be scanned for persons.
For example: a camera feed of your driveway, that includes a public sidewalk. You only want to detect people on your own driveway, rather than on the public sidewalk.

Absolutely agree. There is already an open issue for defining areas where you want to look for different types of objects and min/max size constraints. The regions implementation was designed to tell frigate where to look for objects, and they were required to be perfect squares. It was only by accident that you were able to limit object types by region. Now that I have a better way to know where to look for objects, I can allow you to define any area as a polygon and implement filters for each in a future release.

2 Likes

That would be fantastic!

Perhaps there’s a way to allow users to “draw” the area or make it easier to select which parts to scan for, rather than edited X and Y values and restarting the container every time you make a change. Would certainly be less cumbersome.

So image masks still work, right?

Where is the actual image stored or is it only accessible via the url?

http://URL:PORT/driveway/car/best.jpg

I’d like to place the image in my /config/www folder and along with the latest version, I’d like to get a timestamped version so I can view past captured images.

Masks still work. It is also used for motion masking now too. Might end up making them separate.

1 Like

It isn’t stored. You should be able to save that image with an automation in homeassistant.

Hello again,

I have tested my stream in multiple ways and I seem to be getting this error only with v0.5:

Camera_process started for backpatio: 36
Starting process for backpatio: 36
ffprobe -v panic -show_error -show_streams -of json "rtsp://x.x.x.x:7447/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
{'streams': [{'index': 0, 'codec_name': 'aac', 'codec_long_name': 'AAC (Advanced Audio Coding)', 'profile': 'LC', 'codec_type': 'audio', 'codec_time_base': '1/11025', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'sample_fmt': 'fltp', 'sample_rate': '11025', 'channels': 1, 'channel_layout': 'mono', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/11025', 'start_pts': 507, 'start_time': '0.045986', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}, {'index': 1, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'Main', 'codec_type': 'video', 'codec_time_base': '1/30', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 1024, 'height': 576, 'coded_width': 1024, 'coded_height': 576, 'has_b_frames': 0, 'sample_aspect_ratio': '189:190', 'display_aspect_ratio': '168:95', 'pix_fmt': 'yuvj420p', 'level': 31, 'color_range': 'pc', 'color_space': 'bt709', 'color_transfer': 'bt709', 'color_primaries': 'bt709', 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'false', 'nal_length_size': '0', 'r_frame_rate': '15/1', 'avg_frame_rate': '15/1', 'time_base': '1/90000', 'start_pts': 66000, 'start_time': '0.733333', 'bits_per_raw_sample': '8', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}]}
ffmpeg -hide_banner -loglevel info -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -vsync drop -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://x.x.x.x:7447/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -f rawvideo -pix_fmt rgb24 pipe:
[rtsp @ 0x5605ee9a5280] Could not find codec parameters for stream 1 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, rtsp, from 'rtsp://x.x.x.x:7447/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx':
  Metadata:
    title           : 802AA8CC80A6_1
  Duration: N/A, bitrate: N/A
    Stream #0:0: Audio: aac, 11025 Hz, mono, fltp
    Stream #0:1: Video: h264, none, 90k tbr, 90k tbn, 180k tbc
Output #0, rawvideo, to 'pipe:':
Output file #0 does not contain any stream
Process for backpatio is not alive. Starting again...
Camera_process started for backpatio: 40
Starting process for backpatio: 40

Any help is appreciated.

Thanks

Edit: I am using the TPU. Not sure how to check if the process is actually using it.

I’m not sure why that error is happening in 0.5.0 yet.

Pushed up a new build with a few fixes:

  • Fix watchdog calculation for restarting process to prevent infinite loop
  • Fix issue preventing objects from expiring when another object type was in the frame
  • Add back ability to specify frame size in the config instead of trying to detect it

Docker image is available with docker pull blakeblackshear/frigate:0.5.0-rc2

1 Like

Hi,

I have trouble setting up my camera’s with the new version. I cannot get both camera’s to work

cameras:
  inrit:
    ffmpeg:
      input: rtsp://admin:<password>@192.168.1.35/1/h264minor
    take_frame: 1
    fps: 5
  achterhuis:
    ffmpeg:
      input: rtsp://admin:<password>@192.168.1.40:554/cam/realmonitor?channel=1&subtype=1
    take_frame: 1
    fps: 5
    snapshots:
      show_timestamp: True

When i remove one of the camera’s it works. Any suggestions?

Any error messages? What is your shm-size?

Thank you for the new release @blakeblackshear !

I just recreated my docker container with the new rc2 image and all of a sudden it can’t find cv2.


ModuleNotFoundError: No module named 'cv2'

Traceback (most recent call last):

  File "detect_objects.py", line 1, in <module>

    import cv2

Can you paste your docker run command or compose config?


"Config": {
        "AttachStderr": false,
        "AttachStdin": false,
        "AttachStdout": false,
        "Cmd": [
            "python3",
            "-u",
            "detect_objects.py"
        ],
        "Domainname": "xxxxx.xxxxx",
        "Entrypoint": null,
        "Env": [
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "DEBIAN_FRONTEND=noninteractive",
            "shm-size=1g"
        ],
        "Hostname": "frigate",
        "Image": "blakeblackshear/frigate:0.5.0-rc2",
        "Labels": {
            "maintainer": "[email protected]"
        },
        "OnBuild": null,
        "OpenStdin": false,
        "StdinOnce": false,
        "Tty": false,
        "User": "",
        "Volumes": {
            "/config": {}
        },
        "WorkingDir": "/opt/frigate"
    }

All I changed when moving from 0.4 to 0.5 rc2 was adding the shm-size env variable and the fps value in config file.

It was 512m and changed it to 1g. Without result.
Log:

  Metadata:,
    title           : 1/h264minor,
    comment         : 1/h264minor,
    encoder         : Lavf57.83.100,
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 640x480, q=2-31, 184320 kb/s, 25 fps, 25 tbn, 25 tbc,
    Metadata:,
      encoder         : Lavc57.107.100 rawvideo,
[rawvideo @ 0x55756a377760] Encoder did not produce proper pts, making some up.,
{'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'Main', 'codec_type': 'video', 'codec_time_base': '1/10', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 640, 'height': 480, 'coded_width': 640, 'coded_height': 480, 'has_b_frames': 0, 'sample_aspect_ratio': '0:1', 'display_aspect_ratio': '0:1', 'pix_fmt': 'yuvj420p', 'level': 30, 'color_range': 'pc', 'color_space': 'bt709', 'color_transfer': 'bt709', 'color_primaries': 'bt709', 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'false', 'nal_length_size': '0', 'r_frame_rate': '5/1', 'avg_frame_rate': '5/1', 'time_base': '1/90000', 'start_pts': 107182, 'start_time': '1.190911', 'bits_per_raw_sample': '8', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}]},
ffmpeg -hide_banner -loglevel info -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -vsync drop -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://admin:<password>@192.168.1.35/1/h264minor -f rawvideo -pix_fmt rgb24 pipe:,
frame=    4 fps=0.0 q=-0.0 size=    3600kB time=00:00:00.16 bitrate=184320.0kbits/s speed=0.307x    
frame=   16 fps= 16 q=-0.0 size=   14400kB time=00:00:00.64 bitrate=184320.0kbits/s speed=0.626x    
frame=   30 fps= 20 q=-0.0 size=   27000kB time=00:00:01.20 bitrate=184320.0kbits/s speed=0.782x    
frame=   43 fps= 21 q=-0.0 size=   38700kB time=00:00:01.72 bitrate=184320.0kbits/s speed=0.843x    
frame=   55 fps= 21 q=-0.0 size=   49500kB time=00:00:02.20 bitrate=184320.0kbits/s speed=0.857x    
frame=   69 fps= 22 q=-0.0 size=   62100kB time=00:00:02.76 bitrate=184320.0kbits/s speed=0.896x    
Input #0, rtsp, from 'rtsp://admin:<password>@192.168.1.35/1/h264minor':,
  Metadata:,
    title           : 1/h264minor,
    comment         : 1/h264minor,
  Duration: N/A, start: 1582474409.094633, bitrate: N/A,
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 640x480, 5 fps, 5 tbr, 90k tbn, 10 tbc,
Stream mapping:,
  Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native)),
Press [q] to stop, [?] for help,
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
[swscaler @ 0x55dacfd54a60] deprecated pixel format used, make sure you did set range correctly,
Output #0, rawvideo, to 'pipe:':,
  Metadata:,
    title           : 1/h264minor,
    comment         : 1/h264minor,
    encoder         : Lavf57.83.100,
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 640x480, q=2-31, 36864 kb/s, 5 fps, 5 tbn, 5 tbc,
    Metadata:,
      encoder         : Lavc57.107.100 rawvideo,
[rawvideo @ 0x55dacfd23340] Encoder did not produce proper pts, making some up.,
On connect called,
Starting detection process: 19,
Camera_process started for inrit: 20,
Starting process for inrit: 20Camera_process started for achterhuis: 21,
,
ffprobe -v panic -show_error -show_streams -of json "rtsp://admin:<password>@192.168.1.35/1/h264minor",
Starting process for achterhuis: 21,
ffprobe -v panic -show_error -show_streams -of json "rtsp://admin:<password>@192.168.1.30/1/h264minor",
 * Serving Flask app "detect_objects" (lazy loading),
 * Environment: production,
   WARNING: This is a development server. Do not use it in a production deployment.,
   Use a production WSGI server instead.,
 * Debug mode: off,
{'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'Main', 'codec_type': 'video', 'codec_time_base': '1/50', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 640, 'height': 480, 'coded_width': 640, 'coded_height': 480, 'has_b_frames': 0, 'sample_aspect_ratio': '0:1', 'display_aspect_ratio': '0:1', 'pix_fmt': 'yuv420p', 'level': 30, 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'false', 'nal_length_size': '0', 'r_frame_rate': '25/1', 'avg_frame_rate': '25/1', 'time_base': '1/90000', 'start_pts': 18141, 'start_time': '0.201567', 'bits_per_raw_sample': '8', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}, {'index': 1, 'codec_name': 'pcm_mulaw', 'codec_long_name': 'PCM mu-law / G.711 mu-law', 'codec_type': 'audio', 'codec_time_base': '1/8000', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'sample_fmt': 's16', 'sample_rate': '8000', 'channels': 1, 'bits_per_sample': 8, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/8000', 'start_pts': 62, 'start_time': '0.007750', 'bit_rate': '64000', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}]},
ffmpeg -hide_banner -loglevel info -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -vsync drop -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://admin:<password>@192.168.1.30/1/h264minor -f rawvideo -pix_fmt rgb24 pipe:,
Guessed Channel Layout for Input Stream #0.1 : mono,
Input #0, rtsp, from 'rtsp://admin:<password>@192.168.1.30/1/h264minor':,
  Metadata:,
    title           : 1/h264minor,
    comment         : 1/h264minor,
  Duration: N/A, start: 1582474419.683500, bitrate: N/A,
    Stream #0:0: Video: h264 (Main), yuv420p(progressive), 640x480, 25 fps, 25 tbr, 90k tbn, 50 tbc,
    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s,
Stream mapping:,
  Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native)),
Press [q] to stop, [?] for help,
Output #0, rawvideo, to 'pipe:':,
  Metadata:,
    title           : 1/h264minor,
    comment         : 1/h264minor,
    encoder         : Lavf57.83.100,
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 640x480, q=2-31, 184320 kb/s, 25 fps, 25 tbn, 25 tbc,
    Metadata:,
      encoder         : Lavc57.107.100 rawvideo,
[rawvideo @ 0x555c40c8a520] Encoder did not produce proper pts, making some up.,
{'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'Main', 'codec_type': 'video', 'codec_time_base': '1/10', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 640, 'height': 480, 'coded_width': 640, 'coded_height': 480, 'has_b_frames': 0, 'sample_aspect_ratio': '0:1', 'display_aspect_ratio': '0:1', 'pix_fmt': 'yuvj420p', 'level': 30, 'color_range': 'pc', 'color_space': 'bt709', 'color_transfer': 'bt709', 'color_primaries': 'bt709', 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'false', 'nal_length_size': '0', 'r_frame_rate': '5/1', 'avg_frame_rate': '5/1', 'time_base': '1/90000', 'start_pts': 106979, 'start_time': '1.188656', 'bits_per_raw_sample': '8', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}]},
ffmpeg -hide_banner -loglevel info -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -vsync drop -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://admin:<password>@192.168.1.35/1/h264minor -f rawvideo -pix_fmt rgb24 pipe:,
frame=    5 fps=0.0 q=-0.0 size=    4500kB time=00:00:00.20 bitrate=184320.0kbits/s speed=0.391x    
frame=   18 fps= 17 q=-0.0 size=   16200kB time=00:00:00.72 bitrate=184320.0kbits/s speed=0.697x    
frame=   31 fps= 20 q=-0.0 size=   27900kB time=00:00:01.24 bitrate=184320.0kbits/s speed=0.802x    
frame=   44 fps= 21 q=-0.0 size=   39600kB time=00:00:01.76 bitrate=184320.0kbits/s speed=0.85x    
frame=   57 fps= 22 q=-0.0 size=   51300kB time=00:00:02.28 bitrate=184320.0kbits/s speed=0.885x    
frame=   69 fps= 22 q=-0.0 size=   62100kB time=00:00:02.76 bitrate=184320.0kbits/s speed=0.892x    
Input #0, rtsp, from 'rtsp://admin:<password>@192.168.1.35/1/h264minor':,
  Metadata:,
    title           : 1/h264minor,
    comment         : 1/h264minor,
  Duration: N/A, start: 1582474423.914378, bitrate: N/A,
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 640x480, 5 fps, 5 tbr, 90k tbn, 10 tbc,
Stream mapping:,
  Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native)),
Press [q] to stop, [?] for help,
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
[swscaler @ 0x56283f20bce0] deprecated pixel format used, make sure you did set range correctly,
Output #0, rawvideo, to 'pipe:':,
  Metadata:,
    title           : 1/h264minor,
    comment         : 1/h264minor,
    encoder         : Lavf57.83.100,
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 640x480, q=2-31, 36864 kb/s, 5 fps, 5 tbn, 5 tbc,
    Metadata:,
      encoder         : Lavc57.107.100 rawvideo,
[rawvideo @ 0x56283f063e20] Encoder did not produce proper pts, making some up.,
frame=    1 fps=0.5 q=-0.0 size=     900kB time=00:00:00.20 bitrate=36864.0kbits/s speed=0.11x    
Error on request:,
Traceback (most recent call last):,
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 323, in run_wsgi,
    execute(self.server.app),
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 314, in execute,
    for data in application_iter:,
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 506, in __next__,
    return self._next(),
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wrappers/base_response.py", line 45, in _iter_encoded,
    for item in iterable:,
  File "/opt/frigate/detect_objects.py", line 225, in imagestream,
    frame = object_processor.get_current_frame(camera_name),
  File "/opt/frigate/frigate/object_processing.py", line 47, in get_current_frame,
    return self.camera_data[camera]['current_frame'],
KeyError: 'current_frame',

Your Cmd needs to be updated to python3.7 instead of python3. I would recommend using the default from the image rather than overriding it.

Thank you. That got the container started and it generated processes for each camera. Then starts throwing this python trace back.


Traceback (most recent call last):

  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap

    self.run()

  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap

    self.run()

  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run

    self._target(*self._args, **self._kwargs)

  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run

    self._target(*self._args, **self._kwargs)

  File "/opt/frigate/frigate/video.py", line 353, in track_camera

    plasma_client.put(frame, plasma.ObjectID(object_id))

  File "/opt/frigate/frigate/video.py", line 353, in track_camera

    plasma_client.put(frame, plasma.ObjectID(object_id))

  File "pyarrow/_plasma.pyx", line 536, in pyarrow._plasma.PlasmaClient.put

  File "pyarrow/_plasma.pyx", line 536, in pyarrow._plasma.PlasmaClient.put

  File "pyarrow/_plasma.pyx", line 364, in pyarrow._plasma.PlasmaClient.create

  File "pyarrow/_plasma.pyx", line 364, in pyarrow._plasma.PlasmaClient.create

  File "pyarrow/_plasma.pyx", line 291, in pyarrow._plasma.plasma_check_status

  File "pyarrow/_plasma.pyx", line 291, in pyarrow._plasma.plasma_check_status

  File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status

  File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status

OSError: Encountered unexpected EOF

OSError: Connection reset by peer

Then it tries to use it 20 times to no avail.


OSError: Could not connect to socket /tmp/plasma

Hello,

Tried the new branch and here is some info:

On connect called
Creating a new ffmpeg process...
ffmpeg -hide_banner -loglevel info -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -vsync drop -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://xx.xx.xx.xx:7447/xxxxxxxxxxxxxxxxxxxxx -vf mpdecimate -f rawvideo -pix_fmt rgb24 pipe:
Creating a new capture thread...
Starting a new capture thread...
Capture process for backpatio: 38
 * Serving Flask app "detect_objects" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
Input #0, rtsp, from 'rtsp://xx.xx.xx.xx:7447/xxxxxxxxxxxxxxxxxxxxx':
  Metadata:
    title           : 802AA8CC80A6_1
  Duration: N/A, start: 1582475357.292426, bitrate: N/A
    Stream #0:0: Audio: aac (LC), 11025 Hz, mono, fltp
    Stream #0:1: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1024x576 [SAR 189:190 DAR 168:95], 15 fps, 15 tbr, 90k tbn, 30 tbc
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[swscaler @ 0x55c15e72ccc0] deprecated pixel format used, make sure you did set range correctly    
Output #0, rawvideo, to 'pipe:':
  Metadata:
    title           : 802AA8CC80A6_1
    encoder         : Lavf57.83.100
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1024x576 [SAR 189:190 DAR 168:95], q=2-31, 212336 kb/s, 15 fps, 15 tbn, 15 tbc
    Metadata:
      encoder         : Lavc57.107.100 rawvideo
[rawvideo @ 0x55c15e70d2c0] Encoder did not produce proper pts, making some up.

It manages to get the video stream but it is corrupted i.e. horizontal lines scrambled. Let me know if you need more info and thank you for working on this project - appreciate all your hard work.

Edit: here is how the output looks like
REMOVED

You are passing shm-size incorrectly. It does not go under Environment. It should be a top level setting. Is that a portainer config?