A four-body amplitude analysis of the $B^- to D^{*+} pi^- pi^-$ decay is performed, where fractions and relative phases of the various resonances contributing to the decay are measured. Several quasi-model-independent analyses are performed aimed at searching for the presence of new states and establishing the quantum numbers of previously observed charmed meson resonances. In particular the resonance parameters and quantum numbers are determined for the $D_1(2420)$, $D_1(2430)$, $D_0(2550)$, $D^*_1(2600)$, $D_2(2740)$ and $D^*_3(2750)$ states. The mixing between the $D_1(2420)$ and $D_1(2430)$ resonances is studied and the mixing parameters are measured. The dataset corresponds to an integrated luminosity of 4.7 $fb^{-1}$, collected in proton-proton collisions at center-of-mass energies of 7, 8 and 13 TeV with the LHCb detector.