Testing KlvSTreamInjector
Let's play with KlvSTreamInjector.
Prerequisites
You'll need the following
- STANAG 4609 sample file
- KlvStreamer
- KlvStreamerInjector
- StPlayer
Testing the sample file (local playback)
We'll use StPlayer to check the the sample file is Ok - it can be played back and has Klv metadata in it.
Try to drag&drop them into StPlayer to verify everything works. Check the Klv metadata in KlvView window, map, etc.
Testing udp steaming
Use KlvStreamer to generate a multicast stream then open StPlayer to receive it. Use multicast address. Make sure that you send and receive on the same address and port.
Using KlvStreamInjector
First, we'll strip Klv from the sampe STANAG file (or just use any .ts file that does not have any KLV in it).
Download and use ffmpeg for it:
ffmpeg -i C:\Movie\Video_Clip.ts -c:v copy -f mpegts C:\Movie\Video_Clip_no_Klv.ts
Now, if you try to play the resulting file, you'll see that there is no klv in it.
KlvStreamInjectorProc.exe -i udp://227.1.1.1:30120/nic=192.168.1.23 -u udp://127.0.0.1:1111/nic=192.168.1.23 -o udp://227.1.1.2:1234
Re-inserting the data.
- Drop file without Klv into KlvStreamer
- Configure the KlvStreamInjector
- Start the KlvStreamer
- Start the KlvStreamInjector and press S.
You'll see that the stream is received and sent out, but no klv (neither "in" nor "out") is present.
If you open StPlayer, (using the target ip and port) you'll see video without klv, as follows:
Inserting the Klv.
You can use KlvInspector for this.
- Open the original file (with Klv) in the KlvInspector.
Configure its Lan output
- Open SendPackets
Now start streaming in the KlvStreamer, processing in the KlvStreamInjector, sending raw packets in the KlvInspector (by pressing start) and finally, a playback in the StPlayer.
After you start sending packet via udp, you should see that they are inserted into the stream and can be seen in the StPlayer.
Y can use the Recast option of StPlayer instead of the KlvInspector. It will extract RAW klv, while you're playing the file/stream and send it out to udp... With KlvInpector you have more control on this though...