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

MediaMTX API / streams crash on RPi 4 when PATCHing configuration with 2 cameras #3943

Open
marksutheran opened this issue Nov 7, 2024 · 0 comments

Comments

@marksutheran
Copy link

marksutheran commented Nov 7, 2024

Which version are you using?

v1.9.3

Which operating system are you using?

Linux arm64 Standalone binary

Describe how to replicate the issue

Problem Statement

When using dual cameras on RPi 4 attempting to adjust the libcam parameters via the API causes the mediamtx server API to crash along with the adjusted stream

n.b. this issue pre-dates release v1.9.3 but tests carried out on latest version to confirm the issue still exists.

Steps to recreate

Base scenario:

  1. Start the mediamtx process with single camera configuration (mediamtx.single.yml)
  2. Open a live stream to the camera (e.g. SRT using VLC - srt://{DEVICE ADDRESS}:8890/?streamid=read:cam0&latency=250)
  3. Send a PATCH command to the API
  • http://{DEVICE ADDRESS}:9997/v3/config/paths/patch/cam0
  • PATCH: {"rpiCameraVFlip": true, "rpiCameraHFlip":false}
  1. RESULT: Camera orientation flips as expected, no issues

Failure scenario:

  1. Start the mediamtx process with double camera configuration (mediamtx.double.yml)
  2. Open a live stream to the camera (e.g. SRT using VLC - srt://{DEVICE ADDRESS}:8890/?streamid=read:cam0&latency=250)
  3. Send a PATCH command to the API
  • http://{DEVICE ADDRESS}:9997/v3/config/paths/patch/cam0
  • PATCH: {"rpiCameraVFlip": true, "rpiCameraHFlip":false}
  1. RESULT:
  • API hangs, no further calls processed
  • PATCHed Camera stream fails, associated mtxrpicam process dies
  • Other camera stream continues as normal
  • mediamtx process needs to be restarted

Configuration files

'.txt' added to enable upload
mediamtx.single.yml.txt
mediamtx.double.yml.txt

Kernel

Linux raspberrypi 6.6.36-v8+ #2 SMP PREEMPT Tue Jul 9 13:02:03 +08 2024 aarch64 GNU/Linux

Logs

Log file attached with DEBUG level. Search for 'PATCH' string in the file

Workaround

Use multiple configuration files, symlink and restart mediamtx as necessary

Server logs

mediamtx.double.log

Network dump

No response

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

1 participant