I want to write an program which can find some metainformation of mediafile. I'm interested in popular video formats, such as avi, mkv, mp4, mov (may be other popular too). I want basically to get:
- Video size (720, 1080, 360 etc)
- Total runtime of video (may be not very exact)
- Number of audio streams
- Name of video codec
- Name of audio codec
There is already the mediainfo, but in my program I want to get information about remote file, which may be accessed via ftp, http, samba; or even torrent (there are some torrent solutions, which allows to read not-yet downloaded file).
MediaInfo library have no support of samba (smb://) and mkv format (for runtime).
Also, I want to know, how much data should be downloaded to get this information. I want not to download full videofile because I have no enough disk space.
Is this information in the first 1 or 10 or 100 KiloBytes of the file? Is it at predictable offset if I know the container name and total file size?
PS: Platform is Linux, Language is C/C++