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

[Feature]: scale camera still images based on source #465

Open
crxporter opened this issue Jan 16, 2022 · 2 comments
Open

[Feature]: scale camera still images based on source #465

crxporter opened this issue Jan 16, 2022 · 2 comments
Assignees
Labels
enhancement 👍 New feature or request

Comments

@crxporter
Copy link
Member

Your Current NRCHKB Plugin Version

1.4.3

Operating System

Pi buster

What is your idea?

Currently all still camera images are scaled to the size requested by iOS. Suggestion is to use the aspect ratio of the input image.

My stills are 1600x1200 (4:3 ratio) but are squished to 16:9 ratio.

Any more details?

I believe this can be changed on this like of code:

let resolution = request.width + 'x' + request.height

Additional comments?

Still image screenshot (squished):
92A12C60-5A9D-415C-B4FC-73F1E5764ADC

streaming view (proper scale):
1AC26E0D-6CBD-497D-9804-66A4BE92825F

Any code or functions to add?

No response

@crxporter crxporter added the enhancement 👍 New feature or request label Jan 16, 2022
@crxporter
Copy link
Member Author

Related to this:

beele/homebridge-unifi-protect-camera-motion#70

@crxporter
Copy link
Member Author

After more research... scaling would not help here. The still image needs to be cropped down to a 16:9 ratio, centered at 50% of the still image height or width (whichever needs to be cropped).

In my case I was hoping to change the still image source from:

-i http://10.0.1.3/snap.jpeg

to:

-i http://10.0.1.3/snap.jpeg -vf "crop=1600:900:0:150"

Which would output a proper image - but it doesn't seem to be working ... there must be something conflicting with that ffmpeg command later on in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 👍 New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants