A method for controlling a camera capable of pan and tilt, PT, control, the camera being connected to an encoder arranged to encode a video stream captured by the camera, the encoder having a motion vector search range, the method comprising the steps of: retrieving a first pointing direction of the camera when capturing a current image frame in the video stream, receiving a user input pertaining to a desired adjustment of the pointing direction of the camera from the first pointing direction to a second pointing direction, the user input defining a period of time during which the desired adjustment of the pointing direction of the camera should be accomplished, and calculating a speed and a direction of the desired adjustment of the pointing direction using the period of time, determining a first threshold speed by: translating the motion vector search range of the encoder to a maximum adjustment of the pointing direction of the camera during the period of time that still allows the encoder to find matching blocks of pixels, using the motion vector search range, between two image frames captured while performing the maximum adjustment of the pointing direction, wherein the motion vector search range is defined as a fixed number of pixels, wherein a resolution of images captured by the camera, and an angular extent of a scene captured by the camera is used for calculating the maximum adjustment of the pointing direction of the camera, and calculating a speed of the maximum adjustment of the pointing direction using the period of time and using the speed of the maximum adjustment as the first threshold speed, determining a second threshold speed by multiplying the first threshold speed with a value higher than 1 and lower than 4, comparing the speed of the desired adjustment of the pointing direction of the camera with the first threshold speed and the second threshold speed, upon determining that the speed of the desired adjustment of the pointing direction is higher than the second threshold speed or lower than the first threshold speed, adjusting the pointing direction of the camera from the first pointing direction to the second pointing direction during the period of time, such that the adjustment is carried out as desired by the user, upon determining that the speed of the desired adjustment of the pointing direction is between the first threshold speed and second threshold speed, adjusting the pointing direction of the camera from the first pointing direction to the second pointing direction at the first threshold speed such that the adjustment is carried out at a decreased speed compared to what was desired by the user. retrieving a first pointing direction of the camera when capturing a current image frame in the video stream, receiving a user input pertaining to a desired adjustment of the pointing direction of the camera from the first pointing direction to a second pointing direction, the user input defining a period of time during which the desired adjustment of the pointing direction of the camera should be accomplished, and calculating a speed and a direction of the desired adjustment of the pointing direction using the period of time, determining a first threshold speed by: translating the motion vector search range of the encoder to a maximum adjustment of the pointing direction of the camera during the period of time that still allows the encoder to find matching blocks of pixels, using the motion vector search range, between two image frames captured while performing the maximum adjustment of the pointing direction, wherein the motion vector search range is defined as a fixed number of pixels, wherein a resolution of images captured by the camera, and an angular extent of a scene captured by the camera is used for calculating the maximum adjustment of the pointing direction of the camera, and calculating a speed of the maximum adjustment of the pointing direction using the period of time and using the speed of the maximum adjustment as the first threshold speed, translating the motion vector search range of the encoder to a maximum adjustment of the pointing direction of the camera during the period of time that still allows the encoder to find matching blocks of pixels, using the motion vector search range, between two image frames captured while performing the maximum adjustment of the pointing direction, wherein the motion vector search range is defined as a fixed number of pixels, wherein a resolution of images captured by the camera, and an angular extent of a scene captured by the camera is used for calculating the maximum adjustment of the pointing direction of the camera, and calculating a speed of the maximum adjustment of the pointing direction using the period of time and using the speed of the maximum adjustment as the first threshold speed, determining a second threshold speed by multiplying the first threshold speed with a value higher than 1 and lower than 4, comparing the speed of the desired adjustment of the pointing direction of the camera with the first threshold speed and the second threshold speed,