bp2008 / ui3

A powerful, modern HTML5 web interface for Blue Iris.
GNU Lesser General Public License v3.0
124 stars 16 forks source link

Stretch video to fullscreen #64

Closed xjustbmw closed 3 years ago

xjustbmw commented 3 years ago

My dvr records half full hd streams. Full hd light as hickvision calls it.

Is it possible to stretch them back to normal 16/9 format in ui3? Without reencoding. Just the aspect ratio to the correct size.

Im using only half of the screen now at 8/9 aspect ratio. Images look compressed.

Thanks

bp2008 commented 3 years ago

Hi. I've never heard of that.

UI3 won't rescale the video to a different aspect ratio. Blue Iris can, but it probably won't do it for recordings already captured. You'd need to use the Anamorphic setting on the camera properties > video tab.

xjustbmw commented 3 years ago

unfortunately it cannot. it only resizes the substream to match the aspect ratio of the main stream in hikvision lite case both aspect ratios are wrong

maybe there is a way to change the viewing aspect ratio using the custom css feature of ui3 ? ie if width < height then double the width ?

bp2008 commented 3 years ago

I just gave it a quick try and was able to scrape something together that might work for you. It isn't a perfect solution, but better than nothing. For full functionality, this will require you to get UI3-141 which I'm releasing shortly.

https://github.com/bp2008/ui3/wiki/Local-Overrides-Sample:-Rescale-Single-Camera

xjustbmw commented 3 years ago

amazing. thanks a lot for your help. this makes my day looking forward for your 141 release of ui3

bp2008 commented 3 years ago

UI3-141 is already published. You just won't get it with a Blue Iris update until the next time he updates Blue Iris. You can install it manually.

xjustbmw commented 3 years ago

great. i just tested with the current version of ui3 in blueiris and it works however it requires one step zoom in to trigger the 16/9 aspect ratio updating to 141 now:)

bp2008 commented 3 years ago

Yep, that is what the 141 fix was for!

xjustbmw commented 3 years ago

it works great on 141 :) regarding the thumbnails its the same code ? or all of them is sent as one combined image stream from blueiris ?

bp2008 commented 3 years ago

Thumbnails are all separate images. I think some of the thumbnail displays are being scaled according to the camera metadata, but some are scaled based on the actual resolution of the jpegs sent by Blue Iris.

xjustbmw commented 3 years ago

those might be a little tricky since they are different sizes based on their arrangement from blueiris this beats reencoding all the 28 streams from half full hd to full hd, using only 5-6% cpu to motion detect based on iframes will reencode only the saved jpegs for aitool to 1280x720 thank you for making this work,

there are more users that needed this: https://ipcamtalk.com/threads/how-to-keep-same-aspect-ratio-for-all-camera-live-views.50378/

bp2008 commented 3 years ago

Oh you mean the group view. That is all in one frame from Blue Iris. The only way you can fix that is by either not using the sub stream (so you can use the anamorphic setting) or by just not using the resolution-halving function. Honestly you should probably just turn that off anyway and let the cams encode at native resolution.

xjustbmw commented 3 years ago

I tried. The dvr doesnt see any of the full hd cameras with light mode disabled :) perhaps i will replace the dvrs to proper ones;)

xjustbmw commented 3 years ago

ha. I managed to stretch the thumbnails as well to the correct aspect ratio using this same code :specify frame size "960x1080" in blueiris cameras webview settings :) the downside : the links to open the videos wont work correctly after this resizing

bp2008 commented 3 years ago

I've updated the local override script to fix that too. In this case it needed to double the X and Width properties of the rectangles that define where each camera exists within the group layout.

https://github.com/bp2008/ui3/wiki/Local-Overrides-Sample:-Rescale-Single-Camera

The new revision also modifies the server's response before UI3 begins to process it, which should fix the issue where your group stream isn't sized the way you want it when the UI first loads.

xjustbmw commented 3 years ago

just tested. thank you. it works just great now congrats on the clean coding