In more detail
The codec decides quality and file size, and is separate from the file extension and the Container format. Forensic tools read the codec, bitrate and encoder tags to show how a file was made and whether it was re-encoded. See the Video Forensics.