Share via


how to get klv metadata while streaming mpegts video

Question

Monday, July 8, 2019 10:11 AM

hello,

I'd like to get klv metadata while streaming mpegts video.

but I could not be ablet to find how to do.

I use Elecard for converting the video in the stream.

Also I want to get the metadata of video.

How can I do?

All replies (2)

Monday, July 8, 2019 10:32 PM

You will have to ask Elecard about this.  It is entirely up to them to decide whether to handle KLV data or not.

Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.


Tuesday, July 9, 2019 10:27 AM

Hi, hddsdd

You can extract metadata with ffmpeg.

run the command ffmpeg -i /path/to/your/file -c copy -map data-re -f data /path/to/your/output/file

you also can do that on the fly by change the path of the file to the address that streams it udp://[IP]:[PORT]

notice that if you dont map the video it wont work.

more of ffmpeg: you can see the -map option and the -f option,

-f option is the format that you want the output will be, like mp4,data,subtitles and mpegts(TS).

-map is mapping option, every TS file made from many transport streams, that means that you can map every TS file to video, audio, subtitles or metadata.
it is dependent on the encoder that create the file, if he dont map it the ffmpeg wont know which stream belong to his type.
but that not prevent from you to map the file, you can map it with numbers:
you can map it like that: -map 0:1/1:3/2:2, the first number is for the number of input, if you have 2 inputs, so the first input will be 0 and the second will be 1.
the second number is the number of the stream (also start with 0), so if you no the order of the streams you can extract the relevant stream by these method.

Best regards,

Strive


MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].