The emission of steady compact jets observed in the hard spectral state of X-ray binaries is likely to be powered by internal shocks caused by fluctuations of the outflow velocity. The dynamics of the internal shocks and the resulting spectral energy distribution (SED) of the jet is very sensitive to the shape of the Power Spectral Density (PSD) of the fluctuations of the jet Lorentz factor. It turns out that Lorentz factor fluctuations injected at the base of the jet with a flicker noise power spectrum (i.e. P(f) ∝1/f) naturally produce the canonical flat SED observed from radio to IR band in X-ray binary systems in the hard state. This model also predicts a strong, wavelength dependent, variability that resembles the observed one. In particular, strong sub-second variability is predicted in the infrared and optical bands. The assumed fluctuations of the jet Lorentz factor are likely to be triggered by the variability of the accretion flow which is best traced by the X-ray emission. In the case of GX339-4 for which high quality and simultaneous multi-wavelength data are available, we performed simulations assuming that the fluctuation of the jet Lorentz factor have the same PSD as the observed X-ray PSD. The synthetic SED calculated under this assumption provides a remarkable match to the observed radio to IR SED. In this case the model also produces strong mid-infrared spectral variability that is comparable to that reported in this source.