Jul-21-2018, 05:17 PM
Alright. Progress has been made. I have discovered that the EBML format used by MKV's starts at the beginning of the file (don't laugh, I'm the most noob of noobs). So, I have been able to locate the EBML starter using the following code:
So, that's that. I'll post back as I make progress.
with open('D:\\Rampage_t01.mkv', 'rb') as f: cur_size = os.stat('D:\\Rampage_t01.mkv').st_size w = 0 p = f.read(1) pp = ord(p) print(struct.unpack('>L', p + f.read(3))[0])This returns
440786851
or 1A45DFA3
in hex, which is what all Matroska EBML code starts with. I didn't know that the info (it makes sense to me though) about the MKV would be found at the beginning of the file. Now, I believe, I just need to walk through the MKV until I find the ID I'm interested in and read it's info. That's the plan; a long way to go, but it's a plan.So, that's that. I'll post back as I make progress.