First issue- I was working through the documentation on the IP Camera (RLC-420 camera) binding and ran into a problem installing ffmpeg on my Rpi3 running OH 2.4. After the command
sudo apt update && sudo apt install ffmpeg
I get
Package ffmpeg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘ffmpeg’ has no installation candidate
So after going to the ffmpeg website (very confusing on what to download) I found another website and managed to install ffmpeg in usr/bin/FFmpeg.
Next with the Thing File for one camera:
Thing ipcamera:HTTPONLY:Basement “Camera1” @ “Basement”
[
IPADDRESS=“192.168.0.126”,
USERNAME=“admin”,
PASSWORD= “xxxxxxxx”,
PORT=80,
POLL_CAMERA_MS=2000,
SERVER_PORT=50001,
NVR_CHANNEL=1,
SNAPSHOT_URL_OVERRIDE=“http://192.168.0.126/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=admin&password=reec1230”,
IMAGE_UPDATE_EVENTS=0,
UPDATE_IMAGE=false,
GIF_PREROLL=0,
GIF_POSTROLL=6,
FFMPEG_INPUT=“rtsp://192.168.0.126:554/h264Preview_01_main”,
FFMPEG_LOCATION="/usr/bin/FFmpeg/",
FFMPEG_OUTPUT="/tmpfs/camera1/",
IP_WHITELIST=“DISABLE”
And with this Rule file (Note: Basement motion is from a separate Z-wave “eyeball” and I do have the Update Image working on the camera)
rule “Camera1snapaction”
when
Item Basement_Motion changed to ON
then
Basement_UpdateTheImage.sendCommand (ON)
BasementCreateGif.sendCommand (ON)
end
I get the following three lines on the log file related to my issue:
2019-08-25 08:19:08.089 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:/usr/bin/FFmpeg/ -y -t 6 -rtsp_transport tcp -i rtsp://admin:xxxxxxx@192.168.0.126:554/h264Preview_01_main -filter_complex fps=4,scale=480:-2:flags=lanczos,setpts=0.25*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse /tmpfs/camera1/ipcamera.gif
2019-08-25 08:19:08.111 [ERROR] [hab.binding.ipcamera.internal.Ffmpeg] - java.io.IOException: Cannot run program “/usr/bin/FFmpeg/”: error=13, Permission denied
2019-08-25 08:19:08.113 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Animated GIF has been created and is ready for use.
Before the test above, I was already getting the permission error, so I tried (I’m not a Linux expert, I googled the error code and found these solutions- none have worked):
sudo chown openhab:openhab /usr/bin/FFmpeg and /usr/bin/FFmpeg/ffmpeg
sudo chmod a+x /usr/bin/FFmpeg and /usr/bin/FFmpeg/ffmpeg
As to line three, although the log says the gif file is created it is not. I next extracted the command in line 1 and ran it directly in a putty session with the result below:
So I think I may have a couple of issues, probably all related to the version and way I installed ffmpeg. Any suggestions?