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

Incorrect Aspect Ratio for Doorbell Snapshot #70

Closed
shnhrrsn opened this issue Aug 13, 2020 · 13 comments
Closed

Incorrect Aspect Ratio for Doorbell Snapshot #70

shnhrrsn opened this issue Aug 13, 2020 · 13 comments
Labels
bug Something isn't working doorbell

Comments

@shnhrrsn
Copy link

The G4 Doorbell is 1600x1200 (4:3) — it looks like snapshots are being forced to 1280x720 (16:9) regardless of device type so they appear stretched in Home.app.

@beele beele added bug Something isn't working doorbell labels Aug 17, 2020
@JJJ
Copy link
Contributor

JJJ commented Aug 17, 2020

I noticed this, too. Not only the snapshot, but the video feed as well.

I'm not certain if this is configurable. I half assumed HomeKit always used 16:9 for everything.

@beele
Copy link
Owner

beele commented Aug 17, 2020

I'll try and see if it's possible, I would assume that it would just display the stream/snapshot as is, but ffmpeg can probaly be set to letter/pillarbox the video/photo

@beele
Copy link
Owner

beele commented Aug 21, 2020

The latest beta: [email protected] has some changes in the way video & snapshots are handled.
sudo npm i -g [email protected] --unsafe-perm=true

The video config section for the plugin should be adjusted to this:

"videoConfig": {
    "audio": true,
    "maxFPS": 30,
    "maxBitrate": 3000
}

@JJJ
Copy link
Contributor

JJJ commented Aug 24, 2020

Testing 0.4.3 beta 3 here, no change:

Feed

jjj-sc-2020-08-23 at 22 36 06@2x

Thumbnails

jjj-sc-2020-08-23 at 22 36 56@2x

My config already had those keys set, plus others. Are you saying to remove everything else? Here's mine:

"videoConfig": {
    "vcodec": "h264_omx",
    "audio": true,
    "maxStreams": 3,
    "maxWidth": 3840,
    "maxHeight": 2160,
    "maxFPS": 60,
    "mapvideo": "0:1",
    "mapaudio": "0:0",
    "maxBitrate": 3000,
    "packetSize": 376,
    "additionalCommandline": "-protocol_whitelist https,crypto,srtp,rtp,udp -loglevel verbose"
}

@beele
Copy link
Owner

beele commented Aug 24, 2020

@JJJ You should try with only the small videoConfig like the one I posted above.

@JJJ
Copy link
Contributor

JJJ commented Aug 24, 2020

@beele holy moly that is a HUGE improvement.

  • Video quality is immensely improved
  • Aspect ratio is correct
  • Video play speed is unaffected (still good for me, not worse in any way)

Feed

jjj-sc-2020-08-24 at 12 15 53@2x

Thumbnails

jjj-sc-2020-08-24 at 12 16 21@2x

@JJJ
Copy link
Contributor

JJJ commented Aug 25, 2020

First weird new error in homebridge logs.

53FD9F8C-6498-420D-AEC1-14A3742BA7C6

@beele
Copy link
Owner

beele commented Aug 25, 2020

I have a fix for that issue coming up, the strange thing is that I don't get that error.
Are any of your cameras off (or disconnected, or....)?
I have one camera that is mostly off but I still get a snapshot from the protect url (be it an older image off when it was last on and queried for a snapshot)

@beele
Copy link
Owner

beele commented Aug 25, 2020

@JJJ Can you try with:
sudo npm i -g [email protected] --unsafe-perm=true

@JJJ
Copy link
Contributor

JJJ commented Aug 25, 2020

Will test today and report back.

It's plausible that the cameras or UDM Pro rebooted (like after updates?) but they were all online and functioning at the time of the error. I could access them fine via the official protect app, but not via Home.

@JJJ
Copy link
Contributor

JJJ commented Aug 25, 2020

@beele so far, so good.

  • Installed beta 4
  • Rebooted my Raspberry Pi
  • Stress tested by loading feeds from Home app on Mac/iPad/iPhone in rapid succession - no errors yet

@JJJ
Copy link
Contributor

JJJ commented Aug 25, 2020

@beele unsure if related, but I've had it happen twice today where video & snapshots simply stop responding.

Last night, Unifi Protect updated to 1.14.12-beta.3, which may also be contributing. Since I have no facts, this is simply to report what I'm seeing, and I'll update as I learn more.

I do know that restarting Homebridge and closing/opening the Home app on the relative device(s) makes video & snapshots work again.

@beele
Copy link
Owner

beele commented Sep 26, 2020

@JJJ Can you try with the latest beta, I've reworked how video streams are handled.
sudo npm i -g --unsafe-perm=true [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working doorbell
Projects
None yet
Development

No branches or pull requests

3 participants