When using net camera the resolution should be detected automatically if not specified in the config #1489
Replies: 7 comments
-
Resolution will be detected, but it will not override your configured values. By not specifying resolution in the camera file you are falling back to the global value, it is probably 640x480, check the main config. Motion will scale picture to what you have in your config |
Beta Was this translation helpful? Give feedback.
-
Okay, but what is the idea behind such behaviour? It will make more sense if in case if width and height is not specified, then motion will extract resolution from the stream and use those as resolution for the stream and thats it. I don't need to rescale it. |
Beta Was this translation helpful? Give feedback.
-
So the question is how to NOT rescale video and use width and height extracted from the stream rather than any values in the config files? |
Beta Was this translation helpful? Give feedback.
-
In other words, you do not want to specify the resolution manually in the config, you rather want motion do detect it and use as is? |
Beta Was this translation helpful? Give feedback.
-
It's not that "I want or I don't want", it's more about real - life scenario. My camera configuration files pointing to rtsp streams, and those are coming from the cams which does not belong to me ) I can't ask users something like "please set secondary stream resolution to 704x576, otherwise my server will burn it's CPU in constant attempts to rescale it". So yes it would be great if motion will pick stream resolution from the stream itself and USE it as it is. |
Beta Was this translation helpful? Give feedback.
-
@tosiara: I think this is a case of miscommunication. |
Beta Was this translation helpful? Give feedback.
-
I'm not wondering why Motion doesn't use auto detection. I know that it's not going to that for me. Moreover I've found a workaround: before pushing the camera into the motion config, I'm determining stream resolution myself, from sps string in rtsp handshake. The only thing I say, is that it would be nice and cool improvement :) |
Beta Was this translation helpful? Give feedback.
-
Documentation (https://motion-project.github.io/motion_config.html#netcam_url) for netcam_url says: "URL to use if you are using a network camera, size will be autodetected". Using this config:
camera_id 1
width 704
height 576
movie_passthrough on
netcam_url rtsp://127.0.0.1:8002/1
netcam_highres rtsp://127.0.0.1:8002/1
Everything works as expected (note width and height implicitly set to 704x576), however if I omit width and height and setup cam config as such:
camera_id 1
movie_passthrough on
netcam_url rtsp://127.0.0.1:8002/1
netcam_highres rtsp://127.0.0.1:8002/1
Then motion says something like: Bla bla bla cam generates stream which is not matching to the size set by config file, width = 640, height = 480, stream will be autoadjusted to 640x480...
I understand that 640x480 comes from default width and height in /etc/motion/motion.conf, but what I don't understand: if motion can extract stream resolution from the stream itself, why is it not doing it? And why documentation says that it should (if I understand it correctly).
Beta Was this translation helpful? Give feedback.
All reactions