Centroid molecular dynamics (CMD) and ring polymer molecular dynamics (RPMD) are two conceptually distinct extensions of path integral molecular dynamics that are able to generate approximate quantum dynamics of complex molecular systems. Both methods can be used to compute quasiclassical time correlation functions which have direct application in molecular spectroscopy; in particular, to infrared spectroscopy via dipole autocorrelation functions. The performance of both methods for computing vibrational spectra of several simple but representative molecular model systems is investigated systematically as a function of temperature and isotopic substitution. In this context both CMD and RPMD feature intrinsic problems which are quantified and investigated in detail. Based on the obtained results guidelines for using CMD and RPMD to compute infrared spectra of molecular systems are provided.