We present detection of strain solitary waves in polystyrene waveguides using pump-probe digital holography. Analysis of spectral components of the detected longitudinal strain waves was performed at several locations of the waves inside the waveguide in the course of their propagation. The data obtained allowed us to evaluate attenuation of relatively short- and long-wavelength components and to demonstrate much faster decay of high-frequency wavelets in comparison with the long solitary wave. Along with the spectral analysis monitoring of variations of solitary wave shape in the course of its propagation was performed. The dependence of spectral composition of the strain wave on the energy of the initial shock wave showed an increase in the relative contribution of long-wave components with the strain wave energy.