Digital video forensics refers to the process of analysing, examining, evaluating and comparing a video for use in legal matters. In digital video forensics, the main aim is to detect and identify video forgery to ensure a video’s authenticity. When a video is edited, the original bitstream is first decoded, edited and then re-compressed. Therefore detecting re-compression in videos is a major step in digital video forensics. Video editing can be applied many times leading to multiple compressions. Thus, finding out the compression history of a video becomes an important mean for detecting any manipulation and thereby identifying the legitimacy of a video. In this work, we propose a machine learning approach to detecting double and triple compression in videos coded using the High Efficiency Video Coding (HEVC) format. Feature variables are extracted from Coding Units (CUs) and summarized into picture and Group of Pictures (GoP) feature vectors. Two classifiers are used for classifying videos into single, double and triple compression, namely; Random Forest (RF) and bi-directional Long Short-Term Memory (bi-LSTM). The latter classifier is important in digital video forensics as it exploits the temporal dependencies between feature vectors. In the experimental results, 127 video sequences are used for verifying the accuracy of the proposed solutions. Results are reported in terms of classification accuracy, confusion matrices, precision and recall. The experimental results revealed that both double and triple compression can be accurately detected using the proposed solutions with results superior to existing work.