-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
--camera-{v,h}flip
throw an error now when they used to work with the same camera
#51
Comments
Hmm. I tried on my arm64 build with the same |
Oh. It fails on armhf build. |
Any way to get this working with an old build? |
@rlekey It is not build specific. It is system-specific, or libcamera specific. Hard to say yet. I'm thinking on completely moving away from this and rather inject that into |
Am I understanding this correctly in that that would then have the benefit of also working with any camera, regardless of hardware? |
Yes, that is the idea. It would require the client library to properly support this. Which is true for most part. It would also work with USB cams, currently this only works with libcamera backend. |
Unfortunately I have the same problem. I use your amazing camera streamer in Yocto kirkstone with the latest version of libcamera compiled from the raspberrypi repository. I'm using an ov5647 camera for which this setup has worked so far. |
@mat100 @foosel @rlekey I believe this is fixed. Please validate running Here is how to run it: #53 (comment) Of course, this only works with |
@ayufan Will look into this ASAP, might be a few days though. In any case, thank you so much for your work! |
Looks like this is working on the develop branch, at least for a direct camera run using tools/libcamera_camera.sh --camera-vflip=1 It still does not seem to work with RESCALLER:STREAM options set in a url ("192.xxx.xxx.xxx/option?verticalflip=1") I do get the confirmation that RESCALLER:STREAM: The 'verticalflip' was set to '1'. But it doesn't seem to effect the stream or video. This no longer effects my use, as I can flip the pixels down the road, but figured you'd want to know about the bug. Thanks! |
It still does not seem to work with RESCALLER:STREAM options set in a url
("192.xxx.xxx.xxx/option?verticalflip=1")
It will not work to change it dynamically.
…On Sat, Apr 22, 2023 at 1:12 AM rlekey ***@***.***> wrote:
@ayufan <https://github.com/ayufan>
Looks like this is working on the develop branch, at least for a direct
camera run using tools/libcamera_camera.sh --camera-vflip=1
It still does not seem to work with RESCALLER:STREAM options set in a url
("192.xxx.xxx.xxx/option?verticalflip=1")
I do get the confirmation that RESCALLER:STREAM: The 'verticalflip' was
set to '1'. But it doesn't seem to effect the stream or video.
This no longer effects my use, as I can flip the pixels down the road, but
figured you'd want to know about the bug. Thanks!
—
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASOSQM32FRAFYYEOOVD7DTXCMH5NANCNFSM6AAAAAAWBLMR74>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sorry for the delay in getting back to you. I can now confirm that yes, it is indeed fixed in a build of
Great work! 🚀 Shall I close this, or do you want to keep it open until you've merged |
Lets wait till I merge this. It should happen over weekend. |
Roger that. Are you still also thinking about switching the implementation over to doing this in software instead as mentioned in #51 (comment), for the sake of USB camera owners? Or is that now off the table again? No pressure, just curious! |
I tried, exif worked, but was unable to achieve the same for h264 using display sei. So, no, this is no-go until I figure out the display sei. I will try to re-implement this via rescaller, but it will come with performance penalty for USB cams since JPEG will have to be decoded, rescalled and encoded instead of just pass through. Additionally, Olof from Bondtech (when discussing with @meteyou) mentioned that the easier trick (and more reliable) might be just doing cropping and rotation via css on frontend... Ref.: https://github.com/ayufan/camera-streamer/commits/exif-support |
Yeah, rotating via frontend is something I already offer in OctoPrint as well since hour 1, but when I announced a potential (and now pretty much decided on) switch to camera-streamer as default camera stack on future versions of the image, I immediately got the feedback that rotation/flipping options in the backend are very much needed for certain workflows (my guess is alternative frontends without rotation built in). Hence my curiousity. Personally, I never have had to use rotation or flipping myself, I simply mount the camera in the right orientation to begin with, but who am I to judge how people are forced to set up their stuff 😅 Thanks for clarifying! 😊 |
I guess, sometimes it is hard. Overall 90o rotation is hard on memory bandwidth, but the horizontal/vertical flip is OK. Unsure, maybe the solution is a mix: use EXIF for JPEG (snapshot, to provide zero-copy solution), but use rescaller method for H264 since we already have to decode JPEG there so the additional rescaling step can be basically free, unsure yet. So, don't expect 90o rotation, but flip might be plausible to support everywhere. The |
@foosel I merged the The I will close it, but if you could re-test it I would be grateful. |
@ayufan Just built a package from |
Just in case anyone (or me in the future) needs to know how to flip or rotate the camera image horizontally, vertically or both on the new v3 camera module... add this ( --camera-hflip=1 --camera-vflip=1 ) to the end of the default file below. Notice: this is not --camera-options, it is camera-hflip, etc but it is on the same line. /boot/camera-streamer/libcamera.conf
|
Hi, such file does not exist by default, should it be created? Where is this file documented? |
Hey there, as already mentioned in this comment on the OctoPrint project I'm seeing a regression with the current code with regards to flipping.
I just built a new binary of
v0.1-16-gcdb62ef (cdb62ef)
(currentmaster
) against the current RPi libcamera0 package, 0.0.4 (debian packaged version: 0~git20230302+923f5d70-1): https://github.com/OctoPrint/camera-streamer-archive/releases/tag/0.1-16-gcdb62ef-1This runs great on my test image with RPiCam v3 and USB Camera, however I can no longer use
--camera-{v,h}flip
with the RPiCam like I could before (the USB camera says it doesn't support that in the first place). If I try, camera configuration fails:I am absolutely sure this used to work with an earlier version, because back then I tested this and documented it on the OctoPrint community forums on February 22nd. The first user report of this no longer working reached me on March 6th with a (develop branch) build from February 28th.
I've created an strace for you just in case this might help: flip-strace.txt. I'm happy to test anything or provide any further info you need.
From my understanding, based on the command output, this is failing inside libcamera, so either the interface changed, or there's a regression upstream?
The text was updated successfully, but these errors were encountered: