Hi @pajay,
Are we talking about a pre-recorded file or a live stream from the camera?
For a pre-recorded file, you can use https://github.com/kaltura/kaltura-parallel-upload-resumablejs or https://github.com/kaltura/chunked-file-upload-jquery, there is also a step by step code recipe here:
https://developer.kaltura.com/workflows/Ingest_and_Upload_Media
For live streaming, I am unfamiliar with a JS library that supports RTMP but you can search… There are multiple open and free tools that can stream over RTMP, however. You can use http://obsproject.com or just call ffmpeg directly.