Any media file experts out there… if so, I have a video file question.
I have a video file which has an .mp4 file extension. Analysing this file with file recognition software tells me that the container for this file is MPEG -2 Program Stream, which I understand is a high quality, uncompressed format, such as used for DVD streams (correct me if I’m wrong here!).
Now, considering the same piece of software states that this same video is encoded with the H264 codec, which I thought generally only worked with compressed files (again, correct me if I’m wrong), can the file recognition software be correct?
Being that the file extension is an mp4 and the codec is H264, this would suggest that the file has been compressed? If that’s the case, I can’t understand how it identifies it as an MPEG-2 Program Stream as that should be uncompressed?
Thank you for the explanation. No, I didn’t create it, it’s a file created by a CCTV system, but I had trouble playing it initially, and when I looked at why, the combination of file extension, container and codec didn’t make sense to my limited knowledge. I was simply wondering if the file reading software was feeding me duff info!
I have little experience of CCTV systems, but if yours is digital it’s possible there may be some way to configure digital recording in terms of higher quality vs higher storage requirements and vice versa.
Yes, that’s correct, the system allows adjustable frame rates so you can balance the quality of footage against how much is stored. I’m also aware the system can be backed up in different file types, so I wondered whether the file reading software was able to tell what form the file was originally recorded in i.e uncompressed and then subsequently recognised that it had been compressed when backed up.
Having looked online to try and work it out, MPEG-2 program stream seemed to be uncompressed only from what I could see, so I didn’t understand how the software could say it required a compressed codec to play it!
The MPEG-2 Program Stream is a container format for an MPEG video + optional audio stream. The PS itself is not compressed, but the video and/or audio inside it usually are, in this case the video is compressed with the h264 codec. For convenience the file extension for this combination is usually named .mp4.
Uncompressed video gets really large very quickly, so in almost all scenarios it’s recommended to save streams directly to h264 (or h265 if available), which is generally what these types of camera’s do. One reason for that is that when the image is still for longer period of time, h264 doesn’t save (all) the intermediate frames if there are no changes occurring. An uncompressed format would save every full frame that the camera is running, whether there is something changing in the view or not.