Monitoring the feeding and ruminating behaviour of ruminants can be used to assess their health and welfare. The MSR-jaw movement recording system (JAM-R) can automatically record the jaw movements of ruminants. The associated software Viewer2 was developed to classify these recordings in adult cattle and calculate the duration and number of mastications of feeding and ruminating. The purpose of this study was to evaluate the performance of Viewer2 in classifying the behaviour of sheep and goats and assessing their feeding and ruminating. The feeding and ruminating behaviour of ten sheep and ten goats on pasture (observed live) and of five sheep and five goats in the barn (observed by video) were compared with Viewer2 behaviour classifications. To assess the technical and welfare issues of the JAM-R, its application was tested in a feeding experiment with 24 h monitoring of the feeding behaviours of 24 sheep and 24 goats. Viewer2 worked equally well on both species. The mean (95% confidence interval) performance of Viewer2 was at a good level for feeding (accuracy: 0.8–1.0; sensitivity: 0.9–1.0; specificity: 0.6–0.9; precision: 0.7–0.9) and ruminating (accuracy: 0.8–0.9; sensitivity: 0.6–0.8; specificity: 0.8–1.0; precision: 0.9–1.0) compared with human observations, with minor differences between the conditions on pasture and in the barn. The performance improved when recording frequency was increased from 10 Hz to 20 Hz. Applying the JAM-R in a feeding experiment, 71% of the recordings executed were defined as technically error-free and produced plausible values for feeding behaviours. In conclusion, according to the values of accuracy, sensitivity, specificity and precision, the presented JAM-R system with Viewer2 is a reliable and applicable technology for automatic recording of feeding and ruminating behaviour of sheep and goats on pasture and in the barn.