I'm trying to attach or embed a kml file to a mp4 video; or, I'm trying to find out if this is possible at all. Based on the wikipedia page on video containers, it looks like mp4 containers support file attachments, so theoretically it seems possible.
I've tried this command:
ffmpeg -i input.mp4 -attach site1.kml -metadata:s:t:0 mimetype=application/vnd.google-earth.kml+xml output.mp4
which returned:
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted
If I change the output file to output.mkv
it works (based on this question), but I'd really like to maintain the mp4 container.
Edit: I've figured out a way to parse a kml file into a srt subtitles file and embed that in the mp4 container, then extract and recreate the kml all using Python. But, it would be much cleaner to just attach the kml.
Anyone know if this is possible?