Deuteron magnetic resonance (DMR) and infrared absorption spectra have been measured in amorphous hydrogenated carbon (a-C:H and a-C:D,H) and amorphous hydrogenated carbon nitride (a-CN:D,H) films plasma-deposited onto room-temperature substrates from feedstock mixtures of CH4, N2, and D2. DMR spectra and transient magnetization recoveries were measured between room temperature and 4 K. Recoveries are dominated by magnetization transport under extreme inhomogeneity. Methyl rotors CDx H3-x freeze out below 77 K. From the infrared absorption spectra, NH2, CHx, double bonded C-C, and triple bonded C-N stretching modes are observed. As a function of increasing nitrogen concentrations, the NH2 and C-N intensities dramatically increase while the CHx and C-C intensities decrease. In films where the ratio of nitrogen to carbon plus nitrogen is greater than 25%, the absorption spectra are dominated by NH2 stretching and bending modes; in contrast, the DMR spectra show many CDxHy configurations and a broader NDxHy structure. Proton NMR shows significant hydrogen clustering in a-CN:D,H.