BTS_detroGuy Posted February 16 Report Posted February 16 (edited) I can get the RTSP stream (Audio+Video) from this camera into LabVIEW with no issues. I need to control the PTZ functionality. I used Wireshark to capture the coms between the PC and the camera unit while sending the Pan Tilt and Zoom calls from a customer provided software. I also have SDK file from camera folks. I have limited experience in creating CIN nodes from DLL. I was hoping that instead of creating CIN nodes to control PTZ functions, i can do the same over TCP/UDP interface. I was also wondering if *.pcapng captured using Wireshark has that information. Can some one review the info and let me know if it's possible? I can provide SDK if some interested. Description of DLL AJNetSDK.pdf PTZ Cam data.pcapng Edited February 16 by BTS_detroGuy adding a file Quote
BTS_detroGuy Posted February 16 Author Report Posted February 16 OK. Here is the link to SDK info with DLL and example programs for C users. https://drive.google.com/open?id=1l9rwN0hnaW-M5rSCv3zRgATE2l_bNlJq&usp=drive_fs Quote
Rolf Kalbermatter Posted February 16 Report Posted February 16 (edited) What doesn't work with the function: AJ_NETSDK_IPC_PTZControl() on page 21/22? Or are you not using the SDK functions to retrieve the RTSP stream but some other ready made interface for LabVIEW? Meaning you have no idea how to interface to a DLL? A few points to consider: 1) The camera may not like a secondary connection, either through the SDK or through generic TCP/IP while it is busy streaming image data to the VLC or whatever interface. 2) Trying to reverse engineer the TCP/IP binary stream protocol is likely going to be cumbersome and difficult to realize as it is usually proprietary. The SDK interface is simple enough to use, except if you lack any and all understanding about C programming. It's not a CIN node either that you will need to configure but a CLN (Call Library Node). CINs are not only legacy technology but on most modern LabVIEW versions simply not supported anymore. An interesting problem, but none I can help you as I do not have that hardware, and I would expect it to be a bit cumbersome considering above 2 points. Edited February 16 by Rolf Kalbermatter 1 Quote
BTS_detroGuy Posted February 17 Author Report Posted February 17 Rolf, Thanks a bunch for your response. The honest answer is that professionally i have done very little with CIN nodes. But this project may change that. Most of my vendors provide me with LabVIEW drivers . In some cases i am using instrument that has well defined TCP protocol that can be verified using bus sniffing tools. Your point #1 is a valid one. But I can use VLC media player and watch the RTSP stream on it while opening the customer provided demo software that let's me watch the stream on another window simultaneously while manipulating the PTZ commands to the unit. So i am hoping it will not be a problem. I respect your #2. But in T&M career i have done enough reverse engineering that this part doesn't scare me, provided the reward for successfully completing is significant enough to justify the effort.🤑. At this point i am leaning towards creating enough API calls (via CIN nodes) that will allow me to control PTZ while VLC media player is displaying and possibly recording the stream to HDD. If interested i would like to share the progress. Thanks again for reviewing the DLL and posting your comment. Quote
ShaunR Posted February 17 Report Posted February 17 IIRC there are a couple of RTSP libs for around (a while ago now). Some are based on using the VLC DLL's and I even saw one that was pure LabVIEW. Might be worth having a look at them for "inspiration". 1 Quote
bjustice Posted February 17 Report Posted February 17 Most IP cameras that I have played with will also implement simplistic PTZ via HTTP GET or HTTP POST commands. And these are usually the commands sent from the web interface of the camera. So, Just wireshark capture that traffic Quote
BTS_detroGuy Posted February 25 Author Report Posted February 25 (edited) ShaunR, To my surprise the PURE LABVIEW solution is working great for reading and logging the video stream. Unfortunately two issues i am facing. 1) The video stream it's saving to Disk is not saving the audio data. However i can play the muted video in VLC player after the file is finalized. 2) I have not been able to parse the 'Data' to extract the video and audio data for live display. I found another solution that uses FFMPEG but it seem to corrupt the first few frames. I will keep trying. I liked the RTSP solution better (compared to VLC DLL based solution) because it provides the TCP connection ID. I am hoping to use it for sending the PTZ commands once i figure out the right ones. Edited February 25 by BTS_detroGuy Quote
BTS_detroGuy Posted February 25 Author Report Posted February 25 Just an FYI...I found this software very helpful in playing ,setting and testing IP cameras. 1 Quote
ShaunR Posted February 25 Report Posted February 25 (edited) 10 hours ago, BTS_detroGuy said: ShaunR, To my surprise the PURE LABVIEW solution is working great for reading and logging the video stream. Unfortunately two issues i am facing. 1) The video stream it's saving to Disk is not saving the audio data. However i can play the muted video in VLC player after the file is finalized. 2) I have not been able to parse the 'Data' to extract the video and audio data for live display. I found another solution that uses FFMPEG but it seem to corrupt the first few frames. I will keep trying. I liked the RTSP solution better (compared to VLC DLL based solution) because it provides the TCP connection ID. I am hoping to use it for sending the PTZ commands once i figure out the right ones. Indeed. It's not a full solution as it doesn't support multiple streams, audio or other encoding types. But if you want to get the audio then you need to add the decoding case (parse is the nomenclature used here) for the audio packets in the read payload case structure. Edited February 25 by ShaunR 1 Quote
BTS_detroGuy Posted Tuesday at 04:39 PM Author Report Posted Tuesday at 04:39 PM (edited) FYI... These are the commands (Sniffed in Wireshark) sent by 'ODM' to successfully control camera zoom functions. Edited Tuesday at 04:39 PM by BTS_detroGuy Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.