Does ffmpeg supported KLV metadata?

只愿长相守 提交于 2020-01-01 04:55:09

问题


Is ffmpeg metadata, which is also described in: http://wiki.multimedia.cx/index.php?title=FFmpeg_Metadata also supported MISB standard UAV metadata 601.5 ? Is it same as KLV ?

Thanks, Ran


回答1:


FFMPEG does not natively support MISB KLV metadata or have demuxers or decoders for KLV metadata of these types at this time.

However, FFMPEG can be used to extract data elementary streams from containers like MPEG Transport Stream (TS) per ISO 13818-1. Such capability works for UDP streams and local MPEG TS Files. See the examples at end of response. The examples simply extract the data from the stream, they do not parse them. Parsing could easily be accomplished in real time by piping the output or post processing using many languages including C and Python.

It would be helpful to know specifically which containers you are trying to extract data from. In lieu of such information I have assumed MPEG TS in my response and examples. I would like to also point out that the current standard for "UAS Local Dataset" is now ST0601.8 at the time of this response.

I have personally tested the following examples with FFMPEG 2.5.4 on Mac OS X 10.9.5.

The following examples can be modified such that the output is sent to stdout by replacing the with '-'.

Extract Data Stream From MPEG-TS File at Line Speed and Save to Binary File: ffmpeg -i <MPEGTS_infile> -map data-re -codec copy -f data <binary_outfile>

Extract Data Stream From MPEG-TS File at Frame Rate and Save to Binary File: ffmpeg -re -i <MPEGTS_infile> -map data-re -codec copy -f data <binary_outfile>

Extract Data Stream From MPEG-TS UDP Stream at Stream Rate and Save to Binary File: ffmpeg -i udp://@<address:port> -map data-re -codec copy -f data <binary_outfile>

Extract Data Stream From MPEG-TS UDP Stream at Stream Rate and Direct to STDOUT: ffmpeg -i udp://@<address:port> -map data-re -codec copy -f data -

Stream Video, Audio and Data Streams from MPEG-TS file Over UDP at Frame Rate: ffmpeg -re -i <MPEGTS_infile> -map 0 -c copy -f mpegts udp://<address:port>




回答2:


I'm unsure if UAV metadata 601.5 is the same as KLV, but FFmpeg can demux KLV metadata since commit 69a042e from 28 Oct 2013:

  • mpegts: demux synchronous SMPTE 336M Key-Length-Value (KLV) metadata

This fixes ticket #2579: Data stream from UAV video reported as "Unknown" type and without codec_id set, so you may find other relevant information there too.



来源:https://stackoverflow.com/questions/25701034/does-ffmpeg-supported-klv-metadata

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!