Nanoscale phonon transport is a key process that governs thermal conduction in a wide range of materials and devices. Creating controlled phonon populations by resonant excitation at terahertz (THz) frequencies can drastically change the characteristics of nanoscale thermal transport and allow a direct real-space characterization of phonon mean-free paths. Using metamaterial-enhanced terahertz excitation, we tailored a phononic excitation by selectively populating low-frequency phonons within a nanoscale volume in a ferroelectric BaTiO3 thin film. Real-space time-resolved x-ray diffraction microscopy following THz excitation reveals ballistic phonon transport over a distance of hundreds of nm, two orders of magnitude longer than the averaged phonon mean-free path in BaTiO3. On longer length scales, diffusive phonon transport dominates the recovery of the transient strain response, largely due to heat conduction into the substrate. The measured real-space phonon transport can be directly compared with the phonon mean-free path as predicted by molecular dynamics modeling. This time-resolved real-space visualization of THz-matter interactions opens up opportunities to engineer and image nanoscale transient structural states with new functionalities.