A bug? 1.29.0 -- stretched image on rotated streams
A bug? 1.29.0 -- stretched image on rotated streams
I've upgraded to 1.29.0-trusty-2016021001 today and noticed that in the UI, the one camera I have that is rotated left with width of 480 and height of 680 is displayed stretched.
Oddly enough, the image is not stretched when viewed through the new "Montage Review" feature.
Stretched:
How it should be:
If I set orientation to normal and reverse the width/height, the image is displayed properly. Ticking the "preserve aspect ratio" button does not resolve the issue.
Oddly enough, the image is not stretched when viewed through the new "Montage Review" feature.
Stretched:
How it should be:
If I set orientation to normal and reverse the width/height, the image is displayed properly. Ticking the "preserve aspect ratio" button does not resolve the issue.
Re: A bug? 1.29.0 -- stretched image on rotated streams
I have the same issue on my 1.29.0 build. I built a new Ubuntu package yesterday using the do_debian_package.sh script which grabbed the git master branch. OS is Ubuntu 15.10.
EDIT: I had to add a second camera to my test server to see the Montage and Montage Review links. I have the same experience. The image is stretched when clicking directly on the rotated camera and in Montage but shows the correct orientation in Montage Review.
EDIT: I had to add a second camera to my test server to see the Montage and Montage Review links. I have the same experience. The image is stretched when clicking directly on the rotated camera and in Montage but shows the correct orientation in Montage Review.
Last edited by rayrayray on Fri Feb 12, 2016 3:22 pm, edited 1 time in total.
You spoony bard!
Re: A bug? 1.29.0 -- stretched image on rotated streams
rayrayray, which instructions did you follow while building with do_debian_package?rayrayray wrote:I have the same issue on my 1.29.0 build. I built a new Ubuntu package yesterday using the do_debian_package.sh script which grabbed the git master branch. OS is Ubuntu 15.10.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: A bug? 1.29.0 -- stretched image on rotated streams
This is where I found it -- https://github.com/ZoneMinder/ZoneMinder/issues/1231
And this is how I'm calling it -- ./do_debian_package.sh wily `date +%Y%m%d`01 local master
The resulting deb packages I've integrated into a Chef cookbook with the intent of fully automating the ZM install on Ubuntu 15.10. I have it working, but it's a bit of a kludge.
And this is how I'm calling it -- ./do_debian_package.sh wily `date +%Y%m%d`01 local master
The resulting deb packages I've integrated into a Chef cookbook with the intent of fully automating the ZM install on Ubuntu 15.10. I have it working, but it's a bit of a kludge.
You spoony bard!
Re: A bug? 1.29.0 -- stretched image on rotated streams
ok cool - yeah, I was wondering where you read that because it still hasn't made it to the official docs (which use cmake). Thanks
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: A bug? 1.29.0 -- stretched image on rotated streams
I have done a lot of digging after doing a 1.28.xxx build and finding the API missing. I really miss the TinyCam compatibility and want to move to zmNinja.
You spoony bard!
Re: A bug? 1.29.0 -- stretched image on rotated streams
To get back to the rotation issue. I did find some exceptions from CSS in Firefox's dev tools.
And my monitor config. On my 1.28.xxx server that I built a few days earlier, this is working as expected.
And my monitor config. On my 1.28.xxx server that I built a few days earlier, this is working as expected.
You spoony bard!
Re: A bug? 1.29.0 -- stretched image on rotated streams
Ahhhh, nevermind. The CSS errors don't mean anything. I see the same exceptions from my 1.28.xxx server where the image is not stretched.
You spoony bard!
Re: A bug? 1.29.0 -- stretched image on rotated streams
Glad to know I ain't the only one! Thankfully it is the only camera behaving that way - but it is also my baby monitor camera XD
Re: A bug? 1.29.0 -- stretched image on rotated streams
I just noticed that if I view the stream link to nph-zms directly there is no issue with the rotation. Actually just a few lines above the link to the script in the view-source of the page, I can clearly see an issue in the JavaScript.
The monitorWidth and monitorHeight values are backward. I'm going to do some more digging.
Code: Select all
var monitorWidth = 640;
var monitorHeight = 400;
var monitorUrl = '';
var scale = 100;
var streamSrc = "/cgi-bin/nph-zms?mode=jpeg&scale=100&maxfps=30&buffer=1000&monitor=2&connkey=758473&rand=1455316479";
You spoony bard!
Re: A bug? 1.29.0 -- stretched image on rotated streams
I was able to fix this by modifying www/includes/Monitor.php (full path would be /usr/share/zoneminder/www/includes/Monitor.php on most ZM 1.29.x servers). Try this and let me know if it works for you too.
Comment out these lines near the bottom of the file. Use a /* and */ around them. Save the file and reload the monitor view.
Disclaimer: I am not a ZoneMinder developer. I do not present this as anything other than a hack to get this one feature working again. It's possible that doing this breaks something somewhere else. I can tell that this code was added very recently ... my 1.28.xxx VM that I built a week ago didn't have these lines in this file.
Comment out these lines near the bottom of the file. Use a /* and */ around them. Save the file and reload the monitor view.
Code: Select all
public function Width() {
if ( $this->Orientation() == '90' or $this->Orientation() == '270' ) {
return $this->{'Height'};
}
return $this->{'Width'};
}
public function Height() {
if ( $this->Orientation() == '90' or $this->Orientation() == '270' ) {
return $this->{'Width'};
}
return $this->{'Height'};
}
You spoony bard!
-
- Posts: 494
- Joined: Sun Jun 29, 2014 1:12 pm
- Location: Melbourne, AU
Re: A bug? 1.29.0 -- stretched image on rotated streams
Thought you had dimensions wrong way round, but then saw that was testing it. Will have a look at that code.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Random Selection of Cameras (Dahua and Hikvision)
-
- Posts: 494
- Joined: Sun Jun 29, 2014 1:12 pm
- Location: Melbourne, AU
Re: A bug? 1.29.0 -- stretched image on rotated streams
Is the pic above your current configuration? If so swap Width 640 and Height 480 and leave orientation as is with that code left in.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Random Selection of Cameras (Dahua and Hikvision)
Re: A bug? 1.29.0 -- stretched image on rotated streams
Alright, reverted my code change and flipped the dimensions... now the feed is the right shape but shows up garbled. That could be something else with my camera, I suppose.
You spoony bard!
-
- Posts: 494
- Joined: Sun Jun 29, 2014 1:12 pm
- Location: Melbourne, AU
Re: A bug? 1.29.0 -- stretched image on rotated streams
Do you have some image rotation setting in the camera?
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Random Selection of Cameras (Dahua and Hikvision)