We study isospin-1 P-wave ππ scattering in lattice QCD with two flavours of O(a) improved Wilson fermions. For pion masses ranging from m π = 265 MeV to m π = 437 MeV, we determine the energy spectrum in the centre-of-mass frame and in three moving frames. We obtain the scattering phase shifts using Lüscher's finite-volume quantisation condition. Fitting the dependence of the phase shifts on the scattering momentum to a Breit-Wigner form allows us to determine the resonance parameters m ρ and g ρππ . By combining the scattering phase shifts with the decay matrix element of the vector current, we calculate the timelike pion form factor, F π , and compare the results to the Gounaris-Sakurai representation of the form factor in terms of the resonance parameters. In addition, we fit our data for the form factor to the functional form suggested by the Omnès representation, which allows for the extraction of the charge radius of the pion. As a further application, we discuss the long-distance behaviour of the vector correlator, which is dominated by the two-pion channel. We reconstruct the long-distance part in two ways: one based on the finite-volume energies and matrix elements and the other based on F π . It is shown that this part can be accurately constrained using the reconstructions, which has important consequences for lattice calculations of the hadronic vacuum polarisation contribution to the muon anomalous magnetic moment. * felix.erben@ed.ac.uk