  The ultrafast control of materials has opened the possibility to investigate
non-equilibrium states of matter with striking properties, such as transient
superconductivity and ferroelectricity, ultrafast magnetization and
demagnetization, as well as Floquet engineering. The characterization of the
ultrafast thermodynamic properties within the material is key for their control
and design. Here, we develop the ultrafast stochastic thermodynamics for
laser-excited phonons. We calculate the entropy production and heat absorbed
from experimental data for single phonon modes of driven materials from
time-resolved X-ray scattering experiments where the crystal is excited by a
laser pulse. The spectral entropy production is calculated for SrTiO$_3$ and
KTaO$_3$ for different temperatures and reveals a striking relation with the
power spectrum of the displacement-displacement correlation function by
inducing a broad peak beside the eigenmode-resonance.
