<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 1 Apr 2022 at 04:20, Brad Hards <<a href="mailto:bradh@frogmouth.net">bradh@frogmouth.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thursday, 31 March 2022 9:15:42 PM AEDT Tom Vercauteren wrote:<br>
> I am interested in embeding metadata corresponding to each video frame<br>
> within an mp4 file. I am however a bit unsure how to best approach this<br>
> with ffmpeg / libav. I tried looking for exisiting tutorials / guidelines<br>
> but couldn't find it so far and would thus appreciate further pointers.<br>
<br>
It might depend on what you are trying to achieve. One thing you might like to <br>
look at is the MISB ST 1910.1 approach, which uses an EMSG box. <br>
<br>
Its not clear to me how well that is supported within ffmpeg - it'll probably <br>
require some additional code.<br></blockquote><div><br></div></div><div class="gmail_quote">Thanks. I am fairly new to this, so the mention of MISB ST 1910.1 was insightful. I read this blog post which helped me understand:</div><div class="gmail_quote"><a href="https://aws.amazon.com/blogs/media/misb-st-1910-and-klv-changing-the-game-in-intelligence-entertainment-and-beyond/">https://aws.amazon.com/blogs/media/misb-st-1910-and-klv-changing-the-game-in-intelligence-entertainment-and-beyond/</a></div><div class="gmail_quote"><br></div><div class="gmail_quote">As far as I understand, MISB ST 1910.1 with EMSG box would be mostly important for web streaming purpose, right? In my case, I am moslty interested in being able to store (and read back) some metadata alongside each video frame of an mp4 file. From that article, it seems like adding KLV metadata would be sufficient for me and would be supported by ffmpeg / libav already.</div><div class="gmail_quote"><br></div><div class="gmail_quote">In such a case, am I right in assuming that using a stream of type AV_MEDIA_TYPE_DATA that uses codec AV_CODEC_ID_SMPTE_KLV is a good way to go? Something similar to how it is suggested here?</div><div class="gmail_quote"><a href="https://stackoverflow.com/q/68304330/17261462">https://stackoverflow.com/q/68304330/17261462</a></div><div class="gmail_quote"><br></div><div class="gmail_quote">Now, for the message itself, is there a recommended MISB compliant KLV library or is it OK to "hack" it by say using protobuf for serialising the metadata (similar to <a href="https://github.com/Parrot-Developers/libvideo-metadata">https://github.com/Parrot-Developers/libvideo-metadata</a>)?</div><div class="gmail_quote"><br></div><div class="gmail_quote">Also, is it ok to leave the interleaving to ffmpeg, i.e. using av_interleaved_write_frame rather than write_frame (which is shown in many of the questioned I read so far)?</div><div class="gmail_quote"><br></div><div class="gmail_quote">Many thanks,</div><div class="gmail_quote">Tom<br></div><div class="gmail_quote"><br></div></div>