dermotduffy / frigate-hass-card

A Lovelace card for Frigate in Home Assistant
MIT License
551 stars 59 forks source link

Add support for arbitrary video transforms (e.g. rotation) #1307

Open joaopedros2 opened 12 months ago

joaopedros2 commented 12 months ago

It's not really a problem, but I need help to make the camera image switch from landscape to portrait in fullscreen.

I know of its existence, but I don't know how to apply it.

transform: rotate(90deg);

The idea is to have the camera image fill the entire screen without enabling screen rotation.

Is there a way to do this using the "custom:frigate-card-menu-icon"?

dermotduffy commented 12 months ago

Just to confirm, you want to rotate the video feed? That is currently not supported, although could be implemented.

There is something somewhat related available though. This will take a landscape video feed, and turn it into a portrait one, without rotating it. Some of the video will be cut off, i.e. it kind of "zooms into it".

type: custom:frigate-card
cameras:
  - camera_entity: camera.office
live:
  layout:
    fit: cover
dimensions:
  aspect_ratio_mode: static
  aspect_ratio: '9:16'
joaopedros2 commented 12 months ago

My Home Assistant companion app is configured to always work in portrait mode, but when I go fullscreen on the camera videos, it's not practical because it doesn't cover the entire screen.

What I want is for the card to stay in portrait, and when I switch to fullscreen, it should cover the entire screen. That's why I was trying to rotate the camera, but it's not working as desired.

dermotduffy commented 12 months ago

My Home Assistant companion app is configured to always work in portrait mode, but when I go fullscreen on the camera videos, it's not practical because it doesn't cover the entire screen.

You have specifically configured your Home Assistant app to always be in portrait mode, but want the video from the Frigate card to somehow be in landscape mode? Why lock it to portrait mode if you want to have it (sometimes) in landscape mode? Sorry if I not understanding.

joaopedros2 commented 12 months ago

The reason I keep it locked in portrait mode is related to the way my dashboard is organized. I created it exclusively for smartphones, and when it's in landscape mode, the cards don't work as desired, so I limited it to portrait mode. I have an issue with the camera videos, and that's why it would be very helpful to be able to rotate the video in fullscreen mode.

dermotduffy commented 12 months ago

The reason I keep it locked in portrait mode is related to the way my dashboard is organized. I created it exclusively for smartphones, and when it's in landscape mode, the cards don't work as desired, so I limited it to portrait mode. I have an issue with the camera videos, and that's why it would be very helpful to be able to rotate the video in fullscreen mode.

OK, that's pretty niche! Lets call this a feature request for per-camera transforms (e.g. rotation). I prioritize based on up votes (thumbs-up).