-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
encoder_encode(): ioctl(VIDIOC_QBUF) failed #2579
Comments
I'm having the same issue but wasn't able to nail down a root cause:
The stream works flawlessly for a couple of hours but then it suddenly starts to endlessly report the mentioned error:
I cannot tell the time difference between the last timestamped log line and the In between the error lines there was some attempt to resume something (the camera?) and the connected clients were endlessly switching between a still image and a short video sequence which was likely the recently buffered frames in some kind of ringbuffer. Sorry for the vague description. I'm still not able to reliably reproduce the issue. Turning down the bitrate as suggested and swinging the camera around didn't trigger it for me. Before coming across this issue I assumed the symlink-hack was the causing this instability. I have a second setup using a freshly compiled version if mediamtx against libcamera 0.2.0 which I will try next. But without a reliable way to reproduce this issue it will be hard to tell whether things improved. I report back as soon as I know more. @mwolfeu Did you ever find a solution other than restarting the service? |
I am also having this issue.
I had been running motioneye on this hardware setup for years without issue, but wanted to incorporate this camera into Frigate with an RTSP stream. I kept getting this error so I replaced the cable but that didn't fix it. Mine seems to be completely random, as sometimes it fails immediately, even before clients connect to the stream, and other times not. The longest I have had it run before dying was around 10 minutes. |
According to the link above, problem lies within the encoder and currently there is no estimation for the fix. @aler9 any chances to get libav support for rpi camera streaming anytime soon? |
@the0 libav support for rpi camera streaming has already been implemented, it's enough to set paths:
rpi:
source: rpiCamera
# Codec. Available values: auto, hardwareH264, softwareH264
rpiCameraCodec: softwareH264 |
@aler9 I'm using 1.9.1 binary with this config section appended to the default config:
And getting this:
Any ideas? Standalone rpicam-vid works fine with the same settings. |
@the0 the problem you have is related to a limitation that happens when using that specific width/height combination, and is fixed by bluenviron/mediamtx-rpicamera#18. I have to close this issue since there are too many, unrelated, problems reported here. Error |
Which version are you using?
v1.2.0
Which operating system are you using?
Describe the issue
Ioctl errors occur at low rpiCameraBitrates (100000) with rapid video changes.
Currently my camera is immobilized to prevent the cable jiggling. The 3mo old RPi 4 is on a solid platform without vibration. I have tested 5 different cameras (4 were just unboxed yesterday). All exhibit the same issue.
rpiCameraBitrate: 700000 seems stable.
I wrote a script to restart mediamtx whenever the ioctl problem prints to the logs. The camera has always (thus far) come back without issue.
Describe how to replicate the issue
Did you attach the server logs?
no
Did you attach a network dump?
no
The text was updated successfully, but these errors were encountered: