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

[Request] Rotate USB cam #895

Closed
oskarsjogren opened this issue May 15, 2015 · 4 comments
Closed

[Request] Rotate USB cam #895

oskarsjogren opened this issue May 15, 2015 · 4 comments
Labels
request Feature request

Comments

@oskarsjogren
Copy link

Hi.

If I'm not mistaken, the MPJG plugin cannot rotate the webcam stream for USB cameras, or I'm not smart enough to find how to do it. Is this something that can be added to the web interface, in order to get nice time lapses even if the camera is mounted in the wrong way?

Thanks in advance
Best regards

@oskarsjogren oskarsjogren changed the title Rotate USB cam [Request] Rotate USB cam May 15, 2015
@GitIssueBot GitIssueBot added the request Feature request label May 15, 2015
@markwal
Copy link
Member

markwal commented May 23, 2015

avconv (used in the octopi image) is capable of this via the transform filter.

Something like:
if settings().getBoolean(["webcam", "rotate90"]):
filters.append('transpose=1')
on or around timelapse.py:284

That would do rotate the image in the timelapse. On the control tab its a bit trickier because of css height, but I put an example rotate90 in the plugin https://github.com/markwal/OctoPrint-SnapStream, but it can only rotate the control webcam image. Without replacing the whole timelapse module there isn't an easy way to add that filter to the ffmpeg command line (that I could see).

@markwal
Copy link
Member

markwal commented May 23, 2015

And of course, rotate90 combined with fliph and flipv gives you 180 and 270 too.

markwal added a commit to markwal/OctoPrint that referenced this issue May 25, 2015
Added a setting to allow -90 degree rotation. Combined with fliph and
flipv, I think this means every one of the 8 major orientations is covered
(2^3). 0, 90, 180, 270 times 2 (mirror image in each rotation). I chose
-90 instead of 90 because that keeps the upper left corner pinned to the
same spot.
The extra ms-transforms aren't for this issue exactly but allowed me to
test my changes in ie. I've tested Chrome, Firefox and IE11. I don't
have Safari handy, but if it breaks it *should* be only when this is
enabled.
@foosel
Copy link
Member

foosel commented May 29, 2015

Implemented in devel by @markwal (#906)

@foosel foosel closed this as completed May 29, 2015
@GitIssueBot
Copy link

This issue has been mentioned on OctoPrint Community Forum. There might be relevant details there:

https://community.octoprint.org/t/webcam-stream-flipped/1131/10

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
request Feature request
Projects
None yet
Development

No branches or pull requests

4 participants