Declared by the container or by one of its streams, as MP4, Matroska and most other formats do. As exact as the file that wrote it.