WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

Feature: add rotate camera image

Open Trevsweb opened this issue 2 years ago • 6 comments

please can you add a function to rotate the image of the camera similar to

style: | ha-card { transform: rotate(90deg); }

Trevsweb avatar May 29 '22 11:05 Trevsweb

Yes, please. That would be awesome.

quack3d avatar Jun 19 '22 21:06 quack3d

Is your code works? Do you check it?

AlexxIT avatar Jul 12 '22 17:07 AlexxIT

His code kinda works with the lovelace-card-mod: https://github.com/thomasloven/lovelace-card-mod

But the user experience is horrible. What we want is a rotation of the video feed itself, not the entire card. For instance, if I use the Tapo: Cameras Control integration and set 'Extra arguments for ffpmeg' to '-vf "transpose=1"' and untick 'Use Stream from Home Assistant', the picture-entity card will show the video feed as rotated. Unfortunately the same thing does not happen in your webrtc-camera card.

quack3d avatar Aug 18 '22 11:08 quack3d

ffmpeg not good idea because it use unnecessary transcoding with high CPU activity

AlexxIT avatar Aug 18 '22 18:08 AlexxIT

Yeah, I don't want to use ffmpeg. Can you ad an option for rotation in webrtc instead? I have cameras on the beds of my children so it's much more convenient if the video was portrait mode instead of landscape.

quack3d avatar Aug 18 '22 18:08 quack3d

I'm not so good with JS. It should be some browser feature.

AlexxIT avatar Aug 18 '22 21:08 AlexxIT

Any option to rotate will be awesome

sresam89 avatar Dec 31 '22 04:12 sresam89

Should be fixed in v3

AlexxIT avatar Jan 20 '23 18:01 AlexxIT

What's the syntax to do this in v3? I tried style: 'video {rotate: -90deg;}' and it rotates, but the image is then cropped at top and bottom. There's also a large black bar on left and right side.

quack3d avatar Jan 21 '23 10:01 quack3d

I'll try to write example

AlexxIT avatar Jan 21 '23 12:01 AlexxIT