(Jul-20-2018, 08:35 PM)malonn Wrote: so I guess I'll try writing a simple parser(?). Is there such a thing as a "simple" one?Then the simplicity goes out the windows,if try to do this from the binary data.
I've never done anything with binary data in Python
If want to it as a excises with .mkv files look at specifications @DeaD_EyE posted.
Can try to just find video dimensions to see how that goes.
Can look at eyeD3 that dos this from mp3 files.
There will find many places file read eg tag.py.
mode = "rb+" if os.path.isfile(self.file_info.name) else "w+b" with open(self.file_info.name, mode) as tag_file: # Write the tag over top an original or append it. try: tag_file.seek(-128, 2) if tag_file.read(3) == b"TAG": tag_file.seek(-128, 2) else: tag_file.seek(0, 2) except IOError: # File is smaller than 128 bytes. tag_file.seek(0, 2) tag_file.write(tag) tag_file.flush()As excepted the file get read in binary
rb
,the try to figure how to navigate/search the binary date to get to the needed metadata.