11-23-2025 05:18 PM
Good afternoon! I need help with the Axis P1355 camera and LabVIEW (AxisMediaControl ActiveX).
1) How can I make the recording automatically split into files every 20 minutes?
Currently, I can control the recording using StartRecording and StopRecording through Property/Invoke mode in AxisMediaControl, but I need the following:
how can I create a new video file every 20 minutes? (for example rec_001.asf, rec_002.asf, etc.)
2) Problem with the overlay in the saved video
In the web view, the overlay is readable, although it is small, but in the saved recording through LabVIEW, the text is too small and almost unreadable. In P1355, there are no options for text size (TextSize / FontSize - only position, inclusion, and text are available), and I could not find such options in the web settings.
Is it possible to fix this by configuring the MJPEG codec? The recording is saved in .asf format.
3)Do I understand correctly that I need to create a new HTTP GET block every time for the control and display settings new parameters?
11-25-2025 09:27 AM
as your camera is out of support since 2020, I would try to open the ipv4 camera in obs - this freeware does have several scripting capabilities (eg. for starting and stopping) and it is conveniently for overlays, mergen several camera streams into one etc.
11-26-2025 12:49 AM
Hi, alexderjuengere
Thanks for the offer, I agree that using OBS can reduce a lot of time for the implementation of my task, but still I wanted to figure out how to connect an IP camera to the LabVIEW programming environment. I studied a few examples, an article, and using my basic knowledge in LabVIEW (2022 Q3), I tried to implement something))
Are there any recommendations?
11-26-2025 08:10 AM - edited 11-26-2025 08:12 AM
- does your webcam show up in ms windows device manager?
- does your webcam show up in NI Max?(eg. obs shows up as virtual camera in NI max, or the webcam from the microsoft surface laptop...)
if yes, then your device (camera) drivers are working
for capturing an image from a webcam there exists this solution: https://forums.ni.com/t5/Example-Code/Video-for-Windows-avicap32-dll/ta-p/3491285
which is using some very old dlls from the "old windows runtime"
(Win-32 API, copilot says Video for Windows (VfW) API is from Windows 3.x/95/NT)
also copilot tells me, that there exists a modern version to replace win32/Vfw with WinRT/UWP (WinRT = WindowsRuntime; Windows.Media.Capture.MediaCapture)
11-28-2025 12:23 PM
About a decade ago (Windows 10, LabVIEW 2016, I think), I got involved with a "Capture the behavior" study with a colleague who wanted to use an Axis camera (I don't remember the model). We did everything using IMAQdx and the tools found in the Vision Utilities.
We had two parallel loops handling video acquisition. One was concerned with Camera I/O, and initialized the Camera and told it when to start taking Videos (based on behavior being monitored), the other with actually taking single frames and saving them in AVI format, informing the Camera loop that the "movie" was saved. The Camera routine took care of naming the successive AVI files and starting them (we took single AVIs per behavior, but you could use a different criterion and say "Keep taking 20" Videos until I tell you to stop and exit for good".
I have to say that there was (for me) a "learning curve" to get used to NI Vision (DAQmx is much simpler, particularly if you don't use the Dreaded DAQ Assistant!).
All of the parallel loops in this routine (we ran several "stations" simultaneously, each having a "Camera" loop + a "Video" loop, plus another loop that triggered "Behavior Active" (= "Start Recording"). This routine used the newly-invented Channel Message Handler paradigm (whose name I think I invented, and an "advanced" version now ships with LabVIEW).
Axis and Basler were the two camera models that (as I recall) were tested to work "as expected" with IMAQdx, VAS, and VDM (hmm -- I'm not sure I have all the names right here). I've subsequently tried to do another Vision product with FLIR cameras -- fortunately, I was allowed to abandon it in frustration after 6 months or so of "not quite adhering to the GenICam standards"). I haven't done any LabVIEW Vision work since then, but I'm relocating to my previous location, so who knows what will fall into my lap?
Bob Schor
11-29-2025 06:46 AM
I use the AXIS IP Utility to check if the camera is connected over Ethernet and to open its web interface for configuration and monitoring. From there I get the camera address, for example http://169.254.83.x. This address works fine in a browser.
In LabVIEW I installed the AxisMediaControl ActiveX component from the official AXIS website and placed it inside an ActiveX Container. Using the URL http://169.254.83.x/axis-cgi/mjpg/video.cgi
I can receive the video stream in LabVIEW without any problems. AxisMediaControl is started and configured outside my main While loop – once the correct IP is set, the video stream continues even if my main VI is busy or stopped, which actually works quite well for me.
Inside the main While loop I control the camera via HTTP using many different param.cgi?action=update... requests for various parameters (sliders, buttons etc.). If you open my VI, you will see several URLs used for camera control, for example for brightness, sharpness, color level, rotation, mirror, text overlay, exposure and so on. I also use param.cgi?action=list&group=root to read parameters back from the camera.
Recently I updated the camera firmware, which solved an earlier problem with text overlay size: now the camera correctly supports small / medium / large overlay text and I can change it through HTTP.
However, I noticed that my UI actions in LabVIEW (moving sliders, pressing buttons) require more time to be processed. The camera often reacts with a delay of about 1–2 seconds. I suspect this is caused by the way I organized my main loop: I tried to put “everything into one big gate”, so now in each loop iteration LabVIEW executes a long chain of HTTP requests one after another (chained by the error wire). With so many HTTP commands in one loop, the cycle seems to be limited by the slowest request and does not really run at its nominal period.
Does this approach with many chained param.cgi?action=update... calls in one While loop make sense, or is it fundamentally wrong for this type of device?
Could you show me some examples in VI?
For example, should I:
send HTTP update commands only when a control value actually changes (e.g. using an Event Structure),
move AxisMediaControl and video streaming to a separate loop,
reuse one HTTP session instead of opening/closing a connection for every request,
avoid continuous calls to param.cgi?action=list&group=root and use them only on demand,
or combine several parameter updates into a single HTTP request?