Reputation: 11
I have installed a new Opencv on Ubuntu 16.0.4 and I wrote a program to get camera stream and store some of frames. it worked "without" issue. but not work through Systemd. the systemd unit is active (dont fail) but no frame store in destination folder.
i step by step look for problem and i find that code hang on opening the camera stream. that is: cap.open("MyIpCameraAddress")
[Unit]
Description= abc
After=network.target
[Service]
ExecStart= /path/to/executable
Restart=always
[Install]
WantedBy=multi-user.target
also test a systemd unit like above but for run a .sh file
when i start my system unit , the destination folder (that expect store some frames) give a lock icon on it. but when run my program directly through terminal dont have any lock icon on dest folder.
EDIT: I tested with Opencv v3.4.3 and v4.0.1 but the result is the same.
Upvotes: 0
Views: 512
Reputation: 11
I found the solution.
the problem is the way I installed the opencv ( i used the opencv inside the openvino pakage)
i installed independent version of opencv and the problem was solved.
Upvotes: 0