-
Notifications
You must be signed in to change notification settings - Fork 187
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
Correct Camera Stream to 16:9 #21
Comments
iPhone? |
Chrome on Windows and Android
…On Mon, Apr 19, 2021 at 2:11 PM Alex X ***@***.***> wrote:
iPhone?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#21 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APXG5UU7GPAH6IRUTAKO7DLTJOUOXANCNFSM43E2U42Q>
.
|
Please show screen. You may blur image. |
It seems to be displayed correctly. Or is the picture compressed horizontally? |
The picture is compressed, it should be spread vertically.
…On Fri, Apr 23, 2021 at 11:52 PM Alex X ***@***.***> wrote:
It seems to be displayed correctly. Or is the picture compressed
horizontally?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#21 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APXG5UTLQASP2RLCT6UPNLLTKF3SNANCNFSM43E2U42Q>
.
|
I have the same with a RTSP stream from a Reolink camera. |
Does the stream out of the camera have the right aspect ratio? I had to adjust my substream from 640x480 to 640x360 to get 16:9 aspect ratio... |
I'm using a hikvision camera and WebRTC stretches the image to 4:3. The same rtsp URL shows the correct aspect ratio in VLC. |
I have the same problem. |
Any ideas how to get the correct 16: 9 format? |
Same Here :( Add option to change Resolutions of source image! When i change from 1080N to 960H is all 16:9 now, but is in lower res :/ |
@AlexxIT Will this help with the scaling problem? https://www.home-assistant.io/blog/2021/09/01/release-20219/ |
I think this is some problem with camera codec. But on my cameras the problem does not happen, I can't debug. |
Have this problem with my Amcrest camera too. |
Can someone provide public access to their RTSP-stream? You can send link in private message in Telegram @AlexxIT or Hass community |
Can anyone share the stream? I've been struggling with it for 3 hours but unfortunately something is wrong with me. (My network is shared and I have some limitations). |
Thanks to @majdzik84 - I found the problem
Component doesn't supported display aspect ratio. And shows picture in original size. I will try to find a solution. |
I keep my fingers crossed for it to succeed :) |
Seems like WebRTC doesn't support pixel aspect ratio. Need a JavaScript developer who can stretch the video manually in the browser. https://chromium.googlesource.com/external/webrtc/+/HEAD/common_video/h264/sps_parser.cc#222 |
Should be a way to just force an aspect ratio for the card and the video will follow, or are you saying then the video will just crop? |
Would love to see something like this. I have a few WebRTC cards within a swipe card to flip through my security cameras. One of the cameras is a 4:3 doorbell while the rest are 16:9. I'm being nitpicky but being able to force 16:9 would fix the spacing on my dashboard. :) |
I recently opened #227, but it seems like it might be related to this. Is there anyone that experiences this problem who also sees the video frame being cropped on the HomeAssistant iOS app? It shows fine on the desktop (albeit with the wrong aspect ratio), but on iOS part of the video is actually cropped off the sides which makes the card unusable. |
Found here, needs lovelace-card-mod, and this little modification. Can be used to set ratio to 16:9:
Has two issues:
|
@AlexxIT what was the solution? Are we still awaiting a JavaScript developer? |
With the PR above, and config like below, it will show nice (tested on Hikvision secondary streams):
|
I would make it even simpler for the final user to customize. Something like the Frigate Hass Card do: dimensions:
aspect_ratio_mode: static
aspect_ratio: '16:9' |
does this still work for you? I made the changes and it is still a 4:3 stream using the rtc card |
Yes it works fine here. |
@nagyrobi I did all of that and it is still showing 4:3 I am using the Frigate Hass Card which references the WebRTC card. |
Supported from v3:
|
Should be fixed in v3 |
@AlexxIT is it possible to zoom the video rather than just stretching it? |
Actually found my answer:
https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit |
Update 3.2.1 broke rotation of video. |
@dbuezas can you check rotation feature with CSS? |
Please try with |
I have solution for rotate MSE and MP4 (not WebRTC) with file metadata. But it work only in Chrome and Firefox. Maybe will be in next versions. |
Does not work. |
thanks, this really helped me adjust the frame size, was messing with it for hours! |
The stream is displayed in 4:3 when the camera records in 16:9 is it possible to correct the aspect ratio in the configuration card?
The text was updated successfully, but these errors were encountered: