[Matroska-devel] Tagging MKV files

Pavel Koshevoy pkoshevoy at gmail.com
Thu Aug 16 17:15:21 CEST 2012


On 8/15/2012 3:27 PM, Dan Hinsley wrote:
>
> So, I'm working on a library to allow tagging of MKV files and I have 
> a question.  What I'd like to do is write all the tags at the end of 
> the file, so that I don't have to rewrite the entire file.  But it 
> looks like I have to update the SeekPosition to point to the new 
> location of the tags.  The problem is that this will increase the 
> number of bytes to specify the offset, and since there doesn't appear 
> to be any padding in this section (I'm using the cover_art.mkv test 
> file), that prevents me from just updating this.
>
> And even if I rewrite the entire file, calculating the offsets is 
> tough because the offset is going to depend on the size of the 
> SeekPosition lengths, which depends on the offset.
>

To calculate the exact number of bytes required to store an offset you 
would need to implement a 2-pass mechanism.  However, you can also avoid 
all this and simply assume that all offsets require 8-bytes for storage.


> Am I missing something obvious here?
>

You could take a look at http://sourceforge.net/projects/yamka/, it may 
work for you.


> Also (not that it matters for me at the moment) how are the Seek UID's 
> determined?
>

The SeekID [53][AB] stored in the Seek Entry is the EBML ID of the 
element that the seek entry points to.


> Also, is there a forum anywhere for developers working to 
> create/play/modify MKV files?
>

This is it.

     Pavel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20120816/e41109ee/attachment.html>


More information about the Matroska-devel mailing list