Capture device input (Frame Grabber)
KlvStreamInjector can use a capture device (frame grabber) that provides uncompressed frames as a video source. Video is encoded into H.264 and Klv Metadata can be added as with other scenarios.
Finding available capture devices
Press C in order to get the list of available capture devices.
Configuration
Command | Command | Description |
---|---|---|
-c | --captureDevice | Input Capture device name or id |
--frameResolution | Frame resolution - 'Width'x'Heigth'. Default 720x480. | |
-b | --bitrate | Encoding bitrate (in KBit/s). Default 2000. |
--framerate | Frame rate. Default 30. | |
--encodingProfile | Baseline = 0, HighProfile = 1, MainProfile = 2. Default 0 (baseline) | |
--videoFrameType | Video Frame Type: -1 (NONE / autoselect), 0 (RGB24), 1 (RGB32), 2 (YV12) | |
--lowLatencyMode | Set low latency mode. Default - false | |
--inputFramesRecordingPath | Path for recording of incoming frames. If extension set to .bin - records raw data. If set to bmp (but only if the internal data comes as RGB), saves bitmaps. For example, 'c:\captures\frame.bmp' will record frame_0.bmp, frame_1.bmp |
Usage example
KlvStreamInjectorProc.exe -c 0 -o udp://227.1.1.2:30122 --video true --frameResolution 1280x720 --bitrate 3000 -p defaultPacket.bin
where:
- -c is your source captureDevice index
- -o is the target output stream (can be unicast or multicast)
- -p is a path to the default packet
- --video enable video preview
- --frameResolution - Resolution for capture and encoding
- --bitrate - Encoding video bitrate
Low Latency mode
Setting --lowLatencyMode will override some of the configuration parameters in order to achieve the low latency streaming.
Please note, that a proper decoder configuration is crucial. If your decoder is not intended for low latency streaming, it will be impossible to get good results - it takes two to tango...
Audio capture and encoding
KlvStreamInjector can capture, encode and mux audio into the stream.
Note. KlvStreamInjector requires DirectShow 64 bit encoder filter (not included in the application package). It can be configured by ClassId in the application configuration file (KlvStreamInjectorProc.exe.config):
<setting name="AudioEncoderClassId" serializeAs="String">
<value>55131B92-196E-496E-9B9C-8F417D040ADD</value>
</setting>
Default value (55131B92-196E-496E-9B9C-8F417D040ADD) is for Elecard AAC encoder - eaace.ax
Command | Command | Description |
---|---|---|
--audioCaptureDevice | Input Audio Capture device name or id returned by List capture devices call | |
--audioPid | Audio Pid. |
The audio and video capture devices may be jittery. For example, some audio devices send audio packets in a burst every second. In such case, these bursts will be seen in live playback, unless you do the following:
- Cancel low delay mode on the player side
- Set the Caching to match the burst