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

Tearing image with mjpeg #325

Open
SpencerBurakowski opened this issue Mar 20, 2024 · 0 comments
Open

Tearing image with mjpeg #325

SpencerBurakowski opened this issue Mar 20, 2024 · 0 comments

Comments

@SpencerBurakowski
Copy link

SpencerBurakowski commented Mar 20, 2024

I'm testing an Econ Systems usb camera (Model See3CAM_CU81) and I'm seeing image tearing consistently about five seconds out of every minute. I'm working with the develop branch (ef97b79 (HEAD -> develop, origin/develop) Merge pull request #272 from jaimesx/timestamp-fix).

About my system:
Ubuntu 20.04.6 LTS
ffmpeg version n5.1.4-6-g9bf90b1260 (built from source, attempt to update the driver to solve this issue)

I have the camera set to 1920x1080 in mjpeg format, in this mode the camera streams to the v4l2 driver at 60fps. I'm trying to publish at 10fps to save on cpu usage.

Attached is an image from what the screen tearing looks like.
image_tear
The usb_cam node will show errors like this:
[mjpeg @ 0x5617ff2b7600] overread 8 [mjpeg @ 0x5617ff2b7600] error dc [mjpeg @ 0x5617ff2b7600] error y=134 x=113 [mjpeg @ 0x5617ff2b7600] error count: 268435459 [mjpeg @ 0x5617ff2b7600] error y=15 x=61 [mjpeg @ 0x5617ff2b7600] overread 8 [mjpeg @ 0x5617ff2b7600] error count: 268435458 [mjpeg @ 0x5617ff2b7600] error y=10 x=6 [mjpeg @ 0x5617ff2b7600] overread 8 [mjpeg @ 0x5617ff2b7600] error dc [mjpeg @ 0x5617ff2b7600] error y=134 x=117 [mjpeg @ 0x5617ff2b7600] error dc [mjpeg @ 0x5617ff2b7600] error y=134 x=102 [mjpeg @ 0x5617ff2b7600] error dc [mjpeg @ 0x5617ff2b7600] error y=15 x=16

Any ideas on how to fix the tearing would be greatly appreciated.

Additional info:
I don't see image tearing when using pixel_format uyvy -- but for my application I need to use mjpeg
The image_tearing is less frequent when the ros node publishes closer to the 60fps rate from the camera, but never goes away entirely (one over and hour, opposed to once a minute)

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