Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Video Metadata Question
#9
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:
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.
Reply


Messages In This Thread
Video Metadata Question - by malonn - Jul-20-2018, 03:53 PM
RE: Video Metadata Question - by DeaD_EyE - Jul-20-2018, 04:54 PM
RE: Video Metadata Question - by snippsat - Jul-20-2018, 06:37 PM
RE: Video Metadata Question - by malonn - Jul-20-2018, 08:35 PM
RE: Video Metadata Question - by snippsat - Jul-20-2018, 09:51 PM
RE: Video Metadata Question - by malonn - Jul-20-2018, 11:23 PM
RE: Video Metadata Question - by snippsat - Jul-21-2018, 12:41 AM
RE: Video Metadata Question - by malonn - Jul-21-2018, 01:26 AM
RE: Video Metadata Question - by malonn - Jul-21-2018, 05:17 PM
RE: Video Metadata Question - by malonn - Jul-21-2018, 08:26 PM
RE: Video Metadata Question - by malonn - Jul-23-2018, 04:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question image manipulation (cropping and MetaData) SpongeB0B 4 1,305 Jul-03-2023, 06:35 PM
Last Post: SpongeB0B
  AttributeError: 'function' object has no attribute 'metadata 3lnyn0 5 4,923 Mar-28-2022, 04:42 PM
Last Post: Larz60+
  Adding Language metadata to a PDF programmatically bhargavi22 0 2,000 Aug-17-2020, 12:53 PM
Last Post: bhargavi22
  METADATA Errors millpond 0 1,995 Jul-21-2020, 08:22 AM
Last Post: millpond
  How to sort image files according to a metadata file? Brahmslove 1 3,215 Dec-05-2019, 11:25 PM
Last Post: scidam
  Parse the data in XML metadata field klllmmm 2 3,400 Jun-19-2019, 04:24 PM
Last Post: klllmmm
  Tiff metadata sudecki 1 25,161 Aug-10-2018, 07:08 AM
Last Post: sudecki
  I have a question from a YouTube video I saw: nelsonkane 9 5,410 Dec-27-2017, 11:17 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020