Microwave photonic filters (MPFs) are of great interest in radio frequency systems since they provide prominent flexibility on microwave signal processing. Although filter reconfigurability and tunability have been demonstrated repeatedly, it is still difficult to control the filter shape with very high precision. Thus the MPF application is basically limited to signal selection. Here we present a polarizationinsensitive single-passband arbitrary-shaped MPF with ~GHz bandwidth based on stimulated Brillouin scattering (SBS) in optical fibre. For the first time the filter shape, bandwidth and central frequency can all be precisely defined by software with ~MHz resolution. The unprecedented multi-dimensional filter flexibility offers new possibilities to process microwave signals directly in optical domain with high precision thus enhancing the MPF functionality. Nanosecond pulse shaping by implementing precisely defined filters is demonstrated to prove the filter superiority and practicability.In radio frequency (RF) systems, the microwave photonics (MWP) has been attracting persistent attentions since it provides potential possibilities to overcome some inherent limitations of electronics [1][2][3] . As a key MWP component, the microwave photonic filter (MPF) has been studied intensively and has shown its prominent superiority in terms of tunability and reconfigurability 4,5 . By using MPFs instead of conventional electrical filters, the RF system flexibility can be increased dramatically. The realization of the MPF can be roughly categorized into two approaches. One is delayed-tap based finite impulse response (FIR) filter. For this method, the RF signal is first modulated on several optical carriers at different wavelengths. Each carrier acts as a filter tap and the tap coefficients are usually set by amplitude and phase manipulation with liquid crystal based technique 6,7 . Then the RF-modulated carriers pass through dispersive media to obtain different time delay and are combined together to convert to RF signal. The optical carriers can be multiple laser diodes 8 , a broadband optical source 6 , an optical comb 7,9 or a multi-mode mode lock laser 10 . The dispersive media can be a dispersive fibre 11 or a chirped fibre Bragg grating (CFBG) 12 . This method provides certain flexibility but due to the inherent nature of the discrete FIR filter, the frequency response has multiple harmonic passbands, which restricts the filtering within one free spectral range (FSR). Several works have been reported to retain a single passband including employing an optical filter 7 and broadening the tap width 13 . The other category is using optical filter techniques to filter the RF-modulated optical signal directly by micro-ring resonators . Meanwhile, in order to enhance functionality and robustness and reduce cost, size and power consumption, there has been a consistent effort towards the integration of microwave photonic devices [18][19][20][21] . SBS effect can be considered as an active optical filter in terms of sig...