We review several methods for the calculation of vibrational spectra from ab initio molecular dynamics (AIMD) simulations and we present a new implementation in the trajectory analyzer TRAVIS. In particular, we show mass-weighted power spectra, infrared spectra, and Raman spectra with corresponding depolarization ratios, which are based on time-correlation functions of velocities, dipole moments, and polarizabilities, respectively. Using the four organic molecules methanol, acetone, nitromethane, and pinacol as test systems, we compare the spectra from AIMD simulations of the isolated molecules in gas phase to static calculations relying on the harmonic approximation and to experimental spectra recorded in a nonpolar solvent. The AIMD approach turns out to give superior results when anharmonicity effects are of particular importance. Using the example of methanol, we demonstrate the application to bulk phase systems, which are not directly accessible by static calculations, but for which the AIMD spectra also provide a very good approximation to experimental data. Finally, we investigate the influence of simulation time and temperature in the AIMD on the resulting spectra.