KMScript.comDIGITIZED as KMScript
- Intro
- the engines provide the image/audio/keyboard/mouse/location/position etc.. for kmscript. for example:
- demo.Tester provide the OS desktop image
- Libjp.Camera provide the camera image
- the engine name start with LoweCase mean developer by kmscript, we can guarantee their safety.
- the name start with UpperCase are from our friend or third party.
- the engine always open at kmscript startup or engine changed
- fallback to null(none) if failed, for example: camera already removed
- same engine support the parameters, that can join like web url, for example:
width=1024&height=768&fps=10
- Example

- Image Engines
- none.Null, empty engine
- always succeed, provide 1x1(or size request) black image, all input got 0 and ouput ignored
- demo.Tester, for automated presentations
- the kmscript default engine, for local desktop, will get Desktop Image from Microsoft Windows/X11(Gnome/Xfce etc..)
- the deviceare ID/width/height for multiple displays
- melib.KMSI, the KMSIreplay
- to replay the KMSI must set the file path in the parameters, for example: pub/2021/0302.kmsi
- the replay always doing backguard, that mean after 5 seconds call search imagewill got the image of KMSI same time
(even KMSZ never use or jump or sleep or pause anything)
(and u may need padding for ready time in recorder step) - always last image when end of play
- melib.Image, the local image file
- parametersis file path, for example: pub/1.png or d:\my document\1.png
- can be files split by comma(for example: c:\a.png, pub/2.png, pub/p2021/22.jpg), access first file with pin number0, the pin 1 are next
- each get the image will check(reload as image if the file last modify time changed ) and return the image from file
- melib.Network, the network image
- parametersis url, for example: http://www.example.com/get?img=png
- the url will with x,y,width,height before request, for example request location 2,3 with size 10,20 the server got
GET /get?img=png&x=2&y=3&width=10&height=20
Host: www.example.com - the width or height may -1 if max by script call
- the server response must HTTP Code 200 and the Content-Type must start width image/, for example:
HTTP/1.1 200 OK
Content-Type: image/png - if the response headers with Last-Modified, the next request will have If-Modified-Since, so HTTP Code 304is supported
- parameterscan be kms protocol, for example: kms://192.168.1.11:8181/, get the image from another(192.168.1.11) kmscript, the requirement:
- can connect to target IP address that port, mean in same network or with router and firewall allowed
(ServerOnListenAddress must 0.0.0.0, this's default value of kmscript in libjp.json) - with same Sync Password(see W3Config)
- target kmscript already have an image engine
- target kmscript is not required to be a child node
- melib.Android_S0, Android Screen
- work on android version 5.0 or high
- must allow the permission for ask
- support melib.Network
- parametersis milliseconds of max wait, by default(if empty) is 2000
- after request, the engine wait the screen for any change(draw) until max time
- return the screen image before wait(changed)
- return the last image after wait(no change)
- melib.Android_C0, Android Camera
- work on android all version
- parameters are option:
- width, the width wish for match, for example 1024 but camera only have 640 and 1280 will hit 1280, and 800 hit 640
- height, the height wish for
- fps, the FPS wish for
- focus, the Focus Mode, for example: autoor continuous-video
- flash, the flash keep on if value is 1, by default is 0
- orientation, the degrees, valid values are 0, 90, 180, and 270
- pin numberare camera Index, from 0
- with index only work for android version 2.3 or high
- set to -1 to force Back, -2 force Front
- fallback to default camera if failed, for example: Android Version 2.2 or index out of max value
- the camera(all pin) will locked and be unavailable to other applications
- Libjp.Camera, the Camera
- support all Video4Linux2at *Unix and 1394/USB camera at Microsoft Windows
- the devideare description for multiple camera
- the pin numberunsupported yet(ignored)
- IP Camera unsupported, see Libjp.FFMi
- parameters are option:
- w, the Width wish for match
- h, the Height wish for
- fps, the FPS wish for
- fmt, only work in Microsoft Windows, the Format wish for:
- VI_PAL_? (? is one of B/D/G/H/I/M/N/NC)
- VI_NTSC_M
- VI_NTSC_M_J
- VI_NTSC_433
- VI_SECAM_? (? is one of B/D/G/H/K/K1/L)
- setup, only work in Microsoft Windows, show the setting window if value is 1
- pix_fmt, only work in *Unix, the Pixel Format wish for, for example: yuv420p or yuv420p10le
- Libjp.FFMi, the mp4 replay, see melib.KMSI
- fork from ffmpeg.org, source codesame with the official
- support Linux, Apple MacOS and Microsoft Windows
- parametersare file or web uri, for example: pub/1.mp4
- support IP Camera, RTSP or TCP stream, for example:
http://example.com/camera1?f=mjpeg&w=640&h=480
rtsp://10.1.1.1:567/stream1 - example to control the playback:
pub/1080p.mkv,vc=h264_cuvid&w=1280&h=720&fps=10&vs=0&ss=10000&sws=1
- the controls append after comma, all are option(exist or not)
- vc the video decoder, such h264_cuvid for nvidia hardware decode
- w, h the size to force resize to
- fps the frame pre seconds
- vs the video stream index, from 0
- ss the start of milliseconds, 10000 = 10 seconds
- sws the scale flag, 1 for SWS_FAST_BILINEAR
- Libjp.Flycapture, the flycapture Camera
- follow the flycapture-sdk from ptgrey.com
- support Linux and Microsoft Windows
- parameters are option:
- i, the index
- Brightness, Auto exposure, Sharpness, Hue, Saturation, Gamma, Iris, Focus,Zoom, Pan, Tilt, Shutter, Gain, Frame rate, White balance, Temperature
- Keyboard Engines
- none.Null, empty engine, see Image Engines this part
- demo.Tester, for automated presentations
- make the keyboard event for OS level
- if the target window run as Administrator but kmscript not, that can't receive the event
- this's call for OS level, not send message to specific window, to do that, try
- ab.VKM2, an kmscript device, only have in kmscript ROM, after version 20210623 also work for some device
- with an USB data cable provides physical keyboard and mouse functions.
- No driver needed to connect to Windows/MAC/Linux

- follow usb.org HID1.1
- up to 6 keys to be pressed at same time, override first when key 7 pressed
- synchronize CAPSLOCK and NUMLOCK status with other keyboards
- QWERTY layout
- parameters are option:
- vid, the Vendor ID, by default is 12538 (0x30fa)
- pid, the Product ID, by default is 768 (0x0300)
- ver, the Device Version, by default is 256 (0x100 = v1.00)
- usb, the USB Version, by default is 512 (0x200 = USB v2.00)
- sn, the Serial Number, by default is 0
- manufacturer, the Manufacturer Name, by default is KMScript
- product, the Product Name, by default is USB SMART KEYPAD
- power, the Power, by default is 250 (mw)
- melib.Android_K0, the Android Gesture
- MCUAPP.KML
- the MCUAPP physical device for Computer type KML
- only work for local
- the devideare ID for multiple devices
- MCUAPP.IGKM
- the MCUAPP physical device for Computer new type IGKM
- work for local and remote
- see MCUAPP.KML
- Mouse Engines
- most the keyboard with mouse support
- the mouse doesn't require the same engine as the keyboard
- Audio Engines
- none.Null, empty engine, see Image Engines this part
- melib.Mixer, the OS sound mixer
- the devideare ID for multiple devices
- parameters are option:
- hz, the sampleRateInHz, by default is 44100
- channel, the audio channel, by default is 1
- bits, the sampleSizeInBits, current force 16
- libjp.OGG, the OGG file replay
- parametersis file path, for example: pub/1.ogg or d:\my document\1.ogg
- flac format also supported
- Libjp.FFMa
UI: li_tag