Trapped magnetic field in superconducting niobium is a well known cause of radio-frequency (RF) residual losses. In this contribution, we present the results of RF tests on a single-cell cavity made of high-purity large grain niobium before and after allowing a fraction of the Earth magnetic field to be trapped in the cavity during the cooldown below the critical temperature Tc. This experiment has been done on the cavity before and after a low temperature baking. Temperature mapping allowed us to determine the location of hot-spots with high losses and to measure their field dependence. The results show not only an increase of the low-field residual resistance, but also a larger increase of the surface resistance for intermediate RF field (higher medium field Q-slope), which depends on the amount of the trapped flux. These additional field-dependent losses can be described as losses of pinned vortices oscillating under the applied RF magnetic field.