As a kind of sensor for real-time feedback and dynamic monitoring of angular velocity and angular displacement of the system, the common photoelectric encoder is widely used in many fields such as new energy electric vehicles, servo closed-loop control systems, industrial control, security monitoring. In order to improve the resolution and accuracy, a kind of optical and magnetic combined encoder which combines photoelectricity and multi-pole magnetoelectricity is designed in this paper, where the light-blocking disk of photoelectric sensor is designed according to the pseudo-random sequence, and the photoelectric coding is used to determine the magnetic interval of multi-pole. The absolute angle is calculated according to the number of multiple circles plus the angle of single circle. The experimental results at different temperatures (−40 C~100 C) show that the accuracy of the proposed combined encoder can reach ±0.08°, which is improved by 0.37° compared with that of the single-pole encoder. Finally, the combined encoder was applied to the pan-tilt-zoom (PTZ) camera of a video surveillance enterprise, and the experiment showed that its repeated positioning accuracy reached ±0.02°, which is greatly improved compared with single-pole encoder.