-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Support arbitrary aspect-ratio cameras #71
Comments
[Quick response] Some parts of the card (e.g. the gallery) have no fixed size, so to keep the card consistently sized, it's all currently held to 16/9. Almost certainly this is your issue. What resolution & aspect ratio is your video? Can you "scroll down" when it's cut off? (Not suggesting that's acceptable, just making sure I understand the behavior) |
Thanks for the reply! That makes sense; I was not sure whether to call this a bug or a feature request. :)
The one displayed in the Frigate card is a lower-resolution stream right now: 480 x 704 (width x height). For clips the full high-resolution stream is being used, 2160 x 3840, which is a 9/16 ratio.
Nope - there's no scrolling. |
Love the work here. I have a vertical camera (doorbell) with similar issue however I am able to scroll the image within the frame. For my other cameras, the aspect ratio must be slightly different than 16x9 as those images require just a bit of scrolling up and down within the frame. This makes it a bit challenging to scroll through my list of cameras on my phone with a simple swipe. |
Thanks @summitbri -- I would have expected scrolling like you describe. Would you mind checking the resolution / aspect-ratio of the camera in question? I'd like to come up with a solution that can work more generally that 16 / 9 (so even your 'little scrolling' would ideally be eliminated) |
Ah - correction: There's no scroll bar, but I realized you are right. I can in fact scroll with a mouse wheel on the desktop, or by swiping on the phone. Hope that helps. |
@dermotduffy my cameras are 4:3 (Amcrest). 2592x1944 |
@mt0321 I just noticed your usecase actually has two different aspect ratios in a single camera. I think you're saying your live is 480x704 (really?) and your clips are classic 16/9. Is that right? That fundamentally breaks the assumption there's a single aspect ratio the card can lock to -- what behavior would you expect here? Either the card needs to physically change size (thus pushing other cards around on your dashboard) or we'll need some deadspace in the card for this to be possible to work together. |
Oh, interesting call out. Within a given card, I think using a single aspect ratio for both live view and clips is a totally fair assumption. I did not mean to ask for the size to change dynamically between the live and clips views. I can definitely see that would increase the scope/effort required. The main request is to not have to scroll when the height of the video exceeds its width.
Yeah, that is 704x480 D1 resolution rotated 90 degrees, which is a thing Amcrest supports. However I just looked and I think I will be able to change it to one that is the same aspect ratio as the clips (e.g. 1280x720). |
Quick update on this: This is very much not forgotten, but I'm going to do #78 first, which will make this one easier. My thoughts on this bug are to implement something that either allows the aspect ratio to be forced manually, or (by default) get the aspect ratio dynamically from loaded media (default 16:9 if none is available) -- and use that to control the aspect-ratio of the non-media views (e.g. clips & snapshots gallery). So, for example, in the very tall screenshot provided at the start of this bug, it would all "just work" and the gallery would also take advantage of the 'tallness' so the card would stay the same size. |
FYI: This functionality is now pre-released as part of v1.1.0 . Any help to test and report bugs is much appreciated! |
I can confirm putting aspect_ratio_mode: unconstrained makes the camera view correct. Clicking full screen, however, shows only a portion of the view with a scroll bar. |
Does the default behavior work? (i.e. For the fullscreen issue, sounds like a bug -- would you mind reporting it with a screenshot of before/after fullscreen mode, and the OS/browser you're using? Thanks! |
Nope, not with my camera (9:16 video feed). Unless I put unconstrained or
static aspect ratio, I get a smaller view with a scroll bar.
…On Tue, Sep 28, 2021 at 10:20 PM Dermot Duffy ***@***.***> wrote:
@utkarshjain00 <https://github.com/utkarshjain00>
Does the default behavior work? (i.e. aspect_ratio_mode omitted entirely
or dynamic).unconstrained should not be necessary, it's more to allow the
gallery (and the camera) to expand as much as it wants, but any aspect
ratio camera should also "just work" out of the box.
For the fullscreen issue, sounds like a bug -- would you mind reporting it
<https://github.com/dermotduffy/frigate-hass-card/issues/new/choose> with
a screenshot of before/after fullscreen mode? Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#71 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATOFJSQARB7U3ZT5L6CMWO3UEKO3VANCNFSM5DYETCWA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Definitely an issue then, dimensions should be autodetected. Please file an issue with enough details so I can try to reproduce, thank you! |
First, thank you for this awesome custom Lovelace card!
Checklist:
Release with the issue: 1.0.1
Last working release (if known): N/A
Browser and Operating System: Firefox and Chrome on Windows 10; Android Mobile App on Google Pixel 3
Description of problem: I have one camera with a vertical orientation, with its height taller than its width. This video gets cut off in the Lovelace card display.
Additionally, the bottom video bar (with play/pause and full-screen buttons) is cut off as well.
In full screen mode, I can see the full video. However, because the bottom bar is cut off, on Windows desktop I have to double-click to enter full screen mode. On Android I have not been able to find a way to show the full video as double-tap does not work.
I've attached an image showing the rendering.
Javascript errors shown in the web inspector (if applicable): N/A
Additional information:
For reference, the built-in Picture Entity card shows the camera stream (from the ONVIF integration) at full height. This may help figure out how to produce the same behavior in the custom Frigate card.
The text was updated successfully, but these errors were encountered: