3 ms·
With -map. https://trac.ffmpeg.org/wiki/Map https://trac.ffmpeg.org/wiki/Map ffmpeg -i input1.mkv -i input2.mkv -i input3.mkv -map 0:v -map 1:a -map 0:d -c cop
by nwallin 4y ago
With -map. https://trac.ffmpeg.org/wiki/Map https://trac.ffmpeg.org/wiki/Map
ffmpeg -i input1.mkv -i input2.mkv -i input3.mkv -map 0:v -map 1:a -map 0:d -c copy output.mkv
...will take the video from input1.mkv, the audio from input2.mkv, and the data stream from input3.mkv. If you telemetry isn't already packetized, you'll need to do that yourself. Converting your drone's telemetry into something that ffmpeg likes is generally non-trivial.
At my day job I maintain a tool that takes a .csv file and a raw video file and outputs a single file. Which can then be viewed, with the data displayed on the map and such. https://pro.arcgis.com/en/pro-app/latest/tool-reference/image-analyst/video-multiplexer.htm https://pro.arcgis.com/en/pro-app/latest/tool-reference/imag...
- kortex 4y agoMany thanks! > if you telemetry isn't already packetized, you'll need to do that yourself. Converting your drone's telemetry into something that ffmpeg likes is generally non-trivial. Yes, this is exactly the non-trivial step I'm struggling with. Let's say I have every time step a msgpack-encoded binary blob with a timestamp. I want to packetize it and pack it into a data stream of some timestamped/sequenced packet/page/atom structures. I might be able to build those packets myself manually if I can find a viable format (mkv and ogg seem the easiest to reason about). And ultimately I do want to do this with real-time streams, but I'll definitely look at this Video Multiplexer to start with! That at least scratches the itch of archiving this data.
- nwallin 4y agoYup, unfortunately (but fortunately for my employer) there's no off the shelf tool that does this. Ultimately you just have to write a bunch of code. There does exist a standardized way to encode the data: MISB (Motion Imagery Standards Board) ST 0601: https://nsgreg.nga.mil/doc/view?i=5093 https://nsgreg.nga.mil/doc/view?i=5093