cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to connect CCTV camera live streaming in thingworx mashup

Suraj2692
12-Amethyst

How to connect CCTV camera live streaming in thingworx mashup

1. I'm using Thingworx 9.0, I want to show a dash or CCTV  camera on the thingworx mashup how can I do that, suggest any architecture diagram to show a dash or CCTV camera on the mashup.

 

2. I have sensor data in hex format which is in the attachment, I want to convert it in the readable format in thingworx how can I do that. I did with the below program but it will give me different outputs.

 

 var hex1  = HextData.toString();
	var str = '';
	for (var n = 0; n < hex1.length; n += 3) {
		str += String.fromCharCode(parseInt(hex1.substr(n, 6), 16));
	}
	var result = str;

 

 
 
 

33.png

please suggest the way, thanks in advance

 

5 REPLIES 5

Hi @Suraj2692 ,

 

Before jumping to answer your very specific question and not knowing the specifics of your question, I think there some questions you would need to ask yourself first before jumping in writing code:

-how is your device sending data (many cameras simply output a stream you must access at the camera's IP endpoint, others maybe send the data already to a system)

-what exactly do you want to display in the Mashup (while generally people speak about "video", there is a huge difference if you just intend to playback realtime data or want to be able to go back in the video stream in the past)

-what specific browser version do you plan to use to playback the video data? Browsers specifically support different streaming formats, the most notable protocols being HLS (created by Apple originally) and DASH (newer standard), or even the older RTMP. If your customer is trying for example to use an old Internet Explorer version, you should definitely be aware, as you must check what protocol will it support for streaming.

 

Also, have you thought what widget do you plan to use? In ThingWorx there's no built-in video widget OOTB (maybe Navigate has one, if I remember, but I'm not sure). You would need to build one for sure.

Also, converting a stream using a ThingWorx service will simply not work, since you're wanting to convert a stream, which is a continuous data content (ie: the TCP/UDP socket never closes), while the servlets execute a action and then they close the socket . There's no way to stream data via ThingWorx services. Definitely possible, but not via this approach - see below.

 

If I'm thinking about some past projects in this area, typically I had cameras that offer a stream in a format, that we would need to convert to a format that the Video HTML tag would support. The conversion was done by the ffmpeg toolsuite, you can find many examples on internet about this.

 

But, even more important, typically ThingWorx itself should not process video data, since those tasks are highly computational expensive, and typically we would aim to use other systems that can ingest video data, store it somewhere, then let ThingWorx retrieve it for display. For example, think how many users and cameras you could support with a single ThingWorx instance to just stream - you certainly don't want to reach the situation when you add the third camera to have your server experience high CPU usage.

Thanks for reply.
There is one OBD device which support TCP IP protocol and they are sending
us data to MQTT payload in HEXT format.
We received the data on our MQTT server but can not convert it into
readable format that what I am asking for.

Secondly i am asking different question is that I want to display live dash
camera streaming in thingworx mashup.
Dash camera(don't know which protocol is supporting-its client
requirements) is sending data to its server personally we have to only get
this data from that server and display on mashup, that's is my question how
we can display live dash camera streaming on mashup.

Ah, I see now.

It is seen as a best practice that the content of a post is related to its title only. I suggest in this line to open a separate post regarding the sensor transformation.

 

Regarding your video related question, and seeing you don't know the answer to the questions I have outlined in my previous post, I would refrain answering it, since without the answers there are way to many ways this can go sideways. Also you mentioned a server - how can you access the data there, via what protocol?

 

I would like to state that while we can help with smaller technical issues, this forum is not designed to offer architectural diagrams for custom solutions, especially for niche implementations like video which is quite complex, a statement valid particularly for PTC personnel.

We have other ways to help you: if you're an end customer, you should contact your Customer Success Manager, to get you proper support, otherwise, if you're a partner, you can contact your Partner Manager to ask which other partner might have done this before and put you in contact with that partner to facilitate an experience transfer (probably not free, but still, efficient).

Ok i thought I'll get some help here that's why I started this topic.
Thanks for your help.
slangley
23-Emerald II
(To:Suraj2692)

Hi @Suraj2692.

 

If you feel your questions have been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same questions.

 

Regards.

 

--Sharon

Top Tags